oakscriptjs 0.23.0 → 0.25.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.
Files changed (310) hide show
  1. package/README.md +25 -1
  2. package/bin/oakscript.mjs +10 -3
  3. package/dist/cjs/box/index.d.ts +348 -289
  4. package/dist/cjs/box/index.d.ts.map +1 -1
  5. package/dist/cjs/box/index.js.map +2 -2
  6. package/dist/cjs/check/node.d.ts.map +1 -1
  7. package/dist/cjs/check/node.js +1 -0
  8. package/dist/cjs/check/node.js.map +2 -2
  9. package/dist/cjs/check/preview.d.ts +31 -0
  10. package/dist/cjs/check/preview.d.ts.map +1 -0
  11. package/dist/cjs/check/preview.js +303 -0
  12. package/dist/cjs/check/preview.js.map +7 -0
  13. package/dist/cjs/color/index.d.ts +11 -11
  14. package/dist/cjs/color/index.js.map +1 -1
  15. package/dist/cjs/color/parse.d.ts +2 -0
  16. package/dist/cjs/color/parse.d.ts.map +1 -1
  17. package/dist/cjs/color/parse.js +6 -0
  18. package/dist/cjs/color/parse.js.map +2 -2
  19. package/dist/cjs/compare/index.d.ts +76 -12
  20. package/dist/cjs/compare/index.d.ts.map +1 -1
  21. package/dist/cjs/compare/index.js.map +2 -2
  22. package/dist/cjs/drawing/registry.d.ts +28 -5
  23. package/dist/cjs/drawing/registry.d.ts.map +1 -1
  24. package/dist/cjs/drawing/registry.js +14 -0
  25. package/dist/cjs/drawing/registry.js.map +2 -2
  26. package/dist/cjs/index.d.ts +1 -1
  27. package/dist/cjs/index.js +1 -1
  28. package/dist/cjs/index.js.map +1 -1
  29. package/dist/cjs/label/index.d.ts +265 -187
  30. package/dist/cjs/label/index.d.ts.map +1 -1
  31. package/dist/cjs/label/index.js +1 -1
  32. package/dist/cjs/label/index.js.map +2 -2
  33. package/dist/cjs/line/index.d.ts +247 -207
  34. package/dist/cjs/line/index.d.ts.map +1 -1
  35. package/dist/cjs/line/index.js.map +2 -2
  36. package/dist/cjs/linefill/index.d.ts +61 -89
  37. package/dist/cjs/linefill/index.d.ts.map +1 -1
  38. package/dist/cjs/linefill/index.js.map +2 -2
  39. package/dist/cjs/math/index.d.ts +49 -40
  40. package/dist/cjs/math/index.d.ts.map +1 -1
  41. package/dist/cjs/math/index.js.map +2 -2
  42. package/dist/cjs/polyline/index.d.ts +57 -78
  43. package/dist/cjs/polyline/index.d.ts.map +1 -1
  44. package/dist/cjs/polyline/index.js.map +2 -2
  45. package/dist/cjs/runtime/input-active.d.ts +2 -2
  46. package/dist/cjs/runtime/input-active.js.map +1 -1
  47. package/dist/cjs/runtime/series.d.ts +241 -161
  48. package/dist/cjs/runtime/series.d.ts.map +1 -1
  49. package/dist/cjs/runtime/series.js +223 -127
  50. package/dist/cjs/runtime/series.js.map +2 -2
  51. package/dist/cjs/script/api/alert.d.ts +37 -0
  52. package/dist/cjs/script/api/alert.d.ts.map +1 -0
  53. package/dist/cjs/script/api/alert.js +17 -0
  54. package/dist/cjs/script/api/alert.js.map +7 -0
  55. package/dist/cjs/script/api/calc.d.ts +232 -0
  56. package/dist/cjs/script/api/calc.d.ts.map +1 -0
  57. package/dist/cjs/script/api/calc.js +17 -0
  58. package/dist/cjs/script/api/calc.js.map +7 -0
  59. package/dist/cjs/script/api/color.d.ts +213 -0
  60. package/dist/cjs/script/api/color.d.ts.map +1 -0
  61. package/dist/cjs/script/api/color.js +17 -0
  62. package/dist/cjs/script/api/color.js.map +7 -0
  63. package/dist/cjs/script/api/context.d.ts +764 -0
  64. package/dist/cjs/script/api/context.d.ts.map +1 -0
  65. package/dist/cjs/script/api/context.js +17 -0
  66. package/dist/cjs/script/api/context.js.map +7 -0
  67. package/dist/cjs/script/api/log.d.ts +58 -0
  68. package/dist/cjs/script/api/log.d.ts.map +1 -0
  69. package/dist/cjs/script/api/log.js +17 -0
  70. package/dist/cjs/script/api/log.js.map +7 -0
  71. package/dist/cjs/script/api/strategy.d.ts +391 -0
  72. package/dist/cjs/script/api/strategy.d.ts.map +1 -0
  73. package/dist/cjs/script/api/strategy.js +17 -0
  74. package/dist/cjs/script/api/strategy.js.map +7 -0
  75. package/dist/cjs/script/api/ta.d.ts +1012 -0
  76. package/dist/cjs/script/api/ta.d.ts.map +1 -0
  77. package/dist/cjs/script/api/ta.js +17 -0
  78. package/dist/cjs/script/api/ta.js.map +7 -0
  79. package/dist/cjs/script/api/table.d.ts +479 -0
  80. package/dist/cjs/script/api/table.d.ts.map +1 -0
  81. package/dist/cjs/script/api/table.js +17 -0
  82. package/dist/cjs/script/api/table.js.map +7 -0
  83. package/dist/cjs/script/constants.d.ts +228 -83
  84. package/dist/cjs/script/constants.d.ts.map +1 -1
  85. package/dist/cjs/script/constants.js +87 -0
  86. package/dist/cjs/script/constants.js.map +2 -2
  87. package/dist/cjs/script/define.d.ts +94 -0
  88. package/dist/cjs/script/define.d.ts.map +1 -0
  89. package/dist/cjs/script/define.js +127 -0
  90. package/dist/cjs/script/define.js.map +7 -0
  91. package/dist/cjs/script/drawing-args.d.ts.map +1 -1
  92. package/dist/cjs/script/drawing-args.js +1 -1
  93. package/dist/cjs/script/drawing-args.js.map +2 -2
  94. package/dist/cjs/script/formula.d.ts +53 -0
  95. package/dist/cjs/script/formula.d.ts.map +1 -0
  96. package/dist/cjs/script/formula.js +402 -0
  97. package/dist/cjs/script/formula.js.map +7 -0
  98. package/dist/cjs/script/globals.d.ts +10 -0
  99. package/dist/cjs/script/globals.d.ts.map +1 -1
  100. package/dist/cjs/script/globals.js.map +1 -1
  101. package/dist/cjs/script/index.d.ts +1065 -1006
  102. package/dist/cjs/script/index.d.ts.map +1 -1
  103. package/dist/cjs/script/index.js +532 -61
  104. package/dist/cjs/script/index.js.map +3 -3
  105. package/dist/cjs/script/json.d.ts +117 -0
  106. package/dist/cjs/script/json.d.ts.map +1 -0
  107. package/dist/cjs/script/json.js +321 -0
  108. package/dist/cjs/script/json.js.map +7 -0
  109. package/dist/cjs/security/other.d.ts +8 -3
  110. package/dist/cjs/security/other.d.ts.map +1 -1
  111. package/dist/cjs/security/other.js +23 -6
  112. package/dist/cjs/security/other.js.map +2 -2
  113. package/dist/cjs/str/index.d.ts +50 -75
  114. package/dist/cjs/str/index.d.ts.map +1 -1
  115. package/dist/cjs/str/index.js +2 -2
  116. package/dist/cjs/str/index.js.map +2 -2
  117. package/dist/cjs/strategy/index.d.ts +102 -1
  118. package/dist/cjs/strategy/index.d.ts.map +1 -1
  119. package/dist/cjs/strategy/index.js.map +2 -2
  120. package/dist/cjs/table/index.d.ts +330 -49
  121. package/dist/cjs/table/index.d.ts.map +1 -1
  122. package/dist/cjs/table/index.js +55 -27
  123. package/dist/cjs/table/index.js.map +2 -2
  124. package/dist/cjs/text/index.d.ts +12 -14
  125. package/dist/cjs/text/index.d.ts.map +1 -1
  126. package/dist/cjs/text/index.js.map +2 -2
  127. package/dist/cjs/types/index.d.ts +15 -8
  128. package/dist/cjs/types/index.d.ts.map +1 -1
  129. package/dist/cjs/types/index.js +12 -3
  130. package/dist/cjs/types/index.js.map +2 -2
  131. package/dist/esm/box/index.d.ts +348 -289
  132. package/dist/esm/box/index.d.ts.map +1 -1
  133. package/dist/esm/box/index.js +276 -276
  134. package/dist/esm/box/index.js.map +1 -1
  135. package/dist/esm/check/node.d.ts.map +1 -1
  136. package/dist/esm/check/node.js +1 -0
  137. package/dist/esm/check/node.js.map +1 -1
  138. package/dist/esm/check/preview.d.ts +31 -0
  139. package/dist/esm/check/preview.d.ts.map +1 -0
  140. package/dist/esm/check/preview.js +296 -0
  141. package/dist/esm/check/preview.js.map +1 -0
  142. package/dist/esm/color/index.d.ts +11 -11
  143. package/dist/esm/color/index.js +11 -11
  144. package/dist/esm/color/parse.d.ts +2 -0
  145. package/dist/esm/color/parse.d.ts.map +1 -1
  146. package/dist/esm/color/parse.js +7 -0
  147. package/dist/esm/color/parse.js.map +1 -1
  148. package/dist/esm/compare/index.d.ts +76 -12
  149. package/dist/esm/compare/index.d.ts.map +1 -1
  150. package/dist/esm/compare/index.js +76 -12
  151. package/dist/esm/compare/index.js.map +1 -1
  152. package/dist/esm/drawing/registry.d.ts +28 -5
  153. package/dist/esm/drawing/registry.d.ts.map +1 -1
  154. package/dist/esm/drawing/registry.js +39 -3
  155. package/dist/esm/drawing/registry.js.map +1 -1
  156. package/dist/esm/index.d.ts +1 -1
  157. package/dist/esm/index.js +1 -1
  158. package/dist/esm/label/index.d.ts +265 -187
  159. package/dist/esm/label/index.d.ts.map +1 -1
  160. package/dist/esm/label/index.js +207 -177
  161. package/dist/esm/label/index.js.map +1 -1
  162. package/dist/esm/line/index.d.ts +247 -207
  163. package/dist/esm/line/index.d.ts.map +1 -1
  164. package/dist/esm/line/index.js +202 -194
  165. package/dist/esm/line/index.js.map +1 -1
  166. package/dist/esm/linefill/index.d.ts +61 -89
  167. package/dist/esm/linefill/index.d.ts.map +1 -1
  168. package/dist/esm/linefill/index.js +61 -89
  169. package/dist/esm/linefill/index.js.map +1 -1
  170. package/dist/esm/math/index.d.ts +49 -40
  171. package/dist/esm/math/index.d.ts.map +1 -1
  172. package/dist/esm/math/index.js +22 -9
  173. package/dist/esm/math/index.js.map +1 -1
  174. package/dist/esm/polyline/index.d.ts +57 -78
  175. package/dist/esm/polyline/index.d.ts.map +1 -1
  176. package/dist/esm/polyline/index.js +57 -78
  177. package/dist/esm/polyline/index.js.map +1 -1
  178. package/dist/esm/runtime/input-active.d.ts +2 -2
  179. package/dist/esm/runtime/input-active.js +2 -2
  180. package/dist/esm/runtime/series.d.ts +241 -161
  181. package/dist/esm/runtime/series.d.ts.map +1 -1
  182. package/dist/esm/runtime/series.js +241 -161
  183. package/dist/esm/runtime/series.js.map +1 -1
  184. package/dist/esm/script/api/alert.d.ts +37 -0
  185. package/dist/esm/script/api/alert.d.ts.map +1 -0
  186. package/dist/esm/script/api/alert.js +7 -0
  187. package/dist/esm/script/api/alert.js.map +1 -0
  188. package/dist/esm/script/api/calc.d.ts +232 -0
  189. package/dist/esm/script/api/calc.d.ts.map +1 -0
  190. package/dist/esm/script/api/calc.js +6 -0
  191. package/dist/esm/script/api/calc.js.map +1 -0
  192. package/dist/esm/script/api/color.d.ts +213 -0
  193. package/dist/esm/script/api/color.d.ts.map +1 -0
  194. package/dist/esm/script/api/color.js +6 -0
  195. package/dist/esm/script/api/color.js.map +1 -0
  196. package/dist/esm/script/api/context.d.ts +764 -0
  197. package/dist/esm/script/api/context.d.ts.map +1 -0
  198. package/dist/esm/script/api/context.js +7 -0
  199. package/dist/esm/script/api/context.js.map +1 -0
  200. package/dist/esm/script/api/log.d.ts +58 -0
  201. package/dist/esm/script/api/log.d.ts.map +1 -0
  202. package/dist/esm/script/api/log.js +6 -0
  203. package/dist/esm/script/api/log.js.map +1 -0
  204. package/dist/esm/script/api/strategy.d.ts +391 -0
  205. package/dist/esm/script/api/strategy.d.ts.map +1 -0
  206. package/dist/esm/script/api/strategy.js +7 -0
  207. package/dist/esm/script/api/strategy.js.map +1 -0
  208. package/dist/esm/script/api/ta.d.ts +1012 -0
  209. package/dist/esm/script/api/ta.d.ts.map +1 -0
  210. package/dist/esm/script/api/ta.js +6 -0
  211. package/dist/esm/script/api/ta.js.map +1 -0
  212. package/dist/esm/script/api/table.d.ts +479 -0
  213. package/dist/esm/script/api/table.d.ts.map +1 -0
  214. package/dist/esm/script/api/table.js +7 -0
  215. package/dist/esm/script/api/table.js.map +1 -0
  216. package/dist/esm/script/constants.d.ts +228 -83
  217. package/dist/esm/script/constants.d.ts.map +1 -1
  218. package/dist/esm/script/constants.js +110 -24
  219. package/dist/esm/script/constants.js.map +1 -1
  220. package/dist/esm/script/define.d.ts +94 -0
  221. package/dist/esm/script/define.d.ts.map +1 -0
  222. package/dist/esm/script/define.js +136 -0
  223. package/dist/esm/script/define.js.map +1 -0
  224. package/dist/esm/script/drawing-args.d.ts.map +1 -1
  225. package/dist/esm/script/drawing-args.js +2 -1
  226. package/dist/esm/script/drawing-args.js.map +1 -1
  227. package/dist/esm/script/formula.d.ts +53 -0
  228. package/dist/esm/script/formula.d.ts.map +1 -0
  229. package/dist/esm/script/formula.js +408 -0
  230. package/dist/esm/script/formula.js.map +1 -0
  231. package/dist/esm/script/globals.d.ts +10 -0
  232. package/dist/esm/script/globals.d.ts.map +1 -1
  233. package/dist/esm/script/globals.js.map +1 -1
  234. package/dist/esm/script/index.d.ts +1065 -1006
  235. package/dist/esm/script/index.d.ts.map +1 -1
  236. package/dist/esm/script/index.js +1099 -153
  237. package/dist/esm/script/index.js.map +1 -1
  238. package/dist/esm/script/json.d.ts +117 -0
  239. package/dist/esm/script/json.d.ts.map +1 -0
  240. package/dist/esm/script/json.js +375 -0
  241. package/dist/esm/script/json.js.map +1 -0
  242. package/dist/esm/security/other.d.ts +8 -3
  243. package/dist/esm/security/other.d.ts.map +1 -1
  244. package/dist/esm/security/other.js +45 -10
  245. package/dist/esm/security/other.js.map +1 -1
  246. package/dist/esm/str/index.d.ts +50 -75
  247. package/dist/esm/str/index.d.ts.map +1 -1
  248. package/dist/esm/str/index.js +51 -76
  249. package/dist/esm/str/index.js.map +1 -1
  250. package/dist/esm/strategy/index.d.ts +102 -1
  251. package/dist/esm/strategy/index.d.ts.map +1 -1
  252. package/dist/esm/strategy/index.js +1 -1
  253. package/dist/esm/strategy/index.js.map +1 -1
  254. package/dist/esm/table/index.d.ts +330 -49
  255. package/dist/esm/table/index.d.ts.map +1 -1
  256. package/dist/esm/table/index.js +372 -61
  257. package/dist/esm/table/index.js.map +1 -1
  258. package/dist/esm/text/index.d.ts +12 -14
  259. package/dist/esm/text/index.d.ts.map +1 -1
  260. package/dist/esm/text/index.js +12 -14
  261. package/dist/esm/text/index.js.map +1 -1
  262. package/dist/esm/types/index.d.ts +15 -8
  263. package/dist/esm/types/index.d.ts.map +1 -1
  264. package/dist/esm/types/index.js +15 -8
  265. package/dist/esm/types/index.js.map +1 -1
  266. package/docs/first-indicator.md +152 -0
  267. package/docs/guide.md +1185 -0
  268. package/docs/inventory.md +772 -0
  269. package/docs/no-code.md +207 -0
  270. package/docs/recipes.md +202 -0
  271. package/package.json +2 -1
  272. package/skills/oakscript/SKILL.md +8 -0
  273. package/skills/oakscript/reference/errors.md +3 -2
  274. package/skills/oakscript/reference/timeframes-symbols.md +4 -0
  275. package/src/box/index.ts +348 -289
  276. package/src/check/node.ts +1 -0
  277. package/src/check/preview.ts +307 -0
  278. package/src/color/index.ts +11 -11
  279. package/src/color/parse.ts +7 -0
  280. package/src/compare/index.ts +76 -12
  281. package/src/drawing/registry.ts +44 -5
  282. package/src/index.ts +1 -1
  283. package/src/label/index.ts +267 -189
  284. package/src/line/index.ts +248 -208
  285. package/src/linefill/index.ts +61 -89
  286. package/src/math/index.ts +51 -42
  287. package/src/polyline/index.ts +57 -78
  288. package/src/runtime/input-active.ts +2 -2
  289. package/src/runtime/series.ts +243 -163
  290. package/src/script/api/alert.ts +43 -0
  291. package/src/script/api/calc.ts +250 -0
  292. package/src/script/api/color.ts +245 -0
  293. package/src/script/api/context.ts +944 -0
  294. package/src/script/api/log.ts +60 -0
  295. package/src/script/api/strategy.ts +410 -0
  296. package/src/script/api/ta.ts +1115 -0
  297. package/src/script/api/table.ts +538 -0
  298. package/src/script/constants.ts +229 -25
  299. package/src/script/define.ts +221 -0
  300. package/src/script/drawing-args.ts +2 -1
  301. package/src/script/formula.ts +438 -0
  302. package/src/script/globals.ts +10 -0
  303. package/src/script/index.ts +1520 -241
  304. package/src/script/json.ts +457 -0
  305. package/src/security/other.ts +43 -9
  306. package/src/str/index.ts +51 -76
  307. package/src/strategy/index.ts +102 -1
  308. package/src/table/index.ts +388 -62
  309. package/src/text/index.ts +12 -14
  310. package/src/types/index.ts +15 -8
