openpinescript 0.0.0-stage → 0.1.1

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.
Files changed (103) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +332 -2
  3. package/dist/cli.mjs +108691 -0
  4. package/dist/index.cjs +108670 -0
  5. package/dist/index.mjs +108624 -0
  6. package/dist/types/index.d.ts +31 -0
  7. package/dist/types/parser/v1/generated/PineV1Lexer.d.ts +66 -0
  8. package/dist/types/parser/v1/generated/PineV1Parser.d.ts +555 -0
  9. package/dist/types/parser/v1/generated/PineV1ParserVisitor.d.ts +318 -0
  10. package/dist/types/parser/v1/index.d.ts +39 -0
  11. package/dist/types/parser/v2/generated/PineV2Lexer.d.ts +67 -0
  12. package/dist/types/parser/v2/generated/PineV2Parser.d.ts +568 -0
  13. package/dist/types/parser/v2/generated/PineV2ParserVisitor.d.ts +325 -0
  14. package/dist/types/parser/v2/index.d.ts +2 -0
  15. package/dist/types/parser/v3/generated/PineV3Lexer.d.ts +67 -0
  16. package/dist/types/parser/v3/generated/PineV3Parser.d.ts +568 -0
  17. package/dist/types/parser/v3/generated/PineV3ParserVisitor.d.ts +325 -0
  18. package/dist/types/parser/v3/index.d.ts +2 -0
  19. package/dist/types/parser/v4/generated/PineV4Lexer.d.ts +86 -0
  20. package/dist/types/parser/v4/generated/PineV4Parser.d.ts +673 -0
  21. package/dist/types/parser/v4/generated/PineV4ParserVisitor.d.ts +367 -0
  22. package/dist/types/parser/v4/index.d.ts +2 -0
  23. package/dist/types/parser/v5/generated/PineV5Lexer.d.ts +95 -0
  24. package/dist/types/parser/v5/generated/PineV5Parser.d.ts +964 -0
  25. package/dist/types/parser/v5/generated/PineV5ParserVisitor.d.ts +521 -0
  26. package/dist/types/parser/v5/index.d.ts +2 -0
  27. package/dist/types/parser/v6/generated/PineV6Lexer.d.ts +98 -0
  28. package/dist/types/parser/v6/generated/PineV6Parser.d.ts +984 -0
  29. package/dist/types/parser/v6/generated/PineV6ParserVisitor.d.ts +528 -0
  30. package/dist/types/parser/v6/index.d.ts +2 -0
  31. package/dist/types/runtime/v1/Series.d.ts +61 -0
  32. package/dist/types/runtime/v1/broker/Broker.d.ts +325 -0
  33. package/dist/types/runtime/v1/broker/index.d.ts +158 -0
  34. package/dist/types/runtime/v1/broker/val.d.ts +28 -0
  35. package/dist/types/runtime/v1/constDefault.d.ts +11 -0
  36. package/dist/types/runtime/v1/context.d.ts +1705 -0
  37. package/dist/types/runtime/v1/footprint.d.ts +32 -0
  38. package/dist/types/runtime/v1/index.d.ts +7 -0
  39. package/dist/types/runtime/v1/language-spec.d.ts +12 -0
  40. package/dist/types/runtime/v1/openTrades.d.ts +12 -0
  41. package/dist/types/runtime/v1/palette.d.ts +18 -0
  42. package/dist/types/runtime/v1/session.d.ts +482 -0
  43. package/dist/types/runtime/v1/sessions.d.ts +31 -0
  44. package/dist/types/runtime/v1/stateClone.d.ts +19 -0
  45. package/dist/types/runtime/v1/stdlib/alerts.d.ts +31 -0
  46. package/dist/types/runtime/v1/stdlib/arrays.d.ts +133 -0
  47. package/dist/types/runtime/v1/stdlib/barmerge.d.ts +27 -0
  48. package/dist/types/runtime/v1/stdlib/barstate.d.ts +79 -0
  49. package/dist/types/runtime/v1/stdlib/cast.d.ts +81 -0
  50. package/dist/types/runtime/v1/stdlib/chart.d.ts +283 -0
  51. package/dist/types/runtime/v1/stdlib/color.d.ts +51 -0
  52. package/dist/types/runtime/v1/stdlib/core.d.ts +162 -0
  53. package/dist/types/runtime/v1/stdlib/dataset.d.ts +36 -0
  54. package/dist/types/runtime/v1/stdlib/display.d.ts +50 -0
  55. package/dist/types/runtime/v1/stdlib/drawings.d.ts +407 -0
  56. package/dist/types/runtime/v1/stdlib/errors.d.ts +21 -0
  57. package/dist/types/runtime/v1/stdlib/font.d.ts +20 -0
  58. package/dist/types/runtime/v1/stdlib/footprint.d.ts +76 -0
  59. package/dist/types/runtime/v1/stdlib/format.d.ts +57 -0
  60. package/dist/types/runtime/v1/stdlib/index.d.ts +71 -0
  61. package/dist/types/runtime/v1/stdlib/input.d.ts +14 -0
  62. package/dist/types/runtime/v1/stdlib/inputs.d.ts +60 -0
  63. package/dist/types/runtime/v1/stdlib/late_members.d.ts +97 -0
  64. package/dist/types/runtime/v1/stdlib/logging.d.ts +31 -0
  65. package/dist/types/runtime/v1/stdlib/maps.d.ts +55 -0
  66. package/dist/types/runtime/v1/stdlib/math.d.ts +71 -0
  67. package/dist/types/runtime/v1/stdlib/matrix.d.ts +201 -0
  68. package/dist/types/runtime/v1/stdlib/metadata.d.ts +14 -0
  69. package/dist/types/runtime/v1/stdlib/mtf.d.ts +15 -0
  70. package/dist/types/runtime/v1/stdlib/renames.d.ts +117 -0
  71. package/dist/types/runtime/v1/stdlib/renames5.d.ts +113 -0
  72. package/dist/types/runtime/v1/stdlib/renames6.d.ts +81 -0
  73. package/dist/types/runtime/v1/stdlib/request.d.ts +207 -0
  74. package/dist/types/runtime/v1/stdlib/scale.d.ts +19 -0
  75. package/dist/types/runtime/v1/stdlib/session.d.ts +113 -0
  76. package/dist/types/runtime/v1/stdlib/sort_field.d.ts +12 -0
  77. package/dist/types/runtime/v1/stdlib/sources.d.ts +24 -0
  78. package/dist/types/runtime/v1/stdlib/str.d.ts +117 -0
  79. package/dist/types/runtime/v1/stdlib/strategy.d.ts +314 -0
  80. package/dist/types/runtime/v1/stdlib/syminfo.d.ts +209 -0
  81. package/dist/types/runtime/v1/stdlib/ta.d.ts +409 -0
  82. package/dist/types/runtime/v1/stdlib/time.d.ts +158 -0
  83. package/dist/types/runtime/v1/stdlib/trades.d.ts +108 -0
  84. package/dist/types/runtime/v1/stdlib/ui.d.ts +196 -0
  85. package/dist/types/runtime/v1/stdlib/v6_members.d.ts +68 -0
  86. package/dist/types/runtime/v1/timeframes.d.ts +139 -0
  87. package/dist/types/runtime/v1/zones.d.ts +30 -0
  88. package/dist/types/transpiler/common/index.d.ts +51 -0
  89. package/dist/types/transpiler/common/libraries.d.ts +29 -0
  90. package/dist/types/transpiler/common/parseErrors.d.ts +38 -0
  91. package/dist/types/transpiler/common/passes/ScopeAnalysis.d.ts +158 -0
  92. package/dist/types/transpiler/common/passes/TypeRules.d.ts +26 -0
  93. package/dist/types/transpiler/common/profiles/index.d.ts +96 -0
  94. package/dist/types/transpiler/common/version.d.ts +40 -0
  95. package/dist/types/transpiler/v1/ToJsVisitor.d.ts +720 -0
  96. package/dist/types/transpiler/v2/ToJsVisitor.d.ts +72 -0
  97. package/dist/types/transpiler/v3/ToJsVisitor.d.ts +87 -0
  98. package/dist/types/transpiler/v4/ToJsVisitor.d.ts +263 -0
  99. package/dist/types/transpiler/v5/ToJsVisitor.d.ts +1101 -0
  100. package/dist/types/transpiler/v6/ToJsVisitor.d.ts +237 -0
  101. package/dist/types/transpiler/v6/rules.d.ts +94 -0
  102. package/dist/types/utils/v2/common.d.ts +4 -0
  103. package/package.json +92 -4
