back to home

PyneSys / pynecore

PyneCore - Pine Script Like Python Framework

104 stars
26 forks
2 issues
Python

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing PyneSys/pynecore in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/PyneSys/pynecore)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

PyneCore™ Pine Script in Python - Without Limitations **🚀 Have Pine Script code? Get automatic Python translation →** What is PyneCore? PyneCore brings TradingView's Pine Script capabilities to Python through a revolutionary approach - it transforms regular Python code to behave like Pine Script through AST transformations, while maintaining the full power of the Python ecosystem. Instead of creating another object-oriented wrapper or a new language, PyneCore modifies your Python code at import time, giving you the intuitive bar-by-bar execution model of Pine Script without leaving Python's rich environment. Key Features • **Native Pine Script Semantics in Python**: Write familiar Python code that runs with Pine Script's bar-by-bar execution model • **AST Transformation Magic**: Your code is transformed at import time to implement Pine Script behavior • **High Performance**: Zero mandatory external dependencies with highly optimized implementation • **Series & Persistent Variables**: Full support for Pine Script's time series and state persistence • **Function Isolation**: Each function call gets its own isolated persistent state • **NA Handling**: Graceful handling of missing data with Pine Script's NA system • **Technical Analysis Library**: Comprehensive set of Pine Script-compatible indicators and functions • **Strategy Backtesting**: Pine Script compatible framework for developing and testing trading strategies Quick Example Innovative Concepts PyneCore introduces several revolutionary concepts: • Magic Comment & Import Hook Identify your scripts with a simple magic comment: This activates PyneCore's import hook system which intercepts Python imports and applies AST transformations to recognized scripts. • Series Variables Track historical data across bars, just like in Pine Script: • Persistent Variables Maintain state between bars with simple type annotations: • Function Isolation Each call to a function maintains its own isolated state: Installation > **Note for Windows users**: PyneCore requires timezone data that is not included in Windows by default. The and installations automatically include the package. If you're using the basic installation and encounter timezone errors, install it manually with . Getting Started Create a Simple Script • Create a file with the annotation: • Run your script with the PyneCore CLI: Working with Pine Script Files PyneCore also supports running Pine Script files directly with automatic compilation: > **Note**: Pine Script compilation requires a PyneSys API key. Get yours at pynesys.io. Why Choose PyneCore? • **Beyond TradingView Limitations**: No more platform restrictions, code size limits, or subscription fees • **Python Ecosystem Access**: Use Python's data science, ML, and analysis libraries alongside trading logic • **Performance & Precision**: Designed for speed and precision, the same results as Pine Script • **Open Source Foundation**: The core library and runtime is open source under Apache 2.0 license • **Professional Trading Tools**: Build institutional-grade systems with Pine Script simplicity • **Advanced Backtesting**: Run sophisticated strategy tests outside platform constraints Pine Script Migration Made Easy Have existing Pine Script code you want to run in Python? **PyneSys now offers automatic Pine Script to PyneCore translation** through our web platform and Discord bot. 🚀 Get Started Instantly • **Try for free on Discord**: Use in our Discord for instant conversion - 3 free translations! • **Full service**: Visit pynesys.io for subscriptions and higher limits 💡 Support the Ecosystem Love PyneCore and want to see it grow? Consider a **Seed subscription or higher** ($5+/mo) to support continued development: • **Daily translations** of your Pine Script files (5+ per day) • **Larger script support** for complex indicators and strategies • **Direct contribution** to keeping PyneCore open source and advancing *Every subscription helps maintain this free, open-source runtime and drives innovation in algorithmic trading tools.* Documentation & Support • **Documentation**: pynecore.org Community • **Discussions**: GitHub Discussions • **Discord**: discord.com/invite/jegnhtq6gy • **X**: x.com/pynesys • **Website**: pynecore.org License PyneCore is licensed under the Apache License 2.0. Disclaimer Pine Script™ is a trademark of TradingView, Inc. PyneCore is not affiliated with, endorsed by, or sponsored by TradingView. This project is an independent implementation that aims to provide compatibility with the Pine Script language concept in the Python ecosystem. Risk Warning Trading involves significant risk of loss and is not suitable for all investors. The use of PyneCore does not guarantee any specific results. Past performance is not indicative of future results. • PyneCore is provided "as is" without any warranty of any kind • PyneCore is not a trading advisor and does not provide trading advice • Scripts created with PyneCore should be thoroughly tested before using with real funds • Users are responsible for their own trading decisions • You should consult with a licensed financial advisor before making any financial decisions By using PyneCore, you acknowledge that you are using the software at your own risk. The creators and contributors of PyneCore shall not be held liable for any financial loss or damage resulting from the use of this software. Commercial Support PyneCore is part of the PyneSys ecosystem. For commercial support, custom development, or enterprise solutions: • **Website**: pynesys.com/contact --- Elevate Your Trading with the Power of Python & Pine Script