@@ -9,11 +9,8 @@ import type { Bar } from '../types/index.js';
9
9
  */
10
10
  export type SeriesExtractor = (bar: Bar, index: number, data: Bar[]) => number;
11
11
  /**
12
- * BarData - Versioned wrapper around Bar[] array for cache invalidation
13
- *
14
- * This class wraps a Bar[] array and tracks a version number that increments
15
- * whenever the data is mutated. Series objects reference this to detect when
16
- * their cached values need to be recomputed.
12
+ * Host-side: an array of bars with a version number that grows on every change, so the Series made on it know when
13
+ * their cached values are stale. Scripts do not use it: their Series are made on the chart's bars.
17
14
  *
18
15
  * @example
19
16
  * ```typescript
@@ -92,35 +89,6 @@ export declare class BarData {
92
89
  */
93
90
  static from(bars: Bar[]): BarData;
94
91
  }
95
- /**
96
- * Series - represents a time-series of values with lazy evaluation
97
- *
98
- * Series are lazy - they don't compute values until needed.
99
- * Operations on Series return new Series with composed extractors.
100
- *
101
- * Now supports automatic cache invalidation via BarData versioning
102
- * and memory-efficient closure chain breaking via materialize().
103
- *
104
- * @example
105
- * ```typescript
106
- * // Basic usage (backward compatible)
107
- * const close = Series.fromBars(bars, 'close');
108
- * const open = Series.fromBars(bars, 'open');
109
- * const range = close.sub(open); // Creates new Series, doesn't compute yet
110
- * const values = range.toArray(); // Now computes for all bars
111
- *
112
- * // With automatic cache invalidation
113
- * const barData = new BarData(bars);
114
- * const close = Series.fromBars(barData, 'close');
115
- * const values1 = close.toArray(); // Computes and caches
116
- * barData.push(newBar); // Version increments
117
- * const values2 = close.toArray(); // Detects stale cache, recomputes
118
- *
119
- * // Breaking closure chains for memory efficiency
120
- * const complex = a.add(b).mul(c).div(d).sub(e);
121
- * const materialized = complex.materialize(); // Breaks closure chain
122
- * ```
123
- */
124
92
  /** Largest history reference of a script series (PineScript max_bars_back limit). */
