An open API service indexing awesome lists of open source software.

https://github.com/ferranbt/pinecone

Pinescript runtime written in Rust
https://github.com/ferranbt/pinecone

pine pine-script pinescript

Last synced: 2 months ago
JSON representation

Pinescript runtime written in Rust

Awesome Lists containing this project

README

          

# Pinecone

A modular PineScript interpreter written in Rust.

Pinecone executes PineScript code (TradingView's scripting language) with support for technical analysis, custom indicators, and strategy backtesting. The interpreter is designed to be extensible - you can add custom builtin functions and output types to integrate with your own systems.

## Features

- Full PineScript v5 language support
- Technical analysis functions (moving averages, oscillators, etc.)
- Drawing objects (plots, labels, boxes)
- Modular output system - extend with [custom types and builtins](examples/custom-builtin-func)
- Type-safe generic architecture

## Example

```rust
use pine::Script;

let script = Script::compile(r#"
fast_ma = ta.sma(close, 10)
slow_ma = ta.sma(close, 20)
plot(fast_ma, color=color.blue)
plot(slow_ma, color=color.red)
"#)?;

let output = script.execute(&bar)?;
```