What is PyneCore?
PyneCore is a fast, very clean, backtesting framework written in Python. It is similar to Pine Script™, the language used in TradingView. The goal is to make it 100% compatible with Pine Script™.
Pine Script™ Compatible
Though Pyne is actually Python code, with its magic it works the same way as Pine Script™. There are persistent variables, series and function are isolated the same way as in Pine. If you like Pine Script™, you will love Pyne too.
Open Source
PyneCore is open source and licensed under the Apache v2.0 license. You can use it for free, and you can modify it for your own needs. Contributions are very welcome.
Multiple Exchange Providers
PyneCore contains multiple exchange providers, which can be easily extended. Providers are used to get historical data, and can be extended to do real-time trading.
Complete Library
Almost all library functions are implemented. They are tested against Pine Script™ results, the goal is to make them 100% compatible with high accuracy.
No Dependencies
There are no mandatory dependencies to other libraries (e.g. numpy, pandas) if you just want to use it in your own project. If you use it as a standalone app in CLI, you need to install typer and it is recommended to install rich.
Fast and Clean
It is designed to be as fast as possible, mostly use recursive functions to avoid loops. It is clean, everything is annotated and documented. It is easy to understand and to extend.
Very Easy to Use
PyneCore is designed to be as easy to use as possible. It is very similar to Pine Script™, so if you know Pine Script™, you will know Pyne too. If you don’t know, it is very easy and straightforward to learn.
Easy Integration
PyneCore can be easily integrated into your own project. It is designed to be as simple as possible. You can use it as a standalone app in CLI, or you can use it in your own project without any additional dependencies.
High Accuracy
PyneCore is tested against Pine Script™ results. The goal is to make it 100% compatible TradingView results. Most of the time it is 14-15 digits accurate, which is the same as Pine Script™.
How Pyne code is compared to Pine Script™?
This is a Bollinger Bands strategy in Pine Script™ and Pyne side by side. As you can see, the code is very similar, though Pyne is more pythonic.
Pine Script™
|
|
Pyne (Python)
|
|
Pine Script™ Compiler
PyneCore contains a connector to our pynesys.io service, which has a fully compatible Pine Script™ compiler (or transpiler if you like). You can compile your Pine Script™ code to Pyne code. If you have API key, PyneCore can compile and run Pine Script™ code directly from CLI or from your own project. The compiler compiles Pine Script™ code to readable and easily understandable Python code, with the help of PyneCore.

PyneCore Command Line Interface
PyneCore CLI provides an intuitive command-line interface for downloading data, running scripts, and performing analyses. With user-friendly formatting, color codes, and progress bars, every operation becomes transparent. You can also run your Pine Script™ codes directly in a Python environment using the compile command (coming soon). More information about PyneCore CLI can be found in the PyneCore CLI documentation.