125
93
  export declare const MAX_BARS_BACK = 5000;
126
94
  /** PineScript's runtime error RE10008 text. */
@@ -141,206 +109,300 @@ export interface SeriesRunHooks {
141
109
  }
142
110
  /** @internal */
143
111
  export declare function setSeriesRunHooks(hooks: SeriesRunHooks | null): void;
112
+ /**
113
+ * A series: one number per bar, oldest bar first, NaN where the value is missing (na). `close`, `open`, `high`,
114
+ * `low`, `volume`, the `ta.*` results and `input.source()` are Series.
115
+ *
116
+ * JavaScript operators do not work on a Series (`close - open` throws): use its methods, which work on all the bars
117
+ * at once and return a new Series. The other operand can be a Series or a plain number. Comparisons and logic give
118
+ * a Series of 1 (true) and 0 (false). Inside `eachBar()`, read the number of the current bar with `c.get(series)`.
119
+ * Values are computed when first read, then kept.
120
+ *
121
+ * @example
122
+ * ```js
123
+ * const body = close.sub(open);
124
+ * const up = close.gt(open);
125
+ * plot(up.iff(body, body.neg()), "Body size");
126
+ * ```
127
+ */
144
128
  export declare class Series {
145
129
  private extractor;
146
130
  private dataSource;
147
131
  private cached;
148
132
  private cachedVersion;
149
133
  /**
150
- * Create a new Series
151
- *
152
- * @param data - Bar data (Bar[] or BarData)
153
- * @param extractor - Function to extract/compute value for each bar
154
- */
155
- /**
156
- * True for PineScript's built-in price variables (open, high, low, close, volume, hl2...): their history covers
157
- * every bar, so references further than 5000 bars back are allowed (measured: close[bar_index] runs).
134
+ * True for the built-in price series (`open`, `high`, `low`, `close`, `volume`, `hl2`...): their history covers
135
+ * every bar, so `offset()` may reach further than 5000 bars back.
158
136
  */
159
137
  fullHistory: boolean;
160
- constructor(data: Bar[] | BarData, extractor: SeriesExtractor);
161
138
  /**
162
- * Get the underlying bar data
163
- * @returns Bar array
139
+ * Makes a Series that computes its value on each bar with a function. Scripts rarely need it: Series come from the
140
+ * builtins, `ta.*` and the Series methods.
141
+ * @param data - The bars the series is aligned to (an array of bars, or a {@link BarData}).
142
+ * @param extractor - Gives the value of bar `index`: `(bar, index, bars) => number`; NaN for na.
143
+ * @example
144
+ * ```js
145
+ * const range = new Series(close.bars, (bar) => bar.high - bar.low);
146
+ * ```
164
147
  */
148
+ constructor(data: Bar[] | BarData, extractor: SeriesExtractor);
149
+ /** The bars this series is aligned to (`{ time, open, high, low, close, volume }`, oldest first). */
165
150
  get bars(): Bar[];
166
- /**
167
- * Get the underlying BarData source
168
- * @returns BarData instance
169
- */
151
+ /** The {@link BarData} holding the bars this series is aligned to. */
170
152
  get barData(): BarData;
171
153
  /**
172
- * Create Series from bar data by extracting a specific field
173
- * @param bars - Bar data (Bar[] or BarData)
174
- * @param field - Field to extract ('open', 'high', 'low', 'close', 'volume')
175
- * @returns Series with extracted field values
154
+ * Makes the Series of one field of the bars (the price series). In a script, use the globals `open`, `high`, `low`,
155
+ * `close`, `volume` instead.
156
+ * @param bars - The bars (an array of bars, or a {@link BarData}).
157
+ * @param field - `'open'`, `'high'`, `'low'`, `'close'` or `'volume'`.
158
+ * @returns A Series of that field; NaN where a bar does not have it.
159
+ * @example
160
+ * ```js
161
+ * const myClose = Series.fromBars(close.bars, "close");
162
+ * ```
176
163
  */
177
164
  static fromBars(bars: Bar[] | BarData, field: 'open' | 'high' | 'low' | 'close' | 'volume'): Series;
178
165
  /**
179
- * Create a constant series (same value for all bars)
180
- * @param bars - Bar data (Bar[] or BarData)
181
- * @param value - Constant value
182
- * @returns Series with constant value
166
+ * Makes a Series with the same value on every bar. The Series methods also take plain numbers, so a script seldom
167
+ * needs it.
168
+ * @param bars - The bars to align to (an array of bars, or a {@link BarData}).
169
+ * @param value - The value of every bar (NaN for na).
170
+ * @returns A Series of `value`.
171
+ * @example
172
+ * ```js
173
+ * const level = Series.constant(close.bars, 50);
174
+ * ```
183
175
  */
184
176
  static constant(bars: Bar[] | BarData, value: number): Series;
185
177
  /**
186
- * Create series from array of values
187
- * @param bars - Bar data (Bar[] or BarData) for time alignment
188
- * @param values - Array of values
189
- * @returns Series
178
+ * Makes a Series from an array with one value per bar, oldest first. In a script, `seriesOf(values)` does the same
179
+ * on the chart bars.
180
+ * @param bars - The bars the values belong to (an array of bars, or a {@link BarData}).
181
+ * @param values - One number per bar, oldest first; a missing value reads as NaN.
182
+ * @returns A Series of the values.
190
183
  * @throws When read on other bars with a different length than `values` (e.g. a series computed on the
191
- * chart bars and read inside a `request.security` expression, which runs on the higher-timeframe bars)
184
+ * chart bars and read inside a `request.security` expression, which runs on the other timeframe's bars).
185
+ * @example
186
+ * ```js
187
+ * const doubled = Series.fromArray(close.bars, close.toArray().map((v) => v * 2));
188
+ * ```
192
189
  */
193
190
  static fromArray(bars: Bar[] | BarData, values: number[]): Series;
194
191
  /**
195
- * Add two series or a series and a number
196
- * @param other - Series or number to add
197
- * @returns New Series representing the sum
192
+ * Adds a Series or a number to this series, bar by bar (the `+` of two values). NaN on either side gives NaN.
193
+ * @param other - Series or number to add.
194
+ * @returns A Series of the sums.
195
+ * @example
196
+ * ```js
197
+ * const mid = high.add(low).div(2);
198
+ * ```
198
199
  */
199
200
  add(other: Series | number): Series;
200
201
  /**
201
- * Subtract two series or subtract a number from a series
202
- * @param other - Series or number to subtract
203
- * @returns New Series representing the difference
202
+ * Subtracts a Series or a number from this series, bar by bar (the `-` of two values). NaN on either side gives NaN.
203
+ * @param other - Series or number to subtract.
204
+ * @returns A Series of the differences.
205
+ * @example
206
+ * ```js
207
+ * const body = close.sub(open);
208
+ * ```
204
209
  */
205
210
  sub(other: Series | number): Series;
206
211
  /**
207
- * Multiply two series or a series by a number
208
- * @param other - Series or number to multiply
209
- * @returns New Series representing the product
212
+ * Multiplies this series by a Series or a number, bar by bar (the `*` of two values). NaN on either side gives NaN.
213
+ * @param other - Series or number to multiply by.
214
+ * @returns A Series of the products.
215
+ * @example
216
+ * ```js
217
+ * const upper = ta.sma(close, 20).mul(1.02);
218
+ * ```
210
219
  */
211
220
  mul(other: Series | number): Series;
212
221
  /**
213
- * Raise the series to a power (PineScript math.pow on a series)
214
- * @param exponent - Series or number exponent
215
- * @returns New Series representing base ** exponent
222
+ * Raises this series to a power, bar by bar (`math.pow` on a series). NaN on either side gives NaN; a negative base
223
+ * with a fractional exponent gives NaN.
224
+ * @param exponent - Series or number exponent.
225
+ * @returns A Series of `this ** exponent`.
226
+ * @example
227
+ * ```js
228
+ * const squared = close.sub(ta.sma(close, 20)).pow(2);
229
+ * ```
216
230
  */
217
231
  pow(exponent: Series | number): Series;
218
232
  /**
219
- * Divide two series or a series by a number
220
- * @param other - Series or number to divide by
221
- * @returns New Series representing the quotient
233
+ * Divides this series by a Series or a number, bar by bar (the `/` of two values). A division by 0 gives
234
+ * +/-Infinity (which `na()` treats as na), 0 / 0 and NaN on either side give NaN.
235
+ * @param other - Series or number to divide by.
236
+ * @returns A Series of the quotients.
237
+ * @example
238
+ * ```js
239
+ * const range = high.sub(low);
240
+ * const ratio = range.gt(0).iff(close.sub(open).div(range), 0);
241
+ * ```
222
242
  */
223
243
  div(other: Series | number): Series;
224
244
  /**
225
- * Modulo operation
226
- * @param other - Series or number for modulo
227
- * @returns New Series representing the remainder
245
+ * Remainder of the division of this series by a Series or a number, bar by bar (the `%` of two values). The
246
+ * remainder has the sign of this series; a divisor of 0 and NaN on either side give NaN.
247
+ * @param other - Series or number to divide by.
248
+ * @returns A Series of the remainders.
249
+ * @example
250
+ * ```js
251
+ * const everyFifth = bar_index.mod(5).eq(0);
252
+ * ```
228
253
  */
229
254
  mod(other: Series | number): Series;
230
255
  /**
231
- * Negation
232
- * @returns New Series with negated values
256
+ * Changes the sign of every value (the unary `-`). NaN stays NaN.
257
+ * @returns A Series of the opposite values.
258
+ * @example
259
+ * ```js
260
+ * const drop = close.sub(close.offset(1)).neg();
261
+ * ```
233
262
  */
234
263
  neg(): Series;
235
264
  /**
236
- * Greater than comparison
237
- * @param other - Series or number to compare
238
- * @returns New Series with 1 where true, 0 where false
265
+ * Tests whether this series is above a Series or a number, bar by bar (`a > b`).
266
+ * Values closer than 1e-10 count as equal, and a NaN on either side gives 0 (false), never NaN.
267
+ * @param other - Series or number to compare with.
268
+ * @returns A Series of 1 where it is true, 0 where it is false.
269
+ * @example
270
+ * ```js
271
+ * const up = close.gt(open);
272
+ * ```
239
273
  */
240
274
  gt(other: Series | number): Series;
241
275
  /**
242
- * Greater than or equal comparison
243
- * @param other - Series or number to compare
244
- * @returns New Series with 1 where true, 0 where false
276
+ * Tests whether this series is above or equal to a Series or a number, bar by bar (`a >= b`).
277
+ * Values closer than 1e-10 count as equal, and a NaN on either side gives 0 (false), never NaN.
278
+ * @param other - Series or number to compare with.
279
+ * @returns A Series of 1 where it is true, 0 where it is false.
280
+ * @example
281
+ * ```js
282
+ * const atOrAbove = close.gte(ta.sma(close, 50));
283
+ * ```
245
284
  */
246
285
  gte(other: Series | number): Series;
247
286
  /**
248
- * Less than comparison
249
- * @param other - Series or number to compare
250
- * @returns New Series with 1 where true, 0 where false
287
+ * Tests whether this series is below a Series or a number, bar by bar (`a < b`).
288
+ * Values closer than 1e-10 count as equal, and a NaN on either side gives 0 (false), never NaN.
289
+ * @param other - Series or number to compare with.
290
+ * @returns A Series of 1 where it is true, 0 where it is false.
291
+ * @example
292
+ * ```js
293
+ * const oversold = ta.rsi(close, 14).lt(30);
294
+ * ```
251
295
  */
252
296
  lt(other: Series | number): Series;
253
297
  /**
254
- * Less than or equal comparison
255
- * @param other - Series or number to compare
256
- * @returns New Series with 1 where true, 0 where false
298
+ * Tests whether this series is below or equal to a Series or a number, bar by bar (`a <= b`).
299
+ * Values closer than 1e-10 count as equal, and a NaN on either side gives 0 (false), never NaN.
300
+ * @param other - Series or number to compare with.
301
+ * @returns A Series of 1 where it is true, 0 where it is false.
302
+ * @example
303
+ * ```js
304
+ * const atOrBelow = low.lte(ta.lowest(low, 20).offset(1));
305
+ * ```
257
306
  */
258
307
  lte(other: Series | number): Series;
259
308
  /**
260
- * Equality comparison
261
- * @param other - Series or number to compare
262
- * @returns New Series with 1 where true, 0 where false
309
+ * Tests whether this series equals a Series or a number, bar by bar (`a == b`).
310
+ * Values closer than 1e-10 count as equal, and a NaN on either side gives 0 (false), never NaN.
311
+ * @param other - Series or number to compare with.
312
+ * @returns A Series of 1 where it is true, 0 where it is false.
313
+ * @example
314
+ * ```js
315
+ * const doji = close.eq(open);
316
+ * ```
263
317
  */
264
318
  eq(other: Series | number): Series;
265
319
  /**
266
- * Not equal comparison
267
- * @param other - Series or number to compare
268
- * @returns New Series with 1 where true, 0 where false
320
+ * Tests whether this series differs from a Series or a number, bar by bar (`a != b`).
321
+ * Values closer than 1e-10 count as equal, and a NaN on either side gives 0 (false), never NaN.
322
+ * @param other - Series or number to compare with.
323
+ * @returns A Series of 1 where it is true, 0 where it is false.
324
+ * @example
325
+ * ```js
326
+ * const moved = close.neq(close.offset(1));
327
+ * ```
269
328
  */
270
329
  neq(other: Series | number): Series;
271
330
  /**
272
- * Logical AND
273
- * @param other - Series or number (truthy/falsy)
274
- * @returns New Series with 1 where both true, 0 otherwise
331
+ * Logical "and" of two conditions, bar by bar. A value is true when it is not 0 and not NaN.
332
+ * @param other - The other condition: a Series or a number.
333
+ * @returns A Series of 1 where both are true, 0 elsewhere.
334
+ * @example
335
+ * ```js
336
+ * const strongUp = close.gt(open).and(volume.gt(ta.sma(volume, 20)));
337
+ * ```
275
338
  */
276
339
  and(other: Series | number): Series;
277
340
  /**
278
- * Logical OR
279
- * @param other - Series or number (truthy/falsy)
280
- * @returns New Series with 1 where either true, 0 otherwise
341
+ * Logical "or" of two conditions, bar by bar. A value is true when it is not 0 and not NaN.
342
+ * @param other - The other condition: a Series or a number.
343
+ * @returns A Series of 1 where at least one is true, 0 elsewhere.
344
+ * @example
345
+ * ```js
346
+ * const extreme = ta.rsi(close, 14).gt(70).or(ta.rsi(close, 14).lt(30));
347
+ * ```
281
348
  */
282
349
  or(other: Series | number): Series;
283
350
  /**
284
- * Logical NOT
285
- * @returns New Series with inverted boolean values
351
+ * Logical "not" of a condition, bar by bar: true (not 0, not NaN) becomes 0, and 0 or NaN becomes 1.
352
+ * @returns A Series of 1 where this series is false, 0 where it is true.
353
+ * @example
354
+ * ```js
355
+ * const notUp = close.gt(open).not();
356
+ * ```
286
357
  */
287
358
  not(): Series;
288
359
  /**
289
- * Bar-by-bar conditional selection (ternary operator for Series)
290
- * Uses this Series as the condition (truthy = nonzero, falsy = zero/NaN)
291
- *
292
- * @param trueValue - Value or Series to use when condition is truthy
293
- * @param falseValue - Value or Series to use when condition is falsy
294
- * @returns New Series with bar-by-bar selected values
295
- *
360
+ * Picks one of two values on each bar, with this series as the condition (the `cond ? x : y` of a series). The
361
+ * condition is true when it is not 0 and not NaN; 0 and NaN pick `falseValue`.
362
+ * @param trueValue - Series or number used where the condition is true.
363
+ * @param falseValue - Series or number used where the condition is false.
364
+ * @returns A Series of the picked values.
296
365
  * @example
297
- * ```typescript
298
- * // PineScript: result = condition ? trueVal : falseVal
299
- * const result = condition.iff(trueVal, falseVal);
300
- *
301
- * // Example: RSI formula uses ternary for edge cases
302
- * // rsi = down == 0 ? 100 : up == 0 ? 0 : formula
303
- * const rsi = down.eq(0).iff(100, up.eq(0).iff(0, formula));
366
+ * ```js
367
+ * const range = high.sub(low);
368
+ * const ratio = range.gt(0).iff(close.sub(open).div(range), 0);
369
+ * plot(ratio, "Body / range");
304
370
  * ```
305
371
  */
306
372
  iff(trueValue: Series | number, falseValue: Series | number): Series;
307
373
  /**
308
- * Access previous bars (like close[1] in PineScript)
309
- * @param offset - Number of bars back (0 or more)
310
- * @returns New Series with offset values
311
- * @throws RangeError when `offset` is negative
374
+ * Shifts the series back in time: on each bar, the value `offset` bars earlier (`close.offset(1)` is the previous
375
+ * close). The first `offset` bars, which have no earlier bar, get NaN.
376
+ * @param offset - Number of bars back: 0 (the series itself) or more, a whole number. A series computed by the
377
+ * script can look back at most 5000 bars; the price series (`close`, `high`...) any number.
378
+ * @returns A Series of the earlier values.
379
+ * @throws RangeError when `offset` is negative (it would read a future bar); an error past 5000 bars.
380
+ * @example
381
+ * ```js
382
+ * const change = close.sub(close.offset(1));
383
+ * const higherHigh = high.gt(high.offset(1));
384
+ * ```
312
385
  */
313
386
  offset(offset: number): Series;
314
387
  /**
315
- * Compute all values for the series
316
- *
317
- * Now includes automatic cache invalidation:
318
- * - Checks if dataSource version has changed since cache was computed
319
- * - Recomputes if version mismatch detected
320
- * - Stores version when cache is created
321
- *
322
- * @returns Array of computed values
388
+ * Gives the values of all the bars as a plain array, oldest bar first (NaN for na). The values are computed on the
389
+ * first read and kept until the bars change; the array is shared, so copy it before changing it.
390
+ * @returns One number per bar, oldest first.
391
+ * @example
392
+ * ```js
393
+ * const values = ta.sma(close, 20).toArray();
394
+ * const shifted = seriesOf(values.map((v) => v * 1.01));
395
+ * ```
323
396
  */
324
397
  toArray(): number[];
325
398
  /**
326
- * Materialize this Series by eagerly computing values and breaking closure chain
327
- *
328
- * This method addresses the closure chain memory leak issue:
329
- * - Computes all values immediately
330
- * - Creates a new Series that stores values directly
331
- * - Breaks references to parent Series objects
332
- * - Useful for complex expressions to free intermediate Series memory
333
- *
399
+ * Computes the values now and returns a Series that stores them, without links to the series it was built from.
400
+ * Use it on a long chain of methods to compute it once and free the steps in between.
401
+ * @returns A Series of the same values, stored.
334
402
  * @example
335
- * ```typescript
336
- * // Without materialize: keeps a, b, c, d in memory via closures
337
- * const result = a.add(b).mul(c).div(d).sub(e);
338
- *
339
- * // With materialize: breaks chain, frees a, b, c memory
340
- * const result = a.add(b).mul(c).materialize().div(d).sub(e);
403
+ * ```js
404
+ * const spread = high.sub(low).div(close).mul(100).materialize();
341
405
  * ```
342
- *
343
- * @returns New Series with computed values and no closure dependencies
344
406
  */
345
407
  materialize(): Series;
346
408
  /**
@@ -360,31 +422,49 @@ export declare class Series {
360
422
  */
361
423
  _compute(): number[];
362
424
  /**
363
- * Get value at specific index
364
- * @param index - Bar index
365
- * @returns Value at that index
425
+ * Reads the value of one bar by its position: 0 is the oldest bar, `bar_index` counts the same way. This is not
426
+ * the "bars back" of `offset()`: inside a bar loop, read the current bar with `c.get(series)` and earlier bars with
427
+ * `c.get(series, k)`.
428
+ * @param index - Bar position, 0 for the oldest bar.
429
+ * @returns The value of that bar; NaN when there is no such bar.
430
+ * @example
431
+ * ```js
432
+ * const firstClose = close.get(0);
433
+ * ```
366
434
  */
367
435
  get(index: number): number;
368
436
  /**
369
- * Get the last value (most recent bar)
370
- * @returns Most recent value
437
+ * Reads the value of the newest bar.
438
+ * @returns The value of the last bar; NaN when there are no bars.
439
+ * @example
440
+ * ```js
441
+ * const lastRsi = ta.rsi(close, 14).last();
442
+ * ```
371
443
  */
372
444
  last(): number;
373
445
  /**
374
- * Get number of values
375
- * @returns Length of series
446
+ * Gives the number of bars of the series (a method, not a property).
447
+ * @returns The number of bars.
448
+ * @example
449
+ * ```js
450
+ * const bars = close.length();
451
+ * ```
376
452
  */
377
453
  length(): number;
378
- /**
379
- * Convert series to time-value pairs for charting
380
- * @returns Array of { time, value } objects
381
- */
382
454
  /**
383
455
  * A Series holds the values of all the bars, so JavaScript operators cannot use it: without this guard
384
456
  * `close - open` is NaN, `close > open` false and `` `${rsi}` `` "[object Object]", with no error. The
385
457
  * conversion throws instead, with the Series method or bar-loop read to use.
386
458
  */
387
459
  [Symbol.toPrimitive](hint: 'number' | 'string' | 'default'): never;
460
+ /**
461
+ * Gives the values as `{ time, value }` points for a chart line, oldest first, leaving out the NaN bars.
462
+ * @returns The points; `time` is the bar time, in the unit of the bars.
463
+ * @example
464
+ * ```js
465
+ * const points = ta.sma(close, 20).toTimeValuePairs();
466
+ * ```
467
+ */
388
468
  toTimeValuePairs(): Array<{
389
469
  time: any;
390
470
  value: number;
@@ -1 +1 @@
1
- {"version":3,"file":"series.d.ts","sourceRoot":"","sources":["../../../src/runtime/series.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAE7C;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,MAAM,CAAC;AAE/E;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,OAAO;IAClB,OAAO,CAAC,KAAK,CAAQ;IACrB,OAAO,CAAC,QAAQ,CAAa;IAE7B;;;OAGG;gBACS,IAAI,GAAE,GAAG,EAAO;IAI5B;;;OAGG;IACH,IAAI,OAAO,IAAI,MAAM,CAEpB;IAED;;;;OAIG;IACH,IAAI,IAAI,IAAI,GAAG,EAAE,CAEhB;IAED;;OAEG;IACH,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED;;;OAGG;IACH,IAAI,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI;IAKpB;;;OAGG;IACH,GAAG,IAAI,GAAG,GAA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