pinets 0.7.8 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,335 +1,394 @@
1
- [![npm version](https://img.shields.io/npm/v/pinets.svg?style=flat-square)](https://www.npmjs.com/package/pinets)
2
- [![License: AGPL-3.0](https://img.shields.io/badge/License-AGPL--3.0-blue.svg?style=flat-square)](https://opensource.org/licenses/AGPL-3.0)
3
- [![Coverage](./.github/badges/coverage.svg)](./.github/badges/coverage.svg)
4
- [![Documentation](https://img.shields.io/badge/docs-github--pages-blue?style=flat-square)](https://quantforgeorg.github.io/PineTS/)
5
- [![Reddit](https://img.shields.io/reddit/subreddit-subscribers/QuantForge?style=flat-square&logo=reddit)](https://www.reddit.com/r/QuantForge/)
1
+ <p align="center">
2
+ <img src="./.github/images/banner.png" alt="PineTS" />
3
+ </p>
4
+
5
+ <p align="center">
6
+ <strong>Run Pine Script Anywhere</strong><br>
7
+ Execute TradingView indicators in Node.js, browsers, and any JavaScript runtime
8
+ </p>
9
+
10
+ <p align="center">
11
+ <a href="https://www.npmjs.com/package/pinets"><img src="https://img.shields.io/npm/v/pinets.svg?style=flat-square" alt="npm version"></a>
12
+ <a href="https://opensource.org/licenses/AGPL-3.0"><img src="https://img.shields.io/badge/License-AGPL--3.0-blue.svg?style=flat-square" alt="License"></a>
13
+ <a href="./.github/badges/coverage.svg"><img src="./.github/badges/coverage.svg" alt="Coverage"></a>
14
+ <a href="https://quantforgeorg.github.io/PineTS/"><img src="https://img.shields.io/badge/docs-github--pages-blue?style=flat-square" alt="Documentation"></a>
15
+ <a href="https://www.reddit.com/r/QuantForge/"><img src="https://img.shields.io/reddit/subreddit-subscribers/QuantForge?style=flat-square&logo=reddit" alt="Reddit"></a>
16
+ </p>
17
+
18
+ <p align="center">
19
+ <a href="#quick-start">Quick Start</a> •
20
+ <a href="#features">Features</a> •
21
+ <a href="#live-demos">Live Demos</a> •
22
+ <a href="#usage">Usage</a> •
23
+ <a href="#api-coverage">API Coverage</a> •
24
+ <a href="#documentation">Docs</a>
25
+ </p>
6
26
 
7
27
  ---
8
28
 
9
- **PineTS** is a JavaScript/TypeScript runtime that enables execution of Pine Script indicators in JavaScript environments. It supports two input formats:
29
+ ## What is PineTS?
10
30
 
11
- 1. **Native Pine Script v5/v6** _(experimental)_ - Run original Pine Script code directly
12
- 2. **PineTS Syntax** - A JavaScript/TypeScript syntax that closely mirrors Pine Script
31
+ **PineTS** is an open-source transpiler and runtime that brings Pine Script to JavaScript. Write indicators once, run them anywhere : on your own servers, in the browser, or embedded in your trading applications.
13
32
 
14
- This makes it possible to run Pine Script indicators in Node.js, browsers, and other JavaScript runtimes without modification or with minimal conversion effort.
15
-
16
- > _Disclaimer : PineTS is an independent project and is not affiliated with, endorsed by, or associated with TradingView or Pine Script™. All trademarks and registered trademarks mentioned belong to their respective owners._
17
-
18
- ## Overview
19
-
20
- PineTS is a runtime + transpiler that converts Pine Script (or PineTS syntax) into executable JavaScript. It preserves the original functionality and behavior while providing robust handling of time-series data processing, technical analysis calculations, and Pine Script's distinctive scoping mechanisms.
21
-
22
- ### Input Format Support
23
-
24
- - **Native Pine Script** _(experimental)_: Run original Pine Script v5 and v6 indicators directly. Note that some indicators may fail if they use Pine Script API features not yet implemented in PineTS. Check the [API coverage badges](#pine-script-api-coverage) below to verify compatibility.
25
- - **PineTS Syntax**: A JavaScript/TypeScript syntax that mirrors Pine Script closely, requiring minimal conversion effort from original Pine Script code.
26
-
27
- ## See it in action
28
-
29
- Bellow are two ports of Pine Script indicators running in the browser.
30
- PineTS is used to generate plot data, and tradingview light weight chart is used to display the plot.
31
-
32
- - [Williams Vix Fix](https://quantforgeorg.github.io/PineTS/indicators/willvixfix/)
33
- - [Squeeze Momentum](https://quantforgeorg.github.io/PineTS/indicators/sqzmom/)
33
+ ```javascript
34
+ import { PineTS, Provider } from 'pinets';
34
35
 
35
- ## Key Features
36
+ const pineTS = new PineTS(Provider.Binance, 'BTCUSDT', '1h', 100);
36
37
 
37
- - **Native Pine Script Support**: Run original Pine Script v5/v6 code directly _(experimental)_
38
- - **Dual Input Format**: Support for both native Pine Script and PineTS syntax
39
- - **High Precision**: Aims for the same precision as Pine Script (up to the 8th digit)
40
- - **Time-Series Processing**: Handles historical data and series operations
41
- - **Technical Analysis Functions**: Comprehensive set of 60+ TA indicators and calculations
42
- - **Mathematical Operations**: Advanced mathematical functions and precision handling
43
- - **Input Management**: Flexible parameter and input handling system
44
- - **Context Management**: Maintains proper scoping and variable access rules
45
- - **Runtime Transpilation**: Converts code to executable JavaScript at runtime without pre-compilation
38
+ // Run native Pine Script directly
39
+ const { plots } = await pineTS.run(`
40
+ //@version=5
41
+ indicator("EMA Cross")
42
+ plot(ta.ema(close, 9), "Fast", color.blue)
43
+ plot(ta.ema(close, 21), "Slow", color.red)
44
+ `);
45
+ ```
46
46
 
47
- ## Core Components
47
+ > _**Disclaimer** : PineTS is an independent project and is not affiliated with, endorsed by, or associated with TradingView or Pine Script™. All trademarks and registered trademarks mentioned belong to their respective owners._
48
48
 
49
- ### PineTS Class
49
+ ---
50
50
 
51
- The main class that handles:
51
+ ## Why PineTS?
52
52
 
53
- - Market data management
54
- - Series calculations
55
- - Built-in variables (open, high, low, close, volume, etc.)
56
- - Runtime execution context
53
+ | Challenge | PineTS Solution |
54
+ | ------------------------------------------- | ---------------------------------------------------- |
55
+ | Pine Script only runs on TradingView | Run indicators on your own infrastructure |
56
+ | Can't integrate indicators with custom apps | Full JavaScript/TypeScript integration |
57
+ | Limited to TradingView's data sources | Use any data source (Binance, custom APIs, CSV) |
58
+ | No programmatic access to indicator values | Get raw values for backtesting, alerts, ML pipelines |
59
+ | Can't run indicators server-side | Works in Node.js, Deno, Bun, browsers |
57
60
 
58
- ### Namespaces
61
+ ---
59
62
 
60
- - **Core**: Essential Pine Script functionality and base operations
61
- - **TechnicalAnalysis**: Comprehensive set of technical indicators and analysis functions
62
- - **PineMath**: Mathematical operations and precision handling
63
- - **Input**: Parameter and input management system
64
- - **Syminfo**: Symbol information and market data helpers
63
+ ## Quick Start
65
64
 
66
- ## Installation
65
+ ### Installation
67
66
 
68
67
  ```bash
69
68
  npm install pinets
70
69
  ```
71
70
 
72
- ## Usage Examples
73
-
74
- ### Streaming Data
75
-
76
- PineTS provides a convenient event-based interface for streaming live data:
71
+ ### Hello World
77
72
 
78
73
  ```javascript
79
74
  import { PineTS, Provider } from 'pinets';
80
75
 
81
- const pineTS = new PineTS(Provider.Binance, 'BTCUSDT', '1m');
82
-
83
- // Start streaming with 1 second interval
84
- const evt = pineTS.stream(
85
- indicator,
86
- //assuming that indicator is a pine source code or pineTS function
87
- {
88
- pageSize: 10,
89
- live: true,
90
- interval: 1000,
91
- }
92
- );
76
+ // Initialize with Binance data
77
+ const pineTS = new PineTS(Provider.Binance, 'BTCUSDT', '1h', 100);
93
78
 
94
- evt.on('data', (ctx) => {
95
- console.log('Update:', ctx.result.close);
96
- });
79
+ // Calculate a simple moving average
80
+ const { plots } = await pineTS.run(`
81
+ //@version=5
82
+ indicator("My First Indicator")
83
+ sma20 = ta.sma(close, 20)
84
+ plot(sma20, "SMA 20")
85
+ `);
97
86
 
98
- // See documentation for full details
87
+ console.log('SMA values:', plots['SMA 20'].data);
99
88
  ```
100
89
 
101
- ### Option 1: Run Native Pine Script Directly _(Experimental)_
90
+ **That's it!** You're running Pine Script in JavaScript.
102
91
 
103
- Starting with v0.7.0, you can run original Pine Script code directly:
92
+ ---
104
93
 
105
- ```javascript
106
- import { PineTS, Provider } from 'pinets';
94
+ ## Features
107
95
 
108
- // Initialize with market data
109
- const pineTS = new PineTS(Provider.Binance, 'BTCUSDT', 'D', 100);
96
+ ### Core Capabilities
110
97
 
111
- // Run native Pine Script directly
112
- const pineScriptCode = `
113
- //@version=5
114
- indicator('My EMA Cross Strategy')
98
+ - **Native Pine Script v5/v6** : Run original TradingView code directly _(experimental)_
99
+ - **60+ Technical Indicators** : SMA, EMA, RSI, MACD, Bollinger Bands, and more
100
+ - **Time-Series Processing** : Full Pine Script semantics with lookback support
101
+ - **Real-time Streaming** : Live data processing with event-based updates
102
+ - **Multi-Timeframe Analysis** : `request.security()` for MTF indicators
103
+ - **High Precision** : Matches TradingView's calculation precision
104
+
105
+ ### Two Ways to Write Indicators
115
106
 
116
- ema9 = ta.ema(close, 9)
117
- ema18 = ta.ema(close, 18)
107
+ <table width="100%">
108
+ <tr>
109
+ <th>Native Pine Script</th>
110
+ <th>PineTS Syntax (JavaScript)</th>
111
+ </tr>
112
+ <tr>
113
+ <td>
118
114
 
119
- bull_bias = ema9 > ema18
120
- bear_bias = ema9 < ema18
115
+ ```pinescript
116
+ //@version=5
117
+ indicator("RSI Strategy")
121
118
 
122
- plot(ema9, title = '9 EMA', color = color.yellow)
123
- plot(ema18, title = '18 EMA', color = color.red)
124
- `;
119
+ rsi = ta.rsi(close, 14)
120
+ sma = ta.sma(rsi, 10)
125
121
 
126
- const { plots } = await pineTS.run(pineScriptCode);
127
- //access ema9 and ema18 plots data
122
+ plot(rsi, "RSI")
123
+ plot(sma, "Signal")
128
124
  ```
129
125
 
130
- > **⚠️ Note**: Native Pine Script support is experimental. Some indicators may fail if they use API features not yet implemented. Refer to the [API coverage badges](#pine-script-api-coverage) to check compatibility.
131
-
132
- ### Option 2: Use PineTS Syntax
126
+ </td>
127
+ <td>
133
128
 
134
- PineTS syntax is a JavaScript/TypeScript version of Pine Script with minimal differences:
129
+ ```javascript
130
+ //@PineTS
131
+ indicator('RSI Strategy');
135
132
 
136
- #### Converting Pine Script to PineTS
133
+ const rsi = ta.rsi(close, 14);
134
+ const sma = ta.sma(rsi, 10);
137
135
 
138
- Original Pine Script:
136
+ plot(rsi, 'RSI');
137
+ plot(sma, 'Signal');
138
+ ```
139
139
 
140
- <table width="100%">
141
- <tr>
142
- <td>
140
+ </td>
141
+ </tr>
142
+ </table>
143
143
 
144
- ```pinescript
145
- /*==[ Original Pine Script ]==*/
144
+ ---
146
145
 
147
- //@version=5
148
- indicator('My EMA Cross Strategy');
146
+ ## Live Demos
149
147
 
150
- ema9 = ta.ema(close, 9);
151
- ema18 = ta.ema(close, 18);
148
+ See PineTS in action with these browser-based examples:
152
149
 
153
- bull_bias = ema9 > ema18;
154
- bear_bias = ema9 < ema18;
150
+ - **[Williams Vix Fix](https://quantforgeorg.github.io/PineTS/indicators/willvixfix/)** : Volatility-based indicator
151
+ - **[Squeeze Momentum](https://quantforgeorg.github.io/PineTS/indicators/sqzmom/)** : Momentum oscillator
152
+ - **[Playground](https://quantforge.org/playground/)** : Test your own Pine Script code
155
153
 
156
- prev_close = close[1];
157
- diff_close = close - prev_close;
154
+ _Demos are Built with PineTS + [QFChart](https://github.com/QuantForgeOrg/QFChart)_
158
155
 
159
- _oo = open;
160
- _oo = math.abs(open[1] - close[2]);
156
+ ---
161
157
 
162
- // plot ema's
163
- plot(ema9, title = '9 EMA', color = color.yellow)
164
- plot(ema18, title = '18 EMA', color = color.red)
165
- ```
158
+ ## Usage
166
159
 
167
- </td>
168
- <td>
160
+ ### Running Native Pine Script
169
161
 
170
162
  ```javascript
171
- /*==[ Equivalent PineTS ]==*/
172
-
173
- //
174
- indicator('My EMA Cross Strategy');
163
+ import { PineTS, Provider } from 'pinets';
175
164
 
176
- let ema9 = ta.ema(close, 9);
177
- let ema18 = ta.ema(close, 18);
165
+ const pineTS = new PineTS(Provider.Binance, 'BTCUSDT', 'D', 200);
178
166
 
179
- let bull_bias = ema9 > ema18;
180
- let bear_bias = ema9 < ema18;
167
+ const { plots } = await pineTS.run(`
168
+ //@version=5
169
+ indicator("MACD", overlay=false)
181
170
 
182
- let prev_close = close[1];
183
- let diff_close = close - prev_close;
171
+ [macdLine, signalLine, hist] = ta.macd(close, 12, 26, 9)
184
172
 
185
- let _oo = open;
186
- _oo = math.abs(open[1] - close[2]);
173
+ plot(macdLine, "MACD", color.blue)
174
+ plot(signalLine, "Signal", color.orange)
175
+ plot(hist, "Histogram", color.gray, style=plot.style_histogram)
176
+ `);
187
177
 
188
- // plot ema's
189
- plot(ema9, { title: '9 EMA', color: color.yellow });
190
- plot(ema18, { title: '18 EMA', color: color.red });
178
+ // Access the calculated values
179
+ console.log('MACD Line:', plots['MACD'].data);
180
+ console.log('Signal Line:', plots['Signal'].data);
191
181
  ```
192
182
 
193
- </td>
194
- </tr>
195
- </table>
196
-
197
- ### Running PineTS Code
183
+ ### Using PineTS Syntax
198
184
 
199
185
  ```javascript
200
186
  import { PineTS, Provider } from 'pinets';
201
187
 
202
- // Initialize with market data
203
- const pineTS = new PineTS(Provider.Binance, 'BTCUSDT', 'D', 100);
204
-
205
- // Run your indicator
206
- const { result } = await pineTS.run((context) => {
207
- const { ta, math } = context;
208
- const { close, open } = context.data;
188
+ const pineTS = new PineTS(Provider.Binance, 'ETHUSDT', '4h', 100);
209
189
 
210
- let ema9 = ta.ema(close, 9);
211
- let ema18 = ta.ema(close, 18);
190
+ const { plots } = await pineTS.run(($) => {
191
+ const { close, high, low } = $.data;
192
+ const { ta, plot, plotchar } = $.pine;
212
193
 
213
- let bull_bias = ema9 > ema18;
214
- let bear_bias = ema9 < ema18;
194
+ // Calculate indicators
195
+ const ema9 = ta.ema(close, 9);
196
+ const ema21 = ta.ema(close, 21);
197
+ const atr = ta.atr(14);
215
198
 
216
- let prev_close = close[1];
217
- let diff_close = close - prev_close;
199
+ // Detect crossovers
200
+ const bullish = ta.crossover(ema9, ema21);
201
+ const bearish = ta.crossunder(ema9, ema21);
218
202
 
219
- let _oo = open;
220
- _oo = math.abs(open[1] - close[2]);
203
+ // Plot results
204
+ plot(ema9, 'Fast EMA');
205
+ plot(ema21, 'Slow EMA');
206
+ plotchar(bullish, 'Buy Signal');
207
+ plotchar(bearish, 'Sell Signal');
221
208
 
222
- return { ema9, ema18, bull_bias, bear_bias };
209
+ return { ema9, ema21, atr, bullish, bearish };
223
210
  });
224
211
  ```
225
212
 
226
- > **📖 For detailed documentation on initialization options, parameters, and advanced usage, see the [Initialization and Usage Guide](https://quantforgeorg.github.io/PineTS/initialization-and-usage/)**
227
-
228
- ## Key Differences: PineTS Syntax vs Native Pine Script
213
+ ### Real-time Streaming
229
214
 
230
- When using **PineTS syntax** (not native Pine Script), note these differences:
231
-
232
- 1. **Variable Declaration**: Use JavaScript's `const`, `let`, and `var` instead of Pine Script's implicit declaration
233
- 2. **Function Syntax**: JavaScript arrow functions and standard function syntax
234
- 3. **Module System**: Import Pine Script namespaces from context: `const { ta } = context; const { close, open } = context.data;`
235
- 4. **Object Syntax**: Use JavaScript object notation for parameters: `plot(ema9, { title: '9 EMA', color: color.yellow })`
236
- 5. **Scoping Rules**: Maintains Pine Script's series behavior through runtime transformation
237
- 6. **Return Syntax**: Can return an object with indicator results for easy access in JavaScript
215
+ ```javascript
216
+ import { PineTS, Provider } from 'pinets';
238
217
 
239
- When using **Native Pine Script**, write code exactly as you would in TradingView - no conversion needed!
218
+ const pineTS = new PineTS(Provider.Binance, 'BTCUSDT', '1m');
240
219
 
241
- ## Project Goals
220
+ const stream = pineTS.stream(
221
+ `
222
+ //@version=5
223
+ indicator("Live RSI")
224
+ plot(ta.rsi(close, 14), "RSI")
225
+ `,
226
+ { live: true, interval: 1000 }
227
+ );
242
228
 
243
- PineTS aims for **full coverage** of Pine Script functions and capabilities to enable seamless execution of Pine Script indicators in JavaScript environments.
229
+ stream.on('data', (ctx) => {
230
+ const rsi = ctx.plots['RSI'].data.slice(-1)[0].value;
231
+ console.log(`RSI: ${rsi.toFixed(2)}`);
244
232
 
245
- **Current Status (v0.7.3)**:
233
+ if (rsi < 30) console.log('Oversold!');
234
+ if (rsi > 70) console.log('Overbought!');
235
+ });
246
236
 
247
- - ✅ **Native Pine Script Support (Experimental)**: Run original Pine Script v5/v6 code directly
248
- - ✅ **PineTS Runtime Transpiler**: Convert PineTS syntax to executable JavaScript
249
- - ✅ **Core Pine Script API**: ~75% coverage of built-in functions and variables
250
- - ✅ **Series and Scope Management**: Full Pine Script semantics preserved
251
- - ✅ **Technical Analysis**: 60+ indicators and analysis functions
252
- - ✅ **Mathematical Operations**: Comprehensive math functions
253
- - ✅ **Data Structures**: Arrays and Matrices (90+ operations)
254
- - ✅ **Input System**: Dynamic parameter handling
255
- - ✅ **Plot Data Management**: Multi-series plotting support
256
- - ✅ **Real-time Execution**: Live data processing capability
257
- - ✔️🚧 **Market Data Providers**: Binance supported (more coming soon)
258
- - ✅ **Visualization**: Interactive charting ==> handled in [QFChart](https://github.com/QuantForgeOrg/QFChart)
259
- - 🚧 **Caching System**: Script and market data optimization (in progress)
260
- - 🎯 **Strategy Execution**: Backtesting and live trading (planned)
237
+ stream.on('error', (err) => console.error('Stream error:', err));
238
+ ```
261
239
 
262
- > **⚠️ API Coverage**: While PineTS supports native Pine Script execution, not all Pine Script API features are implemented yet. Check the [API coverage badges](#pine-script-api-coverage) below to verify if specific functions are available. Indicators using unimplemented features will fail with descriptive error messages.
240
+ ### Custom Data Source
263
241
 
264
- ## Technical Details
242
+ ```javascript
243
+ import { PineTS } from 'pinets';
265
244
 
266
- The library uses a dual-layer transpilation system:
245
+ // Your own OHLCV data
246
+ const candles = [
247
+ { open: 100, high: 105, low: 99, close: 103, volume: 1000, openTime: 1704067200000 },
248
+ { open: 103, high: 108, low: 102, close: 107, volume: 1200, openTime: 1704153600000 },
249
+ // ... more candles
250
+ ];
267
251
 
268
- ### Pine Script Parser _(v0.7.0+, Experimental)_
252
+ const pineTS = new PineTS(candles);
269
253
 
270
- - Automatically detects Pine Script v5 and v6 code
271
- - Converts native Pine Script syntax to PineTS intermediate representation
272
- - Preserves Pine Script semantics and behavior
254
+ const { plots } = await pineTS.run(`
255
+ //@version=5
256
+ indicator("Custom Data")
257
+ plot(ta.sma(close, 10))
258
+ `);
259
+ ```
273
260
 
274
- ### Runtime Transpiler
261
+ ---
275
262
 
276
- - Transforms PineTS source (or converted Pine Script) to handle time-series data
277
- - Manages variable scoping and context
278
- - Handles array indexing and series operations
279
- - Provides Pine Script-compatible function calls
280
- - Executes in real-time without pre-compilation
281
- ==> The resulting code is a low level javascript that allows handling the complex structures and specificities of PineScript
263
+ ## API Coverage
282
264
 
283
- ### Pine Script API Coverage
265
+ PineTS aims for complete Pine Script API compatibility. Current status:
284
266
 
285
- #### Data
267
+ ### Data & Context
286
268
 
287
269
  [![syminfo](./.github/badges/api-syminfo.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/syminfo.html)
288
- [![session](./.github/badges/api-session.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/session.html)
289
- [![timeframe](./.github/badges/api-timeframe.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/timeframe.html)
290
270
  [![barstate](./.github/badges/api-barstate.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/barstate.html)
271
+ [![timeframe](./.github/badges/api-timeframe.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/timeframe.html)
291
272
  [![ticker](./.github/badges/api-ticker.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/ticker.html)
292
273
  [![builtin](./.github/badges/api-builtin.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/builtin.html)
274
+ [![session](./.github/badges/api-session.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/session.html)
293
275
 
294
- #### Calculation
276
+ ### Technical Analysis & Math
295
277
 
296
278
  [![ta](./.github/badges/api-ta.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/ta.html)
297
279
  [![math](./.github/badges/api-math.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/math.html)
280
+ [![request](./.github/badges/api-request.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/request.html)
281
+ [![input](./.github/badges/api-input.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/input.html)
282
+
283
+ ### Data Structures
284
+
298
285
  [![array](./.github/badges/api-array.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/array.html)
299
- [![map](./.github/badges/api-map.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/map.html)
300
286
  [![matrix](./.github/badges/api-matrix.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/matrix.html)
301
- [![request](./.github/badges/api-request.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/request.html)
287
+ [![map](./.github/badges/api-map.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/map.html)
302
288
  [![types](./.github/badges/api-types.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/types.html)
303
- [![strategy](./.github/badges/api-strategy.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/strategy.html)
304
- [![input](./.github/badges/api-input.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/input.html)
305
289
 
306
- #### Visualization
290
+ ### Visualization
307
291
 
308
- [![color](./.github/badges/api-color.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/color.html)
309
292
  [![plots](./.github/badges/api-plots.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/plots.html)
293
+ [![color](./.github/badges/api-color.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/color.html)
310
294
  [![chart](./.github/badges/api-chart.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/chart.html)
311
295
  [![label](./.github/badges/api-label.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/label.html)
312
296
  [![line](./.github/badges/api-line.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/line.html)
313
- [![polyline](./.github/badges/api-polyline.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/polyline.html)
314
297
  [![box](./.github/badges/api-box.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/box.html)
315
298
  [![table](./.github/badges/api-table.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/table.html)
316
299
  [![linefill](./.github/badges/api-linefill.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/linefill.html)
300
+ [![polyline](./.github/badges/api-polyline.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/polyline.html)
317
301
 
318
- #### Logging
302
+ ### Utilities
319
303
 
320
- [![log](./.github/badges/api-log.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/log.html)
321
304
  [![str](./.github/badges/api-str.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/str.html)
305
+ [![log](./.github/badges/api-log.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/log.html)
306
+ [![strategy](./.github/badges/api-strategy.svg)](https://quantforgeorg.github.io/PineTS/api-coverage/strategy.html)
307
+
308
+ > Click any badge to see detailed function-level coverage
309
+
310
+ ---
311
+
312
+ ## Documentation
313
+
314
+ - **[Full Documentation](https://quantforgeorg.github.io/PineTS/)** — Complete guides and API reference
315
+ - **[Initialization Guide](https://quantforgeorg.github.io/PineTS/initialization-and-usage/)** — Setup options and configuration
316
+ - **[Architecture Overview](https://quantforgeorg.github.io/PineTS/architecture/)** — How PineTS works internally
317
+ - **[API Coverage Details](https://quantforgeorg.github.io/PineTS/api-coverage/)** — Function-by-function compatibility
318
+
319
+ ---
320
+
321
+ ## Use Cases
322
+
323
+ **Algorithmic Trading**
324
+
325
+ - Build custom trading bots using Pine Script strategies
326
+ - Integrate indicators with your execution systems
327
+
328
+ **Backtesting**
329
+
330
+ - Test Pine Script strategies against historical data
331
+ - Export indicator values for analysis in Python/R
332
+
333
+ **Alert Systems**
334
+
335
+ - Create custom alert pipelines based on indicator signals
336
+ - Monitor multiple assets with server-side indicator calculations
337
+
338
+ **Research & Analysis**
339
+
340
+ - Process large datasets with Pine Script indicators
341
+ - Feed indicator outputs into machine learning models
342
+
343
+ **Custom Dashboards**
344
+
345
+ - Embed live indicators in web applications
346
+ - Build real-time monitoring dashboards
347
+
348
+ ---
349
+
350
+ ## Roadmap
351
+
352
+ | Status | Feature |
353
+ | ------ | ----------------------------------------- |
354
+ | ✅ | Native Pine Script v5/v6 support |
355
+ | ✅ | 60+ technical analysis functions |
356
+ | ✅ | Arrays, matrices, and maps |
357
+ | ✅ | Real-time streaming |
358
+ | ✅ | Multi-timeframe with `request.security()` |
359
+ | 🚧 | Strategy backtesting engine |
360
+ | 🚧 | Additional data providers |
361
+ | 🎯 | Pine Script v6 full compatibility |
362
+ | 🎯 | Market data Providers |
363
+ | 🎯 | Trading Connectors |
364
+
365
+ ---
366
+
367
+ ## Related Projects
368
+
369
+ - **[QFChart](https://github.com/QuantForgeOrg/QFChart)** : Charting library optimized for PineTS visualization
322
370
 
323
371
  ---
324
372
 
325
373
  ## Contributing
326
374
 
327
- Contributions are welcome! Please feel free to submit pull requests, create issues, or suggest improvements.
375
+ Contributions are welcome! Whether it's:
376
+
377
+ - Adding missing Pine Script functions
378
+ - Improving documentation
379
+ - Fixing bugs
380
+ - Suggesting features
381
+
382
+ Please feel free to open issues or submit pull requests.
383
+
384
+ ---
328
385
 
329
386
  ## License
330
387
 
331
- This project is open-source and available under the AGPL License.
388
+ AGPL-3.0 - See [LICENSE](LICENSE) for details.
332
389
 
333
- ## Disclaimer
390
+ ---
334
391
 
335
- PineTS is an independent project and is not affiliated with, endorsed by, or associated with TradingView or Pine Script. All trademarks and registered trademarks mentioned belong to their respective owners.
392
+ <p align="center">
393
+ <sub>Built with passion by <a href="https://quantforge.org">QuantForge</a></sub>
394
+ </p>