package/README.md CHANGED
@@ -1,3 +1,333 @@
1
- # Temporary Holding Version
1
+ <div align="center">
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ # OpenPineScript
4
+
5
+ ### Run TradingView Pine Script locally — offline, unlimited, and verified against TradingView itself
6
+
7
+ **Compile Pine Script to JavaScript and execute it on your own OHLCV data.**
8
+ No TradingView account. No cloud. No execution quota. No 500 ms loop timeout.
9
+
10
+ [![TradingView parity](https://img.shields.io/badge/TradingView_parity-112_columns_×_2%2C474_bars-7B3FE4?style=for-the-badge)](docs/common/CONFORMANCE.md)
11
+ [![Tests](https://img.shields.io/badge/tests-4%2C400%2B_passing-22C55E?style=for-the-badge)](docs/common/CONFORMANCE.md#testing)
12
+ [![Pine Script](https://img.shields.io/badge/Pine_Script-v1_→_v6-F97316?style=for-the-badge)](#-supported-pine-script-versions)
13
+ [![Docs](https://img.shields.io/badge/docs-be--thomas.github.io%2FOpenPineScript-0EA5E9?style=for-the-badge)](https://be-thomas.github.io/OpenPineScript/)
14
+ [![npm](https://img.shields.io/npm/v/openpinescript?style=for-the-badge&logo=npm)](https://www.npmjs.com/package/openpinescript)
15
+
16
+ [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg?style=flat-square)](LICENSE)
17
+ [![Node](https://img.shields.io/badge/node-≥20-339933.svg?style=flat-square&logo=node.js&logoColor=white)](https://nodejs.org)
18
+ [![TypeScript](https://img.shields.io/badge/TypeScript-3178C6.svg?style=flat-square&logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
19
+ [![Docs corpus](https://img.shields.io/badge/docs_corpus-741%2F763_compile-0EA5E9.svg?style=flat-square)](docs/common/CONFORMANCE.md#parity-763-real-scripts-from-tradingviews-docs)
20
+
21
+ ### [📖 Documentation and an interactive tutorial: **be-thomas.github.io/OpenPineScript**](https://be-thomas.github.io/OpenPineScript/)
22
+
23
+ ### [▶ Open Beta: try it in your browser at **zealterminal.com**](https://zealterminal.com) — no install, no CSV
24
+
25
+ [Docs](https://be-thomas.github.io/OpenPineScript/) · [Try it online](#-try-it-online) · [Quick start](#-quick-start) · [Why](#-why-openpinescript) · [Parity](#-verified-against-tradingview-itself) · [Guides](#-documentation) · [FAQ](#-faq)
26
+
27
+ </div>
28
+
29
+ ---
30
+
31
+ **OpenPineScript is an open-source Pine Script engine.** It transpiles TradingView
32
+ Pine Script (`.pine`) to JavaScript and runs it against your own candles — so you
33
+ can **backtest a Pine Script strategy offline**, run a Pine indicator in CI,
34
+ convert Pine Script to JavaScript for embedding elsewhere, or batch-test
35
+ thousands of scripts without touching a browser.
36
+
37
+ Pine Script **v1, v2, v3, v4, v5 and v6** are implemented, each with its own
38
+ grammar and its own emitter.
39
+
40
+ ```
41
+ === v4-essential-strategies-00.pine — Summary ===
42
+ Bars processed : 506
43
+ Plots recorded : 1
44
+
45
+ Performance:
46
+ Net Profit +$77.60 (+0.08%)
47
+ Total Trades 199
48
+ Win Rate 32.7% (65W / 55L)
49
+ Profit Factor 1.134
50
+ Max Drawdown 0.10%
51
+ Avg Win / Avg Loss $10.10 / $10.52
52
+ ```
53
+
54
+ <sub>One of TradingView's own documentation examples, unedited, run locally.</sub>
55
+
56
+ ---
57
+
58
+ ## 🌲 Try it online
59
+
60
+ Not everyone wants to clone a repository to find out whether an engine handles
61
+ their script. **[Zeal Terminal](https://zealterminal.com)** is a charting workspace
62
+ built on OpenPineScript — this engine, compiled to a Web Worker and running
63
+ inside the browser tab.
64
+
65
+ [![Zeal Terminal: a candlestick chart with Bollinger Bands drawn by a Pine Script v5 indicator, beside the Pine editor showing the script that drew them](https://raw.githubusercontent.com/be-thomas/OpenPineScript/main/images/common/pine-chart.png)](https://zealterminal.com)
66
+
67
+ <div align="center">
68
+
69
+ ### **[▶ Get Open Beta Access at zealterminal.com](https://zealterminal.com)**
70
+
71
+ <sub>Open beta — free, and open to anyone with a Google account.</sub>
72
+
73
+ </div>
74
+
75
+ Paste a script, press apply, and watch it draw. The engine runs on your own
76
+ machine, so there is no compile queue and no round trip to wait for — the same
77
+ properties this repository gives you at the command line, with a chart attached.
78
+
79
+ | | |
80
+ |---|---|
81
+ | 💻 **Runs in your browser** | This engine in a Web Worker. Execution is local; nothing is queued on a server. |
82
+ | 📈 **A real chart** | Multi-pane indicators, drawings, a strategy tester, execution logs and a dockable layout. |
83
+ | 🧮 **v1 → v5** | The same five grammars and emitters that are in this repository. |
84
+ | 🆓 **Open Beta, free** | Get Open Beta Access with Google, and the workspace opens. |
85
+
86
+ Zeal Terminal is a separate product and its workspace is proprietary; **the engine
87
+ underneath it is this repository, GPL-3 and public**, so the arithmetic behind
88
+ any backtest it shows you can be read here rather than taken on trust.
89
+
90
+ <sub>Screenshot: Bollinger Bands drawn from the Pine source beside it, on sample data.</sub>
91
+
92
+ ---
93
+
94
+ ## ⚡ Quick start
95
+
96
+ Run any Pine script against a CSV of bars, with nothing to install (Node.js 20 or newer):
97
+
98
+ ```bash
99
+ npx openpinescript my_script.pine --data candles.csv
100
+ ```
101
+
102
+ Use the engine from JavaScript:
103
+
104
+ ```bash
105
+ npm install openpinescript
106
+ ```
107
+
108
+ ```js
109
+ import { Session } from "openpinescript";
110
+ ```
111
+
112
+ ![OpenPineScript REPL evaluating Pine Script expressions in a terminal session](https://raw.githubusercontent.com/be-thomas/OpenPineScript/main/images/common/repl-1.png)
113
+
114
+ ---
115
+
116
+ ## 🎯 Why OpenPineScript
117
+
118
+ | | |
119
+ |---|---|
120
+ | 📊 **Numbers you can trust** | 112 indicator, control-flow and broker columns matched **bar for bar** against TradingView's own output. Not against a spec — against the platform. |
121
+ | 🔌 **Completely offline** | Your data, your machine, your loop budget. No account, no quota, no rate limit, no network. |
122
+ | 🗂️ **Six language versions** | v1 → v6, each with its own grammar and emitter, so a v2 script is parsed by a parser that has never heard of `var`. |
123
+ | 🔁 **Pine → JavaScript** | Emit readable JS and embed it anywhere — a worker, a server, a browser, a CI job. |
124
+ | 🤖 **Built for automation** | JSON output, exit codes, input overrides, and a comparison mode that diffs your run against a TradingView export. |
125
+ | 🧪 **4,400+ tests** | Differential testing against an independent oracle, a full version matrix, 763 real scripts from TradingView's docs, and the parity suites above. |
126
+
127
+ ---
128
+
129
+ ## 🎖️ Verified against TradingView itself
130
+
131
+ Most engines are tested against a specification or a reference implementation.
132
+ Neither catches an indicator that is subtly and **consistently** wrong.
133
+
134
+ So nine harness scripts were run **inside TradingView**, their per-bar output
135
+ copied back out, and replayed here against the same candles:
136
+
137
+ <div align="center">
138
+
139
+ ### **112 columns · ~2,474 bars each · tolerance 1e-6 · all agree**
140
+
141
+ </div>
142
+
143
+ A further **38 indicators** are anchored to values TradingView's own screener
144
+ computed, from a frozen fixture that runs unattended on every commit.
145
+
146
+ This process found **eleven defects** that every other kind of test had missed —
147
+ including a Parabolic SAR that was the textbook algorithm rather than
148
+ TradingView's, market orders filling a bar early at the wrong price, and a VWAP
149
+ that never reset at session boundaries.
150
+
151
+ > 📖 **[Read the full conformance report →](docs/common/CONFORMANCE.md)**
152
+ > Every harness, every defect, how the data is collected — and an honest account
153
+ > of [what is *not* covered yet](docs/common/CONFORMANCE.md#what-is-not-covered).
154
+
155
+ ---
156
+
157
+ ## 🗂️ Supported Pine Script versions
158
+
159
+ The `//@version` annotation selects the language version; a script without one is v1.
160
+
161
+ | Version | State | What it adds |
162
+ |---------|-------|--------------|
163
+ | **v1** | ✅ Implemented | The base language |
164
+ | **v2** | ✅ Implemented | `:=` |
165
+ | **v3** | ✅ Implemented | A five-item tightening of v2 |
166
+ | **v4** | ✅ Implemented | `var` / `varip`, arrays, drawing objects, the namespace migration |
167
+ | **v5** | ✅ Implemented | `while`, `switch`, user-defined types, methods, libraries, matrices, maps, Pine Logs, the `ta.*` / `math.*` / `str.*` migration |
168
+ | **v6** | ✅ Implemented | The migration guide's rules — strict bools, lazy `and`/`or`, dynamic `for` bounds, negative array indices, margin enforcement, `strategy.exit()` parameter pairs — plus `once`, multiline strings, `request.footprint()`, text formatting, library constants and `sort_field` |
169
+
170
+ Roughly **270 standard-library names** are implemented, along with the strategy
171
+ broker emulator, multi-timeframe `security()`, and the real-time tick model.
172
+
173
+ ---
174
+
175
+ ## 🛠️ What you can build with it
176
+
177
+ - **Backtest Pine Script strategies offline** on years of your own data, with no execution cap
178
+ - **Run indicators in CI** and fail a build when a signal changes
179
+ - **Convert Pine Script to JavaScript** and embed it in a product
180
+ - **Batch-screen thousands of scripts** in parallel
181
+ - **Diff against TradingView** with `--compare-dir` to measure agreement on your own script
182
+ - **Put it behind a chart** — [zealterminal.com](https://zealterminal.com) is this engine in a browser tab, in open beta, if you want to see that shape working before you build it
183
+
184
+ ```bash
185
+ npx openpinescript strategy.pine --data data.csv --out-dir ./results
186
+ ```
187
+
188
+ > 📖 **[Full CLI reference →](CLI-Usage.md)** — output flags, comparison mode,
189
+ > input overrides, structured output, debug flags.
190
+
191
+ ---
192
+
193
+ ## 📚 Documentation
194
+
195
+ | Doc | What it answers |
196
+ |---|---|
197
+ | **[Docs site](https://be-thomas.github.io/OpenPineScript/)** | The CLI guide, a five-lesson tutorial that runs the real engine in your browser, and a guide written for AI agents |
198
+ | **[Conformance report](docs/common/CONFORMANCE.md)** | How the numbers are verified, what that caught, what is not covered |
199
+ | **[CLI usage](CLI-Usage.md)** | Every flag, with worked examples |
200
+ | **[Architecture](docs/common/ARCHITECTURE.md)** | The compile pipeline and the repository layout |
201
+ | **[Golden-data recipe](conformance/common/golden.md)** | How to collect a new TradingView export |
202
+ | **[Integration guide](docs/common/integration/README.md)** | Embedding the engine in a charting UI: plotting, strategies, live ticks |
203
+ | **[Pine versions](docs/common/VERSIONS.md)** | What each version, v1 to v6, changes and where the engine implements it |
204
+ | **[Deliberate omissions](docs/common/CONFORMANCE.md#restrictions-the-engine-does-not-enforce)** | The TradingView limits and checks the engine does not apply |
205
+
206
+ ---
207
+
208
+ ## ❓ FAQ
209
+
210
+ <details>
211
+ <summary><b>Is there a chart? Can I see a script actually draw?</b></summary>
212
+ <br>
213
+
214
+ Yes — at **[zealterminal.com](https://zealterminal.com)**. Zeal Terminal is a charting
215
+ workspace that runs this engine in a Web Worker in your browser: paste a script,
216
+ press apply, and it draws. Nothing to install and no CSV to find.
217
+
218
+ The workspace itself is a separate, proprietary product. The engine underneath
219
+ it is this repository, GPL-3 and public.
220
+ </details>
221
+
222
+ <details>
223
+ <summary><b>Can I run Pine Script without a TradingView account?</b></summary>
224
+ <br>
225
+
226
+ Yes. That is the point of the project. OpenPineScript compiles and executes Pine
227
+ Script entirely on your machine, against CSV data you supply. Nothing is sent
228
+ anywhere and no account is involved.
229
+ </details>
230
+
231
+ <details>
232
+ <summary><b>Does it support Pine Script v5?</b></summary>
233
+ <br>
234
+
235
+ Yes — v5 is implemented, including user-defined types, methods, libraries,
236
+ `while`, `switch`, matrices, maps, enums and Pine Logs, along with the `ta.*`,
237
+ `math.*`, `str.*` and `request.*` namespace migration. v1 through v4 are
238
+ implemented too.
239
+ </details>
240
+
241
+ <details>
242
+ <summary><b>Does it support Pine Script v6?</b></summary>
243
+ <br>
244
+
245
+ Yes. v6 has its own grammar and emitter, inheriting from v5's, so adding it did
246
+ not change what any v1–v5 script compiles to. It covers TradingView's v6
247
+ migration guide and the release notes through September 2026.
248
+
249
+ One caveat worth knowing before relying on v6 strategy numbers: the v1–v5
250
+ broker columns are matched against TradingView's own output, and v6's are not
251
+ yet. v6 changes the broker — `strategy.exit()` takes whichever paired level
252
+ triggers first, and margin is enforced by default — and those rules are
253
+ implemented from TradingView's documentation without captured fixtures to check
254
+ them against. The same goes for `request.footprint()`'s Value Area and
255
+ imbalance rules, which the documentation leaves partly unstated.
256
+ </details>
257
+
258
+ <details>
259
+ <summary><b>Will results match TradingView exactly?</b></summary>
260
+ <br>
261
+
262
+ Where it has been measured, yes. 112 columns are compared bar for bar against
263
+ output collected from TradingView, at a relative tolerance of 1e-6, and all of
264
+ them agree. That covers roughly a tenth of the standard library, concentrated in
265
+ `ta.*`, `math.*` and `strategy.*` — the
266
+ [conformance report](docs/common/CONFORMANCE.md#what-is-not-covered) says plainly what
267
+ is not covered.
268
+
269
+ To measure it on *your* script, use `--compare-dir` against a TradingView export.
270
+ </details>
271
+
272
+ <details>
273
+ <summary><b>Can I use it to backtest a strategy?</b></summary>
274
+ <br>
275
+
276
+ Yes. `strategy()` scripts run against a broker emulator that models order
277
+ timing, fill prices, gaps, tick rounding and brackets the way TradingView's
278
+ does — each of those rules measured against TradingView's own backtest output
279
+ rather than assumed.
280
+ </details>
281
+
282
+ <details>
283
+ <summary><b>Is it a Pine Script interpreter or a compiler?</b></summary>
284
+ <br>
285
+
286
+ A compiler. Pine source is parsed by an ANTLR-generated parser into a syntax
287
+ tree, and a version-specific visitor emits JavaScript, which is then executed
288
+ bar by bar against a runtime that provides the standard library.
289
+ </details>
290
+
291
+ <details>
292
+ <summary><b>How do I convert Pine Script to JavaScript?</b></summary>
293
+ <br>
294
+
295
+ `npx openpinescript script.pine --data data.csv --show-transpiled` prints the
296
+ compiled JavaScript before running it, or call `compileScript(src)` from the
297
+ library (`import { compileScript } from "openpinescript"`) to get it as a string.
298
+ </details>
299
+
300
+ ---
301
+
302
+ ## 🤝 Contributing
303
+
304
+ The core is developed by a single author and pull requests are not being
305
+ accepted, but **bug reports and feature requests drive the roadmap**. See
306
+ [CONTRIBUTING.md](CONTRIBUTING.md), the [Code of Conduct](CODE_OF_CONDUCT.md),
307
+ and the [Security Policy](SECURITY.md).
308
+
309
+ Writing a golden-data harness is the single highest-value contribution to the
310
+ project — the [recipe is here](conformance/common/golden.md).
311
+
312
+ ## 📄 License
313
+
314
+ GNU GPL-3.0. See [LICENSE](LICENSE).
315
+
316
+ The Pine Script language and TradingView are trademarks of TradingView, Inc.
317
+ This project is not affiliated with or endorsed by TradingView. The examples in
318
+ [`examples/<version>/tradingview-docs/`](examples/common/tradingview-docs/README.md)
319
+ are © TradingView, reproduced verbatim for interoperability testing and not
320
+ covered by the licence above.
321
+
322
+ ---
323
+
324
+ <div align="center">
325
+
326
+ **If this saved you a TradingView quota, a ⭐ helps others find it.**
327
+
328
+ <sub>Keywords: Pine Script, TradingView, Pine Script v5, Pine Script v4, Pine Script compiler,
329
+ Pine Script interpreter, Pine to JavaScript, run Pine Script locally, offline backtesting,
330
+ Pine Script backtest, algorithmic trading, technical analysis library, ANTLR, TypeScript,
331
+ open source trading, trading indicator engine.</sub>
332
+
333
+ </div>