TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/theonetrade/backtest-kit/llms.txt
Use this file to discover all available pages before exploring further.
@backtest-kit/pinets package lets you run TradingView Pine Script strategies directly inside Node.js using the PineTS runtime. If you have a working TradingView strategy — whether a custom indicator, a breakout system, or a multi-condition entry script — you can load the .pine file directly and use its plot() outputs as trading signals in backtest-kit without rewriting a single line of Pine Script logic. The translation from TradingView to backtest-kit is a mapping step, not a rewrite.
Key Features
Pine Script v5/v6
Native TradingView syntax with 1:1 compatibility via the PineTS runtime. No transpilation, no manual porting.
60+ Built-In Indicators
SMA, EMA, RSI, MACD, Bollinger Bands, ATR, Stochastic, and 53+ more TradingView built-ins are available out of the box.
File or Code Input
Load a
.pine file from disk or pass a Pine Script code string directly — whichever fits your workflow.Plot Extraction
Flexible mapping from Pine
plot() and plotshape() outputs to structured backtest-kit signal fields.Cached Execution
Memoized file reads for repeated strategy runs. The
.pine file is read and parsed once, then cached for the duration of the backtest.@backtest-kit/pinets works inside backtest-kit’s AsyncLocalStorage temporal context. Candle data passed to the Pine Script runtime is always aligned to the current backtest timestamp — look-ahead bias is structurally impossible.Getting Started
Place your .pine file in the project
Copy your TradingView
.pine file into your project directory, for example:Loading Pine Script from a Code String
If you prefer not to use a file on disk, pass the Pine Script source as a string directly:Supported Built-In Indicators
@backtest-kit/pinets supports all 60+ TradingView built-in functions via PineTS, including:
Use Case: Pine Script Range Breakout
The backtest-kit reference implementation includes a working example that loads abtc_dec2025_range.pine file on 1h candles, extracts Bollinger Band boundaries, range breakout signals, and volume spike confirmations — all wired into a live backtest with full PNL reporting. See the Dec 2025 strategy example for a complete walkthrough.