openalgo-script 0.1.0-alpha.1 → 0.2.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 (990) hide show
  1. package/CHANGELOG.md +1200 -0
  2. package/README.md +49 -28
  3. package/dist/adapters/charts/alerts.d.ts +70 -0
  4. package/dist/adapters/charts/alerts.d.ts.map +1 -0
  5. package/dist/adapters/charts/alerts.js +52 -0
  6. package/dist/adapters/charts/alerts.js.map +1 -0
  7. package/dist/adapters/charts/bars.d.ts +39 -0
  8. package/dist/adapters/charts/bars.d.ts.map +1 -0
  9. package/dist/adapters/charts/bars.js +32 -0
  10. package/dist/adapters/charts/bars.js.map +1 -0
  11. package/dist/adapters/charts/candles.d.ts +40 -0
  12. package/dist/adapters/charts/candles.d.ts.map +1 -0
  13. package/dist/adapters/charts/candles.js +85 -0
  14. package/dist/adapters/charts/candles.js.map +1 -0
  15. package/dist/adapters/charts/colours.d.ts +47 -0
  16. package/dist/adapters/charts/colours.d.ts.map +1 -0
  17. package/dist/adapters/charts/colours.js +80 -0
  18. package/dist/adapters/charts/colours.js.map +1 -0
  19. package/dist/adapters/charts/columns.d.ts +37 -0
  20. package/dist/adapters/charts/columns.d.ts.map +1 -0
  21. package/dist/adapters/charts/columns.js +56 -0
  22. package/dist/adapters/charts/columns.js.map +1 -0
  23. package/dist/adapters/charts/contract.d.ts +278 -0
  24. package/dist/adapters/charts/contract.d.ts.map +1 -0
  25. package/dist/adapters/charts/contract.js +2 -0
  26. package/dist/adapters/charts/contract.js.map +1 -0
  27. package/dist/adapters/charts/descriptor.d.ts +48 -0
  28. package/dist/adapters/charts/descriptor.d.ts.map +1 -0
  29. package/dist/adapters/charts/descriptor.js +111 -0
  30. package/dist/adapters/charts/descriptor.js.map +1 -0
  31. package/dist/adapters/charts/drawings.d.ts +43 -0
  32. package/dist/adapters/charts/drawings.d.ts.map +1 -0
  33. package/dist/adapters/charts/drawings.js +172 -0
  34. package/dist/adapters/charts/drawings.js.map +1 -0
  35. package/dist/adapters/charts/errors.d.ts +28 -0
  36. package/dist/adapters/charts/errors.d.ts.map +1 -0
  37. package/dist/adapters/charts/errors.js +21 -0
  38. package/dist/adapters/charts/errors.js.map +1 -0
  39. package/dist/adapters/charts/fields.d.ts +33 -0
  40. package/dist/adapters/charts/fields.d.ts.map +1 -0
  41. package/dist/adapters/charts/fields.js +51 -0
  42. package/dist/adapters/charts/fields.js.map +1 -0
  43. package/dist/adapters/charts/fills.d.ts +23 -0
  44. package/dist/adapters/charts/fills.d.ts.map +1 -0
  45. package/dist/adapters/charts/fills.js +48 -0
  46. package/dist/adapters/charts/fills.js.map +1 -0
  47. package/dist/adapters/charts/index.d.ts +37 -0
  48. package/dist/adapters/charts/index.d.ts.map +1 -0
  49. package/dist/adapters/charts/index.js +33 -0
  50. package/dist/adapters/charts/index.js.map +1 -0
  51. package/dist/adapters/charts/levels.d.ts +39 -0
  52. package/dist/adapters/charts/levels.d.ts.map +1 -0
  53. package/dist/adapters/charts/levels.js +61 -0
  54. package/dist/adapters/charts/levels.js.map +1 -0
  55. package/dist/adapters/charts/markers.d.ts +41 -0
  56. package/dist/adapters/charts/markers.d.ts.map +1 -0
  57. package/dist/adapters/charts/markers.js +75 -0
  58. package/dist/adapters/charts/markers.js.map +1 -0
  59. package/dist/adapters/charts/paint.d.ts +61 -0
  60. package/dist/adapters/charts/paint.d.ts.map +1 -0
  61. package/dist/adapters/charts/paint.js +47 -0
  62. package/dist/adapters/charts/paint.js.map +1 -0
  63. package/dist/adapters/charts/plots.d.ts +39 -0
  64. package/dist/adapters/charts/plots.d.ts.map +1 -0
  65. package/dist/adapters/charts/plots.js +117 -0
  66. package/dist/adapters/charts/plots.js.map +1 -0
  67. package/dist/adapters/charts/produced.d.ts +57 -0
  68. package/dist/adapters/charts/produced.d.ts.map +1 -0
  69. package/dist/adapters/charts/produced.js +11 -0
  70. package/dist/adapters/charts/produced.js.map +1 -0
  71. package/dist/adapters/charts/requests.d.ts +114 -0
  72. package/dist/adapters/charts/requests.d.ts.map +1 -0
  73. package/dist/adapters/charts/requests.js +277 -0
  74. package/dist/adapters/charts/requests.js.map +1 -0
  75. package/dist/adapters/charts/run.d.ts +147 -0
  76. package/dist/adapters/charts/run.d.ts.map +1 -0
  77. package/dist/adapters/charts/run.js +148 -0
  78. package/dist/adapters/charts/run.js.map +1 -0
  79. package/dist/adapters/charts/settings.d.ts +78 -0
  80. package/dist/adapters/charts/settings.d.ts.map +1 -0
  81. package/dist/adapters/charts/settings.js +225 -0
  82. package/dist/adapters/charts/settings.js.map +1 -0
  83. package/dist/adapters/charts/surfaces.d.ts +204 -0
  84. package/dist/adapters/charts/surfaces.d.ts.map +1 -0
  85. package/dist/adapters/charts/surfaces.js +2 -0
  86. package/dist/adapters/charts/surfaces.js.map +1 -0
  87. package/dist/adapters/charts/tables.d.ts +65 -0
  88. package/dist/adapters/charts/tables.d.ts.map +1 -0
  89. package/dist/adapters/charts/tables.js +84 -0
  90. package/dist/adapters/charts/tables.js.map +1 -0
  91. package/dist/core/catalogue/catalogue.generated.d.ts +98 -10
  92. package/dist/core/catalogue/catalogue.generated.d.ts.map +1 -1
  93. package/dist/core/catalogue/catalogue.generated.js +17 -9
  94. package/dist/core/catalogue/catalogue.generated.js.map +1 -1
  95. package/dist/core/catalogue/values.generated.d.ts +25 -0
  96. package/dist/core/catalogue/values.generated.d.ts.map +1 -1
  97. package/dist/core/check/arguments.d.ts +41 -0
  98. package/dist/core/check/arguments.d.ts.map +1 -0
  99. package/dist/core/check/arguments.js +84 -0
  100. package/dist/core/check/arguments.js.map +1 -0
  101. package/dist/core/check/call-sites.d.ts +22 -0
  102. package/dist/core/check/call-sites.d.ts.map +1 -0
  103. package/dist/core/check/call-sites.js +329 -0
  104. package/dist/core/check/call-sites.js.map +1 -0
  105. package/dist/core/check/call-warmup.d.ts +37 -0
  106. package/dist/core/check/call-warmup.d.ts.map +1 -0
  107. package/dist/core/check/call-warmup.js +97 -0
  108. package/dist/core/check/call-warmup.js.map +1 -0
  109. package/dist/core/check/calls.d.ts +33 -0
  110. package/dist/core/check/calls.d.ts.map +1 -0
  111. package/dist/core/check/calls.js +348 -0
  112. package/dist/core/check/calls.js.map +1 -0
  113. package/dist/core/check/check.d.ts +23 -0
  114. package/dist/core/check/check.d.ts.map +1 -0
  115. package/dist/core/check/check.js +163 -0
  116. package/dist/core/check/check.js.map +1 -0
  117. package/dist/core/check/checked.d.ts +198 -0
  118. package/dist/core/check/checked.d.ts.map +1 -0
  119. package/dist/core/check/checked.js +19 -0
  120. package/dist/core/check/checked.js.map +1 -0
  121. package/dist/core/check/checker.d.ts +182 -0
  122. package/dist/core/check/checker.d.ts.map +1 -0
  123. package/dist/core/check/checker.js +280 -0
  124. package/dist/core/check/checker.js.map +1 -0
  125. package/dist/core/check/conditional.d.ts +35 -0
  126. package/dist/core/check/conditional.d.ts.map +1 -0
  127. package/dist/core/check/conditional.js +100 -0
  128. package/dist/core/check/conditional.js.map +1 -0
  129. package/dist/core/check/constant.d.ts +47 -0
  130. package/dist/core/check/constant.d.ts.map +1 -0
  131. package/dist/core/check/constant.js +101 -0
  132. package/dist/core/check/constant.js.map +1 -0
  133. package/dist/core/check/declaration.d.ts +33 -0
  134. package/dist/core/check/declaration.d.ts.map +1 -0
  135. package/dist/core/check/declaration.js +181 -0
  136. package/dist/core/check/declaration.js.map +1 -0
  137. package/dist/core/check/expressions.d.ts +36 -0
  138. package/dist/core/check/expressions.d.ts.map +1 -0
  139. package/dist/core/check/expressions.js +398 -0
  140. package/dist/core/check/expressions.js.map +1 -0
  141. package/dist/core/check/functions.d.ts +31 -0
  142. package/dist/core/check/functions.d.ts.map +1 -0
  143. package/dist/core/check/functions.js +238 -0
  144. package/dist/core/check/functions.js.map +1 -0
  145. package/dist/core/check/handles.d.ts +48 -0
  146. package/dist/core/check/handles.d.ts.map +1 -0
  147. package/dist/core/check/handles.js +43 -0
  148. package/dist/core/check/handles.js.map +1 -0
  149. package/dist/core/check/index.d.ts +30 -0
  150. package/dist/core/check/index.d.ts.map +1 -0
  151. package/dist/core/check/index.js +26 -0
  152. package/dist/core/check/index.js.map +1 -0
  153. package/dist/core/check/library-bars.d.ts +7 -0
  154. package/dist/core/check/library-bars.d.ts.map +1 -0
  155. package/dist/core/check/library-bars.js +181 -0
  156. package/dist/core/check/library-bars.js.map +1 -0
  157. package/dist/core/check/library-orders.d.ts +5 -0
  158. package/dist/core/check/library-orders.d.ts.map +1 -0
  159. package/dist/core/check/library-orders.js +250 -0
  160. package/dist/core/check/library-orders.js.map +1 -0
  161. package/dist/core/check/library-output.d.ts +7 -0
  162. package/dist/core/check/library-output.d.ts.map +1 -0
  163. package/dist/core/check/library-output.js +195 -0
  164. package/dist/core/check/library-output.js.map +1 -0
  165. package/dist/core/check/library-series.d.ts +3 -0
  166. package/dist/core/check/library-series.d.ts.map +1 -0
  167. package/dist/core/check/library-series.js +415 -0
  168. package/dist/core/check/library-series.js.map +1 -0
  169. package/dist/core/check/library.d.ts +204 -0
  170. package/dist/core/check/library.d.ts.map +1 -0
  171. package/dist/core/check/library.js +198 -0
  172. package/dist/core/check/library.js.map +1 -0
  173. package/dist/core/check/literals.d.ts +19 -0
  174. package/dist/core/check/literals.d.ts.map +1 -0
  175. package/dist/core/check/literals.js +22 -0
  176. package/dist/core/check/literals.js.map +1 -0
  177. package/dist/core/check/outputs.d.ts +31 -0
  178. package/dist/core/check/outputs.d.ts.map +1 -0
  179. package/dist/core/check/outputs.js +113 -0
  180. package/dist/core/check/outputs.js.map +1 -0
  181. package/dist/core/check/statements.d.ts +25 -0
  182. package/dist/core/check/statements.d.ts.map +1 -0
  183. package/dist/core/check/statements.js +377 -0
  184. package/dist/core/check/statements.js.map +1 -0
  185. package/dist/core/check/suggest.d.ts +25 -0
  186. package/dist/core/check/suggest.d.ts.map +1 -0
  187. package/dist/core/check/suggest.js +61 -0
  188. package/dist/core/check/suggest.js.map +1 -0
  189. package/dist/core/check/surface.d.ts +38 -0
  190. package/dist/core/check/surface.d.ts.map +1 -0
  191. package/dist/core/check/surface.js +100 -0
  192. package/dist/core/check/surface.js.map +1 -0
  193. package/dist/core/check/tags.d.ts +4 -0
  194. package/dist/core/check/tags.d.ts.map +1 -0
  195. package/dist/core/check/tags.js +54 -0
  196. package/dist/core/check/tags.js.map +1 -0
  197. package/dist/core/check/types.d.ts +153 -0
  198. package/dist/core/check/types.d.ts.map +1 -0
  199. package/dist/core/check/types.js +221 -0
  200. package/dist/core/check/types.js.map +1 -0
  201. package/dist/core/check/warmup.d.ts +73 -0
  202. package/dist/core/check/warmup.d.ts.map +1 -0
  203. package/dist/core/check/warmup.js +62 -0
  204. package/dist/core/check/warmup.js.map +1 -0
  205. package/dist/core/diagnostics/collector.d.ts +12 -0
  206. package/dist/core/diagnostics/collector.d.ts.map +1 -1
  207. package/dist/core/diagnostics/collector.js +27 -1
  208. package/dist/core/diagnostics/collector.js.map +1 -1
  209. package/dist/core/emit/calls.d.ts +38 -0
  210. package/dist/core/emit/calls.d.ts.map +1 -0
  211. package/dist/core/emit/calls.js +347 -0
  212. package/dist/core/emit/calls.js.map +1 -0
  213. package/dist/core/emit/canonical.d.ts +39 -0
  214. package/dist/core/emit/canonical.d.ts.map +1 -0
  215. package/dist/core/emit/canonical.js +71 -0
  216. package/dist/core/emit/canonical.js.map +1 -0
  217. package/dist/core/emit/channels.d.ts +28 -0
  218. package/dist/core/emit/channels.d.ts.map +1 -0
  219. package/dist/core/emit/channels.js +110 -0
  220. package/dist/core/emit/channels.js.map +1 -0
  221. package/dist/core/emit/code.d.ts +75 -0
  222. package/dist/core/emit/code.d.ts.map +1 -0
  223. package/dist/core/emit/code.js +104 -0
  224. package/dist/core/emit/code.js.map +1 -0
  225. package/dist/core/emit/colours.d.ts +35 -0
  226. package/dist/core/emit/colours.d.ts.map +1 -0
  227. package/dist/core/emit/colours.js +50 -0
  228. package/dist/core/emit/colours.js.map +1 -0
  229. package/dist/core/emit/context.d.ts +271 -0
  230. package/dist/core/emit/context.d.ts.map +1 -0
  231. package/dist/core/emit/context.js +358 -0
  232. package/dist/core/emit/context.js.map +1 -0
  233. package/dist/core/emit/defaults.d.ts +45 -0
  234. package/dist/core/emit/defaults.d.ts.map +1 -0
  235. package/dist/core/emit/defaults.js +116 -0
  236. package/dist/core/emit/defaults.js.map +1 -0
  237. package/dist/core/emit/emit.d.ts +13 -0
  238. package/dist/core/emit/emit.d.ts.map +1 -0
  239. package/dist/core/emit/emit.js +281 -0
  240. package/dist/core/emit/emit.js.map +1 -0
  241. package/dist/core/emit/events.d.ts +21 -0
  242. package/dist/core/emit/events.d.ts.map +1 -0
  243. package/dist/core/emit/events.js +112 -0
  244. package/dist/core/emit/events.js.map +1 -0
  245. package/dist/core/emit/expressions.d.ts +23 -0
  246. package/dist/core/emit/expressions.d.ts.map +1 -0
  247. package/dist/core/emit/expressions.js +253 -0
  248. package/dist/core/emit/expressions.js.map +1 -0
  249. package/dist/core/emit/functions.d.ts +30 -0
  250. package/dist/core/emit/functions.d.ts.map +1 -0
  251. package/dist/core/emit/functions.js +171 -0
  252. package/dist/core/emit/functions.js.map +1 -0
  253. package/dist/core/emit/gaps.d.ts +34 -0
  254. package/dist/core/emit/gaps.d.ts.map +1 -0
  255. package/dist/core/emit/gaps.js +16 -0
  256. package/dist/core/emit/gaps.js.map +1 -0
  257. package/dist/core/emit/index.d.ts +29 -0
  258. package/dist/core/emit/index.d.ts.map +1 -0
  259. package/dist/core/emit/index.js +23 -0
  260. package/dist/core/emit/index.js.map +1 -0
  261. package/dist/core/emit/inputs.d.ts +47 -0
  262. package/dist/core/emit/inputs.d.ts.map +1 -0
  263. package/dist/core/emit/inputs.js +150 -0
  264. package/dist/core/emit/inputs.js.map +1 -0
  265. package/dist/core/emit/layout.d.ts +73 -0
  266. package/dist/core/emit/layout.d.ts.map +1 -0
  267. package/dist/core/emit/layout.js +126 -0
  268. package/dist/core/emit/layout.js.map +1 -0
  269. package/dist/core/emit/meta.d.ts +14 -0
  270. package/dist/core/emit/meta.d.ts.map +1 -0
  271. package/dist/core/emit/meta.js +68 -0
  272. package/dist/core/emit/meta.js.map +1 -0
  273. package/dist/core/emit/opcodes.d.ts +28 -0
  274. package/dist/core/emit/opcodes.d.ts.map +1 -0
  275. package/dist/core/emit/opcodes.js +137 -0
  276. package/dist/core/emit/opcodes.js.map +1 -0
  277. package/dist/core/emit/outputs.d.ts +67 -0
  278. package/dist/core/emit/outputs.d.ts.map +1 -0
  279. package/dist/core/emit/outputs.js +293 -0
  280. package/dist/core/emit/outputs.js.map +1 -0
  281. package/dist/core/emit/pool.d.ts +33 -0
  282. package/dist/core/emit/pool.d.ts.map +1 -0
  283. package/dist/core/emit/pool.js +79 -0
  284. package/dist/core/emit/pool.js.map +1 -0
  285. package/dist/core/emit/program.d.ts +333 -0
  286. package/dist/core/emit/program.d.ts.map +1 -0
  287. package/dist/core/emit/program.js +15 -0
  288. package/dist/core/emit/program.js.map +1 -0
  289. package/dist/core/emit/registers.d.ts +35 -0
  290. package/dist/core/emit/registers.d.ts.map +1 -0
  291. package/dist/core/emit/registers.js +170 -0
  292. package/dist/core/emit/registers.js.map +1 -0
  293. package/dist/core/emit/request-scope.d.ts +36 -0
  294. package/dist/core/emit/request-scope.d.ts.map +1 -0
  295. package/dist/core/emit/request-scope.js +41 -0
  296. package/dist/core/emit/request-scope.js.map +1 -0
  297. package/dist/core/emit/requests.d.ts +69 -0
  298. package/dist/core/emit/requests.d.ts.map +1 -0
  299. package/dist/core/emit/requests.js +230 -0
  300. package/dist/core/emit/requests.js.map +1 -0
  301. package/dist/core/emit/requires.d.ts +4 -0
  302. package/dist/core/emit/requires.d.ts.map +1 -0
  303. package/dist/core/emit/requires.js +71 -0
  304. package/dist/core/emit/requires.js.map +1 -0
  305. package/dist/core/emit/sha256.d.ts +24 -0
  306. package/dist/core/emit/sha256.d.ts.map +1 -0
  307. package/dist/core/emit/sha256.js +109 -0
  308. package/dist/core/emit/sha256.js.map +1 -0
  309. package/dist/core/emit/statements.d.ts +20 -0
  310. package/dist/core/emit/statements.d.ts.map +1 -0
  311. package/dist/core/emit/statements.js +393 -0
  312. package/dist/core/emit/statements.js.map +1 -0
  313. package/dist/core/emit/values.d.ts +80 -0
  314. package/dist/core/emit/values.d.ts.map +1 -0
  315. package/dist/core/emit/values.js +242 -0
  316. package/dist/core/emit/values.js.map +1 -0
  317. package/dist/core/engine/alerts.d.ts +66 -0
  318. package/dist/core/engine/alerts.d.ts.map +1 -0
  319. package/dist/core/engine/alerts.js +119 -0
  320. package/dist/core/engine/alerts.js.map +1 -0
  321. package/dist/core/engine/arithmetic.d.ts +82 -0
  322. package/dist/core/engine/arithmetic.d.ts.map +1 -0
  323. package/dist/core/engine/arithmetic.js +141 -0
  324. package/dist/core/engine/arithmetic.js.map +1 -0
  325. package/dist/core/engine/bars.d.ts +95 -0
  326. package/dist/core/engine/bars.d.ts.map +1 -0
  327. package/dist/core/engine/bars.js +133 -0
  328. package/dist/core/engine/bars.js.map +1 -0
  329. package/dist/core/engine/budget.d.ts +162 -0
  330. package/dist/core/engine/budget.d.ts.map +1 -0
  331. package/dist/core/engine/budget.js +188 -0
  332. package/dist/core/engine/budget.js.map +1 -0
  333. package/dist/core/engine/channels.d.ts +106 -0
  334. package/dist/core/engine/channels.d.ts.map +1 -0
  335. package/dist/core/engine/channels.js +99 -0
  336. package/dist/core/engine/channels.js.map +1 -0
  337. package/dist/core/engine/drawings.d.ts +64 -0
  338. package/dist/core/engine/drawings.d.ts.map +1 -0
  339. package/dist/core/engine/drawings.js +67 -0
  340. package/dist/core/engine/drawings.js.map +1 -0
  341. package/dist/core/engine/engine.d.ts +140 -0
  342. package/dist/core/engine/engine.d.ts.map +1 -0
  343. package/dist/core/engine/engine.js +405 -0
  344. package/dist/core/engine/engine.js.map +1 -0
  345. package/dist/core/engine/errors.d.ts +64 -0
  346. package/dist/core/engine/errors.d.ts.map +1 -0
  347. package/dist/core/engine/errors.js +63 -0
  348. package/dist/core/engine/errors.js.map +1 -0
  349. package/dist/core/engine/frames.d.ts +48 -0
  350. package/dist/core/engine/frames.d.ts.map +1 -0
  351. package/dist/core/engine/frames.js +41 -0
  352. package/dist/core/engine/frames.js.map +1 -0
  353. package/dist/core/engine/grids.d.ts +25 -0
  354. package/dist/core/engine/grids.d.ts.map +1 -0
  355. package/dist/core/engine/grids.js +77 -0
  356. package/dist/core/engine/grids.js.map +1 -0
  357. package/dist/core/engine/guard.d.ts +4 -0
  358. package/dist/core/engine/guard.d.ts.map +1 -0
  359. package/dist/core/engine/guard.js +46 -0
  360. package/dist/core/engine/guard.js.map +1 -0
  361. package/dist/core/engine/host.d.ts +219 -0
  362. package/dist/core/engine/host.d.ts.map +1 -0
  363. package/dist/core/engine/host.js +38 -0
  364. package/dist/core/engine/host.js.map +1 -0
  365. package/dist/core/engine/index.d.ts +49 -0
  366. package/dist/core/engine/index.d.ts.map +1 -0
  367. package/dist/core/engine/index.js +33 -0
  368. package/dist/core/engine/index.js.map +1 -0
  369. package/dist/core/engine/inputs.d.ts +77 -0
  370. package/dist/core/engine/inputs.d.ts.map +1 -0
  371. package/dist/core/engine/inputs.js +205 -0
  372. package/dist/core/engine/inputs.js.map +1 -0
  373. package/dist/core/engine/ledger/call.d.ts +63 -0
  374. package/dist/core/engine/ledger/call.d.ts.map +1 -0
  375. package/dist/core/engine/ledger/call.js +136 -0
  376. package/dist/core/engine/ledger/call.js.map +1 -0
  377. package/dist/core/engine/ledger/closable.d.ts +155 -0
  378. package/dist/core/engine/ledger/closable.d.ts.map +1 -0
  379. package/dist/core/engine/ledger/closable.js +173 -0
  380. package/dist/core/engine/ledger/closable.js.map +1 -0
  381. package/dist/core/engine/ledger/holdings.d.ts +194 -0
  382. package/dist/core/engine/ledger/holdings.d.ts.map +1 -0
  383. package/dist/core/engine/ledger/holdings.js +237 -0
  384. package/dist/core/engine/ledger/holdings.js.map +1 -0
  385. package/dist/core/engine/ledger/index.d.ts +19 -0
  386. package/dist/core/engine/ledger/index.d.ts.map +1 -0
  387. package/dist/core/engine/ledger/index.js +2 -0
  388. package/dist/core/engine/ledger/index.js.map +1 -0
  389. package/dist/core/engine/ledger/intent.d.ts +106 -0
  390. package/dist/core/engine/ledger/intent.d.ts.map +1 -0
  391. package/dist/core/engine/ledger/intent.js +21 -0
  392. package/dist/core/engine/ledger/intent.js.map +1 -0
  393. package/dist/core/engine/ledger/ledger.d.ts +143 -0
  394. package/dist/core/engine/ledger/ledger.d.ts.map +1 -0
  395. package/dist/core/engine/ledger/ledger.js +237 -0
  396. package/dist/core/engine/ledger/ledger.js.map +1 -0
  397. package/dist/core/engine/ledger/place.d.ts +75 -0
  398. package/dist/core/engine/ledger/place.d.ts.map +1 -0
  399. package/dist/core/engine/ledger/place.js +174 -0
  400. package/dist/core/engine/ledger/place.js.map +1 -0
  401. package/dist/core/engine/ledger/positions.d.ts +68 -0
  402. package/dist/core/engine/ledger/positions.d.ts.map +1 -0
  403. package/dist/core/engine/ledger/positions.js +114 -0
  404. package/dist/core/engine/ledger/positions.js.map +1 -0
  405. package/dist/core/engine/ledger/refuse.d.ts +43 -0
  406. package/dist/core/engine/ledger/refuse.d.ts.map +1 -0
  407. package/dist/core/engine/ledger/refuse.js +329 -0
  408. package/dist/core/engine/ledger/refuse.js.map +1 -0
  409. package/dist/core/engine/ledger/row.d.ts +176 -0
  410. package/dist/core/engine/ledger/row.d.ts.map +1 -0
  411. package/dist/core/engine/ledger/row.js +169 -0
  412. package/dist/core/engine/ledger/row.js.map +1 -0
  413. package/dist/core/engine/ledger/sizing.d.ts +142 -0
  414. package/dist/core/engine/ledger/sizing.d.ts.map +1 -0
  415. package/dist/core/engine/ledger/sizing.js +223 -0
  416. package/dist/core/engine/ledger/sizing.js.map +1 -0
  417. package/dist/core/engine/library/arrays.d.ts +14 -0
  418. package/dist/core/engine/library/arrays.d.ts.map +1 -0
  419. package/dist/core/engine/library/arrays.js +285 -0
  420. package/dist/core/engine/library/arrays.js.map +1 -0
  421. package/dist/core/engine/library/averages.d.ts +9 -0
  422. package/dist/core/engine/library/averages.d.ts.map +1 -0
  423. package/dist/core/engine/library/averages.js +41 -0
  424. package/dist/core/engine/library/averages.js.map +1 -0
  425. package/dist/core/engine/library/binding.d.ts +230 -0
  426. package/dist/core/engine/library/binding.d.ts.map +1 -0
  427. package/dist/core/engine/library/binding.js +109 -0
  428. package/dist/core/engine/library/binding.js.map +1 -0
  429. package/dist/core/engine/library/chart.d.ts +3 -0
  430. package/dist/core/engine/library/chart.d.ts.map +1 -0
  431. package/dist/core/engine/library/chart.js +83 -0
  432. package/dist/core/engine/library/chart.js.map +1 -0
  433. package/dist/core/engine/library/colours.d.ts +26 -0
  434. package/dist/core/engine/library/colours.d.ts.map +1 -0
  435. package/dist/core/engine/library/colours.js +81 -0
  436. package/dist/core/engine/library/colours.js.map +1 -0
  437. package/dist/core/engine/library/dates.d.ts +3 -0
  438. package/dist/core/engine/library/dates.d.ts.map +1 -0
  439. package/dist/core/engine/library/dates.js +75 -0
  440. package/dist/core/engine/library/dates.js.map +1 -0
  441. package/dist/core/engine/library/index.d.ts +13 -0
  442. package/dist/core/engine/library/index.d.ts.map +1 -0
  443. package/dist/core/engine/library/index.js +86 -0
  444. package/dist/core/engine/library/index.js.map +1 -0
  445. package/dist/core/engine/library/maths.d.ts +3 -0
  446. package/dist/core/engine/library/maths.d.ts.map +1 -0
  447. package/dist/core/engine/library/maths.js +89 -0
  448. package/dist/core/engine/library/maths.js.map +1 -0
  449. package/dist/core/engine/library/objects.d.ts +3 -0
  450. package/dist/core/engine/library/objects.d.ts.map +1 -0
  451. package/dist/core/engine/library/objects.js +199 -0
  452. package/dist/core/engine/library/objects.js.map +1 -0
  453. package/dist/core/engine/library/oscillators.d.ts +3 -0
  454. package/dist/core/engine/library/oscillators.d.ts.map +1 -0
  455. package/dist/core/engine/library/oscillators.js +29 -0
  456. package/dist/core/engine/library/oscillators.js.map +1 -0
  457. package/dist/core/engine/library/ranges.d.ts +3 -0
  458. package/dist/core/engine/library/ranges.d.ts.map +1 -0
  459. package/dist/core/engine/library/ranges.js +23 -0
  460. package/dist/core/engine/library/ranges.js.map +1 -0
  461. package/dist/core/engine/library/series.d.ts +3 -0
  462. package/dist/core/engine/library/series.d.ts.map +1 -0
  463. package/dist/core/engine/library/series.js +46 -0
  464. package/dist/core/engine/library/series.js.map +1 -0
  465. package/dist/core/engine/library/state.d.ts +35 -0
  466. package/dist/core/engine/library/state.d.ts.map +1 -0
  467. package/dist/core/engine/library/state.js +19 -0
  468. package/dist/core/engine/library/state.js.map +1 -0
  469. package/dist/core/engine/library/studies.d.ts +3 -0
  470. package/dist/core/engine/library/studies.d.ts.map +1 -0
  471. package/dist/core/engine/library/studies.js +35 -0
  472. package/dist/core/engine/library/studies.js.map +1 -0
  473. package/dist/core/engine/library/text.d.ts +6 -0
  474. package/dist/core/engine/library/text.d.ts.map +1 -0
  475. package/dist/core/engine/library/text.js +280 -0
  476. package/dist/core/engine/library/text.js.map +1 -0
  477. package/dist/core/engine/library/trend.d.ts +3 -0
  478. package/dist/core/engine/library/trend.d.ts.map +1 -0
  479. package/dist/core/engine/library/trend.js +29 -0
  480. package/dist/core/engine/library/trend.js.map +1 -0
  481. package/dist/core/engine/library/volume.d.ts +3 -0
  482. package/dist/core/engine/library/volume.d.ts.map +1 -0
  483. package/dist/core/engine/library/volume.js +51 -0
  484. package/dist/core/engine/library/volume.js.map +1 -0
  485. package/dist/core/engine/load.d.ts +45 -0
  486. package/dist/core/engine/load.d.ts.map +1 -0
  487. package/dist/core/engine/load.js +60 -0
  488. package/dist/core/engine/load.js.map +1 -0
  489. package/dist/core/engine/machine.d.ts +107 -0
  490. package/dist/core/engine/machine.d.ts.map +1 -0
  491. package/dist/core/engine/machine.js +337 -0
  492. package/dist/core/engine/machine.js.map +1 -0
  493. package/dist/core/engine/memory.d.ts +60 -0
  494. package/dist/core/engine/memory.d.ts.map +1 -0
  495. package/dist/core/engine/memory.js +92 -0
  496. package/dist/core/engine/memory.js.map +1 -0
  497. package/dist/core/engine/operations.d.ts +62 -0
  498. package/dist/core/engine/operations.d.ts.map +1 -0
  499. package/dist/core/engine/operations.js +149 -0
  500. package/dist/core/engine/operations.js.map +1 -0
  501. package/dist/core/engine/orders.d.ts +56 -0
  502. package/dist/core/engine/orders.d.ts.map +1 -0
  503. package/dist/core/engine/orders.js +83 -0
  504. package/dist/core/engine/orders.js.map +1 -0
  505. package/dist/core/engine/registers.d.ts +50 -0
  506. package/dist/core/engine/registers.d.ts.map +1 -0
  507. package/dist/core/engine/registers.js +85 -0
  508. package/dist/core/engine/registers.js.map +1 -0
  509. package/dist/core/engine/request-body.d.ts +138 -0
  510. package/dist/core/engine/request-body.d.ts.map +1 -0
  511. package/dist/core/engine/request-body.js +227 -0
  512. package/dist/core/engine/request-body.js.map +1 -0
  513. package/dist/core/engine/request-plan.d.ts +79 -0
  514. package/dist/core/engine/request-plan.d.ts.map +1 -0
  515. package/dist/core/engine/request-plan.js +228 -0
  516. package/dist/core/engine/request-plan.js.map +1 -0
  517. package/dist/core/engine/requests.d.ts +105 -0
  518. package/dist/core/engine/requests.d.ts.map +1 -0
  519. package/dist/core/engine/requests.js +260 -0
  520. package/dist/core/engine/requests.js.map +1 -0
  521. package/dist/core/engine/results.d.ts +40 -0
  522. package/dist/core/engine/results.d.ts.map +1 -0
  523. package/dist/core/engine/results.js +2 -0
  524. package/dist/core/engine/results.js.map +1 -0
  525. package/dist/core/engine/series.d.ts +61 -0
  526. package/dist/core/engine/series.d.ts.map +1 -0
  527. package/dist/core/engine/series.js +41 -0
  528. package/dist/core/engine/series.js.map +1 -0
  529. package/dist/core/engine/session/hours.d.ts +49 -0
  530. package/dist/core/engine/session/hours.d.ts.map +1 -0
  531. package/dist/core/engine/session/hours.js +31 -0
  532. package/dist/core/engine/session/hours.js.map +1 -0
  533. package/dist/core/engine/session/index.d.ts +17 -0
  534. package/dist/core/engine/session/index.d.ts.map +1 -0
  535. package/dist/core/engine/session/index.js +3 -0
  536. package/dist/core/engine/session/index.js.map +1 -0
  537. package/dist/core/engine/session/record.d.ts +56 -0
  538. package/dist/core/engine/session/record.d.ts.map +1 -0
  539. package/dist/core/engine/session/record.js +165 -0
  540. package/dist/core/engine/session/record.js.map +1 -0
  541. package/dist/core/engine/session/spec.d.ts +19 -0
  542. package/dist/core/engine/session/spec.d.ts.map +1 -0
  543. package/dist/core/engine/session/spec.js +31 -0
  544. package/dist/core/engine/session/spec.js.map +1 -0
  545. package/dist/core/engine/timeframe.d.ts +59 -0
  546. package/dist/core/engine/timeframe.d.ts.map +1 -0
  547. package/dist/core/engine/timeframe.js +140 -0
  548. package/dist/core/engine/timeframe.js.map +1 -0
  549. package/dist/core/engine/types.d.ts +15 -0
  550. package/dist/core/engine/types.d.ts.map +1 -0
  551. package/dist/core/engine/types.js +2 -0
  552. package/dist/core/engine/types.js.map +1 -0
  553. package/dist/core/engine/values/heap.d.ts +134 -0
  554. package/dist/core/engine/values/heap.d.ts.map +1 -0
  555. package/dist/core/engine/values/heap.js +230 -0
  556. package/dist/core/engine/values/heap.js.map +1 -0
  557. package/dist/core/engine/values/index.d.ts +13 -0
  558. package/dist/core/engine/values/index.d.ts.map +1 -0
  559. package/dist/core/engine/values/index.js +3 -0
  560. package/dist/core/engine/values/index.js.map +1 -0
  561. package/dist/core/engine/values/value.d.ts +82 -0
  562. package/dist/core/engine/values/value.d.ts.map +1 -0
  563. package/dist/core/engine/values/value.js +134 -0
  564. package/dist/core/engine/values/value.js.map +1 -0
  565. package/dist/core/engine/verify-budgets.d.ts +35 -0
  566. package/dist/core/engine/verify-budgets.d.ts.map +1 -0
  567. package/dist/core/engine/verify-budgets.js +172 -0
  568. package/dist/core/engine/verify-budgets.js.map +1 -0
  569. package/dist/core/engine/verify-code.d.ts +32 -0
  570. package/dist/core/engine/verify-code.d.ts.map +1 -0
  571. package/dist/core/engine/verify-code.js +278 -0
  572. package/dist/core/engine/verify-code.js.map +1 -0
  573. package/dist/core/engine/verify-requests.d.ts +44 -0
  574. package/dist/core/engine/verify-requests.d.ts.map +1 -0
  575. package/dist/core/engine/verify-requests.js +220 -0
  576. package/dist/core/engine/verify-requests.js.map +1 -0
  577. package/dist/core/engine/verify-shape.d.ts +46 -0
  578. package/dist/core/engine/verify-shape.d.ts.map +1 -0
  579. package/dist/core/engine/verify-shape.js +147 -0
  580. package/dist/core/engine/verify-shape.js.map +1 -0
  581. package/dist/core/engine/verify-tables.d.ts +19 -0
  582. package/dist/core/engine/verify-tables.d.ts.map +1 -0
  583. package/dist/core/engine/verify-tables.js +171 -0
  584. package/dist/core/engine/verify-tables.js.map +1 -0
  585. package/dist/core/engine/verify.d.ts +19 -0
  586. package/dist/core/engine/verify.d.ts.map +1 -0
  587. package/dist/core/engine/verify.js +309 -0
  588. package/dist/core/engine/verify.js.map +1 -0
  589. package/dist/core/index.d.ts +61 -6
  590. package/dist/core/index.d.ts.map +1 -1
  591. package/dist/core/index.js +48 -6
  592. package/dist/core/index.js.map +1 -1
  593. package/dist/core/parse/expressions.js +1 -1
  594. package/dist/core/parse/expressions.js.map +1 -1
  595. package/dist/core/parse/names.d.ts +7 -1
  596. package/dist/core/parse/names.d.ts.map +1 -1
  597. package/dist/core/parse/names.js +28 -2
  598. package/dist/core/parse/names.js.map +1 -1
  599. package/dist/core/stdlib/averages/exponential.d.ts +51 -0
  600. package/dist/core/stdlib/averages/exponential.d.ts.map +1 -0
  601. package/dist/core/stdlib/averages/exponential.js +72 -0
  602. package/dist/core/stdlib/averages/exponential.js.map +1 -0
  603. package/dist/core/stdlib/averages/index.d.ts +7 -0
  604. package/dist/core/stdlib/averages/index.d.ts.map +1 -0
  605. package/dist/core/stdlib/averages/index.js +5 -0
  606. package/dist/core/stdlib/averages/index.js.map +1 -0
  607. package/dist/core/stdlib/averages/select.d.ts +35 -0
  608. package/dist/core/stdlib/averages/select.d.ts.map +1 -0
  609. package/dist/core/stdlib/averages/select.js +43 -0
  610. package/dist/core/stdlib/averages/select.js.map +1 -0
  611. package/dist/core/stdlib/averages/shaped.d.ts +61 -0
  612. package/dist/core/stdlib/averages/shaped.d.ts.map +1 -0
  613. package/dist/core/stdlib/averages/shaped.js +126 -0
  614. package/dist/core/stdlib/averages/shaped.js.map +1 -0
  615. package/dist/core/stdlib/averages/simple.d.ts +58 -0
  616. package/dist/core/stdlib/averages/simple.d.ts.map +1 -0
  617. package/dist/core/stdlib/averages/simple.js +92 -0
  618. package/dist/core/stdlib/averages/simple.js.map +1 -0
  619. package/dist/core/stdlib/calendar/civil.d.ts +56 -0
  620. package/dist/core/stdlib/calendar/civil.d.ts.map +1 -0
  621. package/dist/core/stdlib/calendar/civil.js +70 -0
  622. package/dist/core/stdlib/calendar/civil.js.map +1 -0
  623. package/dist/core/stdlib/calendar/fields.d.ts +36 -0
  624. package/dist/core/stdlib/calendar/fields.d.ts.map +1 -0
  625. package/dist/core/stdlib/calendar/fields.js +93 -0
  626. package/dist/core/stdlib/calendar/fields.js.map +1 -0
  627. package/dist/core/stdlib/calendar/format.d.ts +19 -0
  628. package/dist/core/stdlib/calendar/format.d.ts.map +1 -0
  629. package/dist/core/stdlib/calendar/format.js +51 -0
  630. package/dist/core/stdlib/calendar/format.js.map +1 -0
  631. package/dist/core/stdlib/calendar/index.d.ts +7 -0
  632. package/dist/core/stdlib/calendar/index.d.ts.map +1 -0
  633. package/dist/core/stdlib/calendar/index.js +5 -0
  634. package/dist/core/stdlib/calendar/index.js.map +1 -0
  635. package/dist/core/stdlib/calendar/zone.d.ts +53 -0
  636. package/dist/core/stdlib/calendar/zone.d.ts.map +1 -0
  637. package/dist/core/stdlib/calendar/zone.js +138 -0
  638. package/dist/core/stdlib/calendar/zone.js.map +1 -0
  639. package/dist/core/stdlib/index.d.ts +57 -0
  640. package/dist/core/stdlib/index.d.ts.map +1 -0
  641. package/dist/core/stdlib/index.js +51 -0
  642. package/dist/core/stdlib/index.js.map +1 -0
  643. package/dist/core/stdlib/maths/arithmetic.d.ts +38 -0
  644. package/dist/core/stdlib/maths/arithmetic.d.ts.map +1 -0
  645. package/dist/core/stdlib/maths/arithmetic.js +66 -0
  646. package/dist/core/stdlib/maths/arithmetic.js.map +1 -0
  647. package/dist/core/stdlib/maths/elementary.d.ts +65 -0
  648. package/dist/core/stdlib/maths/elementary.d.ts.map +1 -0
  649. package/dist/core/stdlib/maths/elementary.js +93 -0
  650. package/dist/core/stdlib/maths/elementary.js.map +1 -0
  651. package/dist/core/stdlib/maths/index.d.ts +4 -0
  652. package/dist/core/stdlib/maths/index.d.ts.map +1 -0
  653. package/dist/core/stdlib/maths/index.js +4 -0
  654. package/dist/core/stdlib/maths/index.js.map +1 -0
  655. package/dist/core/stdlib/maths/rounding.d.ts +43 -0
  656. package/dist/core/stdlib/maths/rounding.d.ts.map +1 -0
  657. package/dist/core/stdlib/maths/rounding.js +62 -0
  658. package/dist/core/stdlib/maths/rounding.js.map +1 -0
  659. package/dist/core/stdlib/momentum/convergence.d.ts +36 -0
  660. package/dist/core/stdlib/momentum/convergence.d.ts.map +1 -0
  661. package/dist/core/stdlib/momentum/convergence.js +48 -0
  662. package/dist/core/stdlib/momentum/convergence.js.map +1 -0
  663. package/dist/core/stdlib/momentum/index.d.ts +6 -0
  664. package/dist/core/stdlib/momentum/index.d.ts.map +1 -0
  665. package/dist/core/stdlib/momentum/index.js +6 -0
  666. package/dist/core/stdlib/momentum/index.js.map +1 -0
  667. package/dist/core/stdlib/momentum/pressure.d.ts +43 -0
  668. package/dist/core/stdlib/momentum/pressure.d.ts.map +1 -0
  669. package/dist/core/stdlib/momentum/pressure.js +103 -0
  670. package/dist/core/stdlib/momentum/pressure.js.map +1 -0
  671. package/dist/core/stdlib/momentum/rates.d.ts +74 -0
  672. package/dist/core/stdlib/momentum/rates.d.ts.map +1 -0
  673. package/dist/core/stdlib/momentum/rates.js +134 -0
  674. package/dist/core/stdlib/momentum/rates.js.map +1 -0
  675. package/dist/core/stdlib/momentum/rsi.d.ts +21 -0
  676. package/dist/core/stdlib/momentum/rsi.d.ts.map +1 -0
  677. package/dist/core/stdlib/momentum/rsi.js +30 -0
  678. package/dist/core/stdlib/momentum/rsi.js.map +1 -0
  679. package/dist/core/stdlib/momentum/stochastic.d.ts +44 -0
  680. package/dist/core/stdlib/momentum/stochastic.d.ts.map +1 -0
  681. package/dist/core/stdlib/momentum/stochastic.js +97 -0
  682. package/dist/core/stdlib/momentum/stochastic.js.map +1 -0
  683. package/dist/core/stdlib/series/changes.d.ts +59 -0
  684. package/dist/core/stdlib/series/changes.d.ts.map +1 -0
  685. package/dist/core/stdlib/series/changes.js +129 -0
  686. package/dist/core/stdlib/series/changes.js.map +1 -0
  687. package/dist/core/stdlib/series/conditions.d.ts +34 -0
  688. package/dist/core/stdlib/series/conditions.d.ts.map +1 -0
  689. package/dist/core/stdlib/series/conditions.js +52 -0
  690. package/dist/core/stdlib/series/conditions.js.map +1 -0
  691. package/dist/core/stdlib/series/extremes.d.ts +29 -0
  692. package/dist/core/stdlib/series/extremes.d.ts.map +1 -0
  693. package/dist/core/stdlib/series/extremes.js +62 -0
  694. package/dist/core/stdlib/series/extremes.js.map +1 -0
  695. package/dist/core/stdlib/series/index.d.ts +9 -0
  696. package/dist/core/stdlib/series/index.d.ts.map +1 -0
  697. package/dist/core/stdlib/series/index.js +7 -0
  698. package/dist/core/stdlib/series/index.js.map +1 -0
  699. package/dist/core/stdlib/series/pivots.d.ts +25 -0
  700. package/dist/core/stdlib/series/pivots.d.ts.map +1 -0
  701. package/dist/core/stdlib/series/pivots.js +42 -0
  702. package/dist/core/stdlib/series/pivots.js.map +1 -0
  703. package/dist/core/stdlib/series/statistics.d.ts +64 -0
  704. package/dist/core/stdlib/series/statistics.d.ts.map +1 -0
  705. package/dist/core/stdlib/series/statistics.js +148 -0
  706. package/dist/core/stdlib/series/statistics.js.map +1 -0
  707. package/dist/core/stdlib/series/totals.d.ts +68 -0
  708. package/dist/core/stdlib/series/totals.d.ts.map +1 -0
  709. package/dist/core/stdlib/series/totals.js +115 -0
  710. package/dist/core/stdlib/series/totals.js.map +1 -0
  711. package/dist/core/stdlib/trend/directional.d.ts +69 -0
  712. package/dist/core/stdlib/trend/directional.d.ts.map +1 -0
  713. package/dist/core/stdlib/trend/directional.js +151 -0
  714. package/dist/core/stdlib/trend/directional.js.map +1 -0
  715. package/dist/core/stdlib/trend/index.d.ts +4 -0
  716. package/dist/core/stdlib/trend/index.d.ts.map +1 -0
  717. package/dist/core/stdlib/trend/index.js +4 -0
  718. package/dist/core/stdlib/trend/index.js.map +1 -0
  719. package/dist/core/stdlib/trend/psar.d.ts +33 -0
  720. package/dist/core/stdlib/trend/psar.d.ts.map +1 -0
  721. package/dist/core/stdlib/trend/psar.js +86 -0
  722. package/dist/core/stdlib/trend/psar.js.map +1 -0
  723. package/dist/core/stdlib/trend/supertrend.d.ts +30 -0
  724. package/dist/core/stdlib/trend/supertrend.d.ts.map +1 -0
  725. package/dist/core/stdlib/trend/supertrend.js +65 -0
  726. package/dist/core/stdlib/trend/supertrend.js.map +1 -0
  727. package/dist/core/stdlib/values/bar.d.ts +39 -0
  728. package/dist/core/stdlib/values/bar.d.ts.map +1 -0
  729. package/dist/core/stdlib/values/bar.js +33 -0
  730. package/dist/core/stdlib/values/bar.js.map +1 -0
  731. package/dist/core/stdlib/values/index.d.ts +11 -0
  732. package/dist/core/stdlib/values/index.d.ts.map +1 -0
  733. package/dist/core/stdlib/values/index.js +6 -0
  734. package/dist/core/stdlib/values/index.js.map +1 -0
  735. package/dist/core/stdlib/values/lookback.d.ts +83 -0
  736. package/dist/core/stdlib/values/lookback.d.ts.map +1 -0
  737. package/dist/core/stdlib/values/lookback.js +134 -0
  738. package/dist/core/stdlib/values/lookback.js.map +1 -0
  739. package/dist/core/stdlib/values/region.d.ts +55 -0
  740. package/dist/core/stdlib/values/region.d.ts.map +1 -0
  741. package/dist/core/stdlib/values/region.js +73 -0
  742. package/dist/core/stdlib/values/region.js.map +1 -0
  743. package/dist/core/stdlib/values/tail.d.ts +44 -0
  744. package/dist/core/stdlib/values/tail.d.ts.map +1 -0
  745. package/dist/core/stdlib/values/tail.js +23 -0
  746. package/dist/core/stdlib/values/tail.js.map +1 -0
  747. package/dist/core/stdlib/values/value.d.ts +64 -0
  748. package/dist/core/stdlib/values/value.d.ts.map +1 -0
  749. package/dist/core/stdlib/values/value.js +61 -0
  750. package/dist/core/stdlib/values/value.js.map +1 -0
  751. package/dist/core/stdlib/volatility/bands.d.ts +50 -0
  752. package/dist/core/stdlib/volatility/bands.d.ts.map +1 -0
  753. package/dist/core/stdlib/volatility/bands.js +101 -0
  754. package/dist/core/stdlib/volatility/bands.js.map +1 -0
  755. package/dist/core/stdlib/volatility/deviation.d.ts +43 -0
  756. package/dist/core/stdlib/volatility/deviation.d.ts.map +1 -0
  757. package/dist/core/stdlib/volatility/deviation.js +75 -0
  758. package/dist/core/stdlib/volatility/deviation.js.map +1 -0
  759. package/dist/core/stdlib/volatility/index.d.ts +6 -0
  760. package/dist/core/stdlib/volatility/index.d.ts.map +1 -0
  761. package/dist/core/stdlib/volatility/index.js +5 -0
  762. package/dist/core/stdlib/volatility/index.js.map +1 -0
  763. package/dist/core/stdlib/volatility/measures.d.ts +48 -0
  764. package/dist/core/stdlib/volatility/measures.d.ts.map +1 -0
  765. package/dist/core/stdlib/volatility/measures.js +73 -0
  766. package/dist/core/stdlib/volatility/measures.js.map +1 -0
  767. package/dist/core/stdlib/volatility/range.d.ts +69 -0
  768. package/dist/core/stdlib/volatility/range.d.ts.map +1 -0
  769. package/dist/core/stdlib/volatility/range.js +86 -0
  770. package/dist/core/stdlib/volatility/range.js.map +1 -0
  771. package/dist/core/stdlib/volume/accumulation.d.ts +61 -0
  772. package/dist/core/stdlib/volume/accumulation.d.ts.map +1 -0
  773. package/dist/core/stdlib/volume/accumulation.js +127 -0
  774. package/dist/core/stdlib/volume/accumulation.js.map +1 -0
  775. package/dist/core/stdlib/volume/flow.d.ts +60 -0
  776. package/dist/core/stdlib/volume/flow.d.ts.map +1 -0
  777. package/dist/core/stdlib/volume/flow.js +125 -0
  778. package/dist/core/stdlib/volume/flow.js.map +1 -0
  779. package/dist/core/stdlib/volume/index.d.ts +5 -0
  780. package/dist/core/stdlib/volume/index.d.ts.map +1 -0
  781. package/dist/core/stdlib/volume/index.js +4 -0
  782. package/dist/core/stdlib/volume/index.js.map +1 -0
  783. package/dist/core/stdlib/volume/weighted.d.ts +52 -0
  784. package/dist/core/stdlib/volume/weighted.d.ts.map +1 -0
  785. package/dist/core/stdlib/volume/weighted.js +64 -0
  786. package/dist/core/stdlib/volume/weighted.js.map +1 -0
  787. package/dist/core/version/version.generated.d.ts +2 -2
  788. package/dist/core/version/version.generated.d.ts.map +1 -1
  789. package/dist/core/version/version.generated.js +2 -2
  790. package/dist/core/version/version.generated.js.map +1 -1
  791. package/package.json +38 -14
  792. package/spec/errors.json +382 -183
  793. package/src/adapters/charts/alerts.ts +116 -0
  794. package/src/adapters/charts/bars.ts +63 -0
  795. package/src/adapters/charts/candles.ts +137 -0
  796. package/src/adapters/charts/colours.ts +113 -0
  797. package/src/adapters/charts/columns.ts +99 -0
  798. package/src/adapters/charts/contract.ts +320 -0
  799. package/src/adapters/charts/descriptor.ts +199 -0
  800. package/src/adapters/charts/drawings.ts +213 -0
  801. package/src/adapters/charts/errors.ts +45 -0
  802. package/src/adapters/charts/fields.ts +74 -0
  803. package/src/adapters/charts/fills.ts +71 -0
  804. package/src/adapters/charts/index.ts +78 -0
  805. package/src/adapters/charts/levels.ts +92 -0
  806. package/src/adapters/charts/markers.ts +119 -0
  807. package/src/adapters/charts/paint.ts +101 -0
  808. package/src/adapters/charts/plots.ts +185 -0
  809. package/src/adapters/charts/produced.ts +68 -0
  810. package/src/adapters/charts/requests.ts +357 -0
  811. package/src/adapters/charts/run.ts +327 -0
  812. package/src/adapters/charts/settings.ts +273 -0
  813. package/src/adapters/charts/surfaces.ts +238 -0
  814. package/src/adapters/charts/tables.ts +155 -0
  815. package/src/core/catalogue/catalogue.generated.ts +17 -9
  816. package/src/core/catalogue/values.generated.ts +8 -0
  817. package/src/core/check/arguments.ts +126 -0
  818. package/src/core/check/call-sites.ts +385 -0
  819. package/src/core/check/call-warmup.ts +121 -0
  820. package/src/core/check/calls.ts +412 -0
  821. package/src/core/check/check.ts +183 -0
  822. package/src/core/check/checked.ts +228 -0
  823. package/src/core/check/checker.ts +393 -0
  824. package/src/core/check/conditional.ts +143 -0
  825. package/src/core/check/constant.ts +127 -0
  826. package/src/core/check/declaration.ts +230 -0
  827. package/src/core/check/expressions.ts +471 -0
  828. package/src/core/check/functions.ts +283 -0
  829. package/src/core/check/handles.ts +75 -0
  830. package/src/core/check/index.ts +67 -0
  831. package/src/core/check/library-bars.ts +194 -0
  832. package/src/core/check/library-orders.ts +290 -0
  833. package/src/core/check/library-output.ts +241 -0
  834. package/src/core/check/library-series.ts +457 -0
  835. package/src/core/check/library.ts +374 -0
  836. package/src/core/check/literals.ts +35 -0
  837. package/src/core/check/outputs.ts +152 -0
  838. package/src/core/check/statements.ts +465 -0
  839. package/src/core/check/suggest.ts +63 -0
  840. package/src/core/check/surface.ts +115 -0
  841. package/src/core/check/tags.ts +94 -0
  842. package/src/core/check/types.ts +260 -0
  843. package/src/core/check/warmup.ts +100 -0
  844. package/src/core/diagnostics/collector.ts +27 -1
  845. package/src/core/emit/calls.ts +415 -0
  846. package/src/core/emit/canonical.ts +81 -0
  847. package/src/core/emit/channels.ts +144 -0
  848. package/src/core/emit/code.ts +155 -0
  849. package/src/core/emit/colours.ts +75 -0
  850. package/src/core/emit/context.ts +461 -0
  851. package/src/core/emit/defaults.ts +150 -0
  852. package/src/core/emit/emit.ts +313 -0
  853. package/src/core/emit/events.ts +141 -0
  854. package/src/core/emit/expressions.ts +292 -0
  855. package/src/core/emit/functions.ts +195 -0
  856. package/src/core/emit/gaps.ts +44 -0
  857. package/src/core/emit/index.ts +74 -0
  858. package/src/core/emit/inputs.ts +179 -0
  859. package/src/core/emit/layout.ts +165 -0
  860. package/src/core/emit/meta.ts +104 -0
  861. package/src/core/emit/opcodes.ts +160 -0
  862. package/src/core/emit/outputs.ts +357 -0
  863. package/src/core/emit/pool.ts +102 -0
  864. package/src/core/emit/program.ts +385 -0
  865. package/src/core/emit/registers.ts +179 -0
  866. package/src/core/emit/request-scope.ts +52 -0
  867. package/src/core/emit/requests.ts +258 -0
  868. package/src/core/emit/requires.ts +91 -0
  869. package/src/core/emit/sha256.ts +119 -0
  870. package/src/core/emit/statements.ts +438 -0
  871. package/src/core/emit/values.ts +284 -0
  872. package/src/core/engine/alerts.ts +152 -0
  873. package/src/core/engine/arithmetic.ts +165 -0
  874. package/src/core/engine/bars.ts +224 -0
  875. package/src/core/engine/budget.ts +284 -0
  876. package/src/core/engine/channels.ts +171 -0
  877. package/src/core/engine/drawings.ts +127 -0
  878. package/src/core/engine/engine.ts +498 -0
  879. package/src/core/engine/errors.ts +100 -0
  880. package/src/core/engine/frames.ts +85 -0
  881. package/src/core/engine/grids.ts +98 -0
  882. package/src/core/engine/guard.ts +71 -0
  883. package/src/core/engine/host.ts +251 -0
  884. package/src/core/engine/index.ts +93 -0
  885. package/src/core/engine/inputs.ts +263 -0
  886. package/src/core/engine/ledger/call.ts +218 -0
  887. package/src/core/engine/ledger/closable.ts +269 -0
  888. package/src/core/engine/ledger/holdings.ts +354 -0
  889. package/src/core/engine/ledger/index.ts +28 -0
  890. package/src/core/engine/ledger/intent.ts +112 -0
  891. package/src/core/engine/ledger/ledger.ts +314 -0
  892. package/src/core/engine/ledger/place.ts +277 -0
  893. package/src/core/engine/ledger/positions.ts +123 -0
  894. package/src/core/engine/ledger/refuse.ts +378 -0
  895. package/src/core/engine/ledger/row.ts +318 -0
  896. package/src/core/engine/ledger/sizing.ts +292 -0
  897. package/src/core/engine/library/arrays.ts +316 -0
  898. package/src/core/engine/library/averages.ts +97 -0
  899. package/src/core/engine/library/binding.ts +325 -0
  900. package/src/core/engine/library/chart.ts +115 -0
  901. package/src/core/engine/library/colours.ts +111 -0
  902. package/src/core/engine/library/dates.ts +109 -0
  903. package/src/core/engine/library/index.ts +103 -0
  904. package/src/core/engine/library/maths.ts +134 -0
  905. package/src/core/engine/library/objects.ts +265 -0
  906. package/src/core/engine/library/oscillators.ts +124 -0
  907. package/src/core/engine/library/ranges.ts +51 -0
  908. package/src/core/engine/library/series.ts +236 -0
  909. package/src/core/engine/library/state.ts +47 -0
  910. package/src/core/engine/library/studies.ts +150 -0
  911. package/src/core/engine/library/text.ts +303 -0
  912. package/src/core/engine/library/trend.ts +79 -0
  913. package/src/core/engine/library/volume.ts +101 -0
  914. package/src/core/engine/load.ts +104 -0
  915. package/src/core/engine/machine.ts +446 -0
  916. package/src/core/engine/memory.ts +129 -0
  917. package/src/core/engine/operations.ts +171 -0
  918. package/src/core/engine/orders.ts +121 -0
  919. package/src/core/engine/registers.ts +104 -0
  920. package/src/core/engine/request-body.ts +328 -0
  921. package/src/core/engine/request-plan.ts +270 -0
  922. package/src/core/engine/requests.ts +382 -0
  923. package/src/core/engine/results.ts +41 -0
  924. package/src/core/engine/series.ts +82 -0
  925. package/src/core/engine/session/hours.ts +86 -0
  926. package/src/core/engine/session/index.ts +17 -0
  927. package/src/core/engine/session/record.ts +191 -0
  928. package/src/core/engine/session/spec.ts +45 -0
  929. package/src/core/engine/timeframe.ts +161 -0
  930. package/src/core/engine/types.ts +47 -0
  931. package/src/core/engine/values/heap.ts +295 -0
  932. package/src/core/engine/values/index.ts +34 -0
  933. package/src/core/engine/values/value.ts +158 -0
  934. package/src/core/engine/verify-budgets.ts +202 -0
  935. package/src/core/engine/verify-code.ts +332 -0
  936. package/src/core/engine/verify-requests.ts +255 -0
  937. package/src/core/engine/verify-shape.ts +164 -0
  938. package/src/core/engine/verify-tables.ts +176 -0
  939. package/src/core/engine/verify.ts +341 -0
  940. package/src/core/index.ts +128 -6
  941. package/src/core/parse/expressions.ts +1 -1
  942. package/src/core/parse/names.ts +29 -2
  943. package/src/core/stdlib/averages/exponential.ts +119 -0
  944. package/src/core/stdlib/averages/index.ts +45 -0
  945. package/src/core/stdlib/averages/select.ts +71 -0
  946. package/src/core/stdlib/averages/shaped.ts +161 -0
  947. package/src/core/stdlib/averages/simple.ts +139 -0
  948. package/src/core/stdlib/calendar/civil.ts +89 -0
  949. package/src/core/stdlib/calendar/fields.ts +124 -0
  950. package/src/core/stdlib/calendar/format.ts +71 -0
  951. package/src/core/stdlib/calendar/index.ts +15 -0
  952. package/src/core/stdlib/calendar/zone.ts +161 -0
  953. package/src/core/stdlib/index.ts +400 -0
  954. package/src/core/stdlib/maths/arithmetic.ts +74 -0
  955. package/src/core/stdlib/maths/elementary.ts +124 -0
  956. package/src/core/stdlib/maths/index.ts +43 -0
  957. package/src/core/stdlib/maths/rounding.ts +78 -0
  958. package/src/core/stdlib/momentum/convergence.ts +82 -0
  959. package/src/core/stdlib/momentum/index.ts +47 -0
  960. package/src/core/stdlib/momentum/pressure.ts +141 -0
  961. package/src/core/stdlib/momentum/rates.ts +188 -0
  962. package/src/core/stdlib/momentum/rsi.ts +49 -0
  963. package/src/core/stdlib/momentum/stochastic.ts +147 -0
  964. package/src/core/stdlib/series/changes.ts +177 -0
  965. package/src/core/stdlib/series/conditions.ts +74 -0
  966. package/src/core/stdlib/series/extremes.ts +92 -0
  967. package/src/core/stdlib/series/index.ts +83 -0
  968. package/src/core/stdlib/series/pivots.ts +63 -0
  969. package/src/core/stdlib/series/statistics.ts +207 -0
  970. package/src/core/stdlib/series/totals.ts +164 -0
  971. package/src/core/stdlib/trend/directional.ts +196 -0
  972. package/src/core/stdlib/trend/index.ts +13 -0
  973. package/src/core/stdlib/trend/psar.ts +131 -0
  974. package/src/core/stdlib/trend/supertrend.ts +100 -0
  975. package/src/core/stdlib/values/bar.ts +54 -0
  976. package/src/core/stdlib/values/index.ts +14 -0
  977. package/src/core/stdlib/values/lookback.ts +198 -0
  978. package/src/core/stdlib/values/region.ts +86 -0
  979. package/src/core/stdlib/values/tail.ts +58 -0
  980. package/src/core/stdlib/values/value.ts +82 -0
  981. package/src/core/stdlib/volatility/bands.ts +178 -0
  982. package/src/core/stdlib/volatility/deviation.ts +111 -0
  983. package/src/core/stdlib/volatility/index.ts +48 -0
  984. package/src/core/stdlib/volatility/measures.ts +96 -0
  985. package/src/core/stdlib/volatility/range.ts +143 -0
  986. package/src/core/stdlib/volume/accumulation.ts +152 -0
  987. package/src/core/stdlib/volume/flow.ts +173 -0
  988. package/src/core/stdlib/volume/index.ts +43 -0
  989. package/src/core/stdlib/volume/weighted.ts +101 -0
  990. package/src/core/version/version.generated.ts +2 -2
package/spec/errors.json CHANGED
@@ -92,7 +92,7 @@
92
92
  },
93
93
  "spec": "language.md 3.1, 3.3, 3.12",
94
94
  "refines": null,
95
- "test": "tests/errors/OS1001"
95
+ "test": "tests/examples/rejected/OS1001.oscript"
96
96
  },
97
97
  {
98
98
  "code": "OS1002",
@@ -111,7 +111,7 @@
111
111
  },
112
112
  "spec": "language.md 3.10",
113
113
  "refines": null,
114
- "test": "tests/errors/OS1002"
114
+ "test": "tests/examples/rejected/OS1002.oscript"
115
115
  },
116
116
  {
117
117
  "code": "OS1003",
@@ -129,12 +129,12 @@
129
129
  "fix": "Indent this line to {expected} spaces to keep it in the block, or to {line}'s own indentation to end the block here.",
130
130
  "autofix": true,
131
131
  "example": {
132
- "before": "if trending\n fast = ema(close, 9)\n slow = ema(close, 21)",
133
- "after": "if trending\n fast = ema(close, 9)\n slow = ema(close, 21)"
132
+ "before": "if trending\n body = close - open\n wick = high - low",
133
+ "after": "if trending\n body = close - open\n wick = high - low"
134
134
  },
135
135
  "spec": "language.md 3.10",
136
136
  "refines": null,
137
- "test": "tests/errors/OS1003"
137
+ "test": "tests/examples/rejected/OS1003.oscript"
138
138
  },
139
139
  {
140
140
  "code": "OS1004",
@@ -155,7 +155,7 @@
155
155
  },
156
156
  "spec": "language.md 3.6",
157
157
  "refines": null,
158
- "test": "tests/errors/OS1004"
158
+ "test": "tests/examples/rejected/OS1004.oscript"
159
159
  },
160
160
  {
161
161
  "code": "OS1005",
@@ -176,7 +176,7 @@
176
176
  },
177
177
  "spec": "language.md 3.6",
178
178
  "refines": "OS1004",
179
- "test": "tests/errors/OS1005"
179
+ "test": "tests/examples/rejected/OS1005.oscript"
180
180
  },
181
181
  {
182
182
  "code": "OS1006",
@@ -195,7 +195,7 @@
195
195
  },
196
196
  "spec": "language.md 10.1",
197
197
  "refines": null,
198
- "test": "tests/errors/OS1006"
198
+ "test": "tests/examples/rejected/OS1006.oscript"
199
199
  },
200
200
  {
201
201
  "code": "OS1007",
@@ -214,7 +214,7 @@
214
214
  },
215
215
  "spec": "language.md 3.10",
216
216
  "refines": null,
217
- "test": "tests/errors/OS1007"
217
+ "test": "tests/examples/rejected/OS1007.oscript"
218
218
  },
219
219
  {
220
220
  "code": "OS1008",
@@ -236,7 +236,7 @@
236
236
  },
237
237
  "spec": "language.md 9.3",
238
238
  "refines": null,
239
- "test": "tests/errors/OS1008"
239
+ "test": "tests/examples/rejected/OS1008.oscript"
240
240
  },
241
241
  {
242
242
  "code": "OS1009",
@@ -257,7 +257,7 @@
257
257
  },
258
258
  "spec": "language.md 10.5",
259
259
  "refines": null,
260
- "test": "tests/errors/OS1009"
260
+ "test": "tests/examples/rejected/OS1009.oscript"
261
261
  },
262
262
  {
263
263
  "code": "OS1010",
@@ -278,7 +278,7 @@
278
278
  },
279
279
  "spec": "language.md 3.10",
280
280
  "refines": null,
281
- "test": "tests/errors/OS1010"
281
+ "test": "tests/examples/rejected/OS1010.oscript"
282
282
  },
283
283
  {
284
284
  "code": "OS1011",
@@ -299,7 +299,7 @@
299
299
  },
300
300
  "spec": "language.md 8.2",
301
301
  "refines": null,
302
- "test": "tests/errors/OS1011"
302
+ "test": "tests/examples/rejected/OS1011.oscript"
303
303
  },
304
304
  {
305
305
  "code": "OS1012",
@@ -321,7 +321,7 @@
321
321
  },
322
322
  "spec": "language.md 3.11",
323
323
  "refines": null,
324
- "test": "tests/errors/OS1012"
324
+ "test": "tests/examples/rejected/OS1012.oscript"
325
325
  },
326
326
  {
327
327
  "code": "OS1013",
@@ -345,7 +345,7 @@
345
345
  },
346
346
  "spec": "language.md 19",
347
347
  "refines": null,
348
- "test": "tests/errors/OS1013"
348
+ "test": "tests/examples/rejected/OS1013.oscript"
349
349
  },
350
350
  {
351
351
  "code": "OS1014",
@@ -366,7 +366,7 @@
366
366
  },
367
367
  "spec": "language.md 11.2",
368
368
  "refines": null,
369
- "test": "tests/errors/OS1014"
369
+ "test": "tests/examples/rejected/OS1014.oscript"
370
370
  },
371
371
  {
372
372
  "code": "OS1015",
@@ -385,7 +385,7 @@
385
385
  },
386
386
  "spec": "language.md 9.5",
387
387
  "refines": null,
388
- "test": "tests/errors/OS1015"
388
+ "test": "tests/examples/rejected/OS1015.oscript"
389
389
  },
390
390
  {
391
391
  "code": "OS1016",
@@ -407,7 +407,7 @@
407
407
  },
408
408
  "spec": "language.md 10.2",
409
409
  "refines": null,
410
- "test": "tests/errors/OS1016"
410
+ "test": "tests/examples/rejected/OS1016.oscript"
411
411
  },
412
412
  {
413
413
  "code": "OS1017",
@@ -428,7 +428,7 @@
428
428
  },
429
429
  "spec": "language.md 10.6",
430
430
  "refines": null,
431
- "test": "tests/errors/OS1017"
431
+ "test": "tests/examples/rejected/OS1017.oscript"
432
432
  },
433
433
  {
434
434
  "code": "OS1018",
@@ -449,7 +449,7 @@
449
449
  },
450
450
  "spec": "language.md 3.10",
451
451
  "refines": null,
452
- "test": "tests/errors/OS1018"
452
+ "test": "tests/examples/rejected/OS1018.oscript"
453
453
  },
454
454
  {
455
455
  "code": "OS1019",
@@ -471,7 +471,7 @@
471
471
  },
472
472
  "spec": "language.md 3.4",
473
473
  "refines": null,
474
- "test": "tests/errors/OS1019"
474
+ "test": "tests/examples/rejected/OS1019.oscript"
475
475
  },
476
476
  {
477
477
  "code": "OS1020",
@@ -492,7 +492,7 @@
492
492
  },
493
493
  "spec": "language.md 10.3",
494
494
  "refines": null,
495
- "test": "tests/errors/OS1020"
495
+ "test": "tests/examples/rejected/OS1020.oscript"
496
496
  },
497
497
  {
498
498
  "code": "OS1021",
@@ -513,7 +513,7 @@
513
513
  },
514
514
  "spec": "language.md 4",
515
515
  "refines": null,
516
- "test": "tests/errors/OS1021"
516
+ "test": "tests/examples/rejected/OS1021.oscript"
517
517
  },
518
518
  {
519
519
  "code": "OS1022",
@@ -530,11 +530,11 @@
530
530
  "autofix": false,
531
531
  "example": {
532
532
  "before": "len = input(14, \"Length\") +",
533
- "after": "len = input(14, \"Length\") + 1"
533
+ "after": "len = input(14, \"Length\")"
534
534
  },
535
535
  "spec": "language.md 3.11",
536
536
  "refines": null,
537
- "test": "tests/errors/OS1022"
537
+ "test": "tests/examples/rejected/OS1022.oscript"
538
538
  },
539
539
  {
540
540
  "code": "OS1023",
@@ -551,11 +551,11 @@
551
551
  "autofix": false,
552
552
  "example": {
553
553
  "before": "if trending\n fn smoothed(src) => sma(src, 9)\n plot(smoothed(close), \"Smooth\", aqua)",
554
- "after": "fn smoothed(src) => sma(src, 9)\n\nif trending\n plot(smoothed(close), \"Smooth\", aqua)"
554
+ "after": "fn smoothed(src) => sma(src, 9)\n\nsmooth = smoothed(close)\nplot(trending ? smooth : none, \"Smooth\", aqua)"
555
555
  },
556
556
  "spec": "language.md 11.1",
557
557
  "refines": null,
558
- "test": "tests/errors/OS1023"
558
+ "test": "tests/examples/rejected/OS1023.oscript"
559
559
  },
560
560
  {
561
561
  "code": "OS1024",
@@ -576,7 +576,7 @@
576
576
  },
577
577
  "spec": "language.md 9.6, 14.1, 19",
578
578
  "refines": null,
579
- "test": "tests/errors/OS1024"
579
+ "test": "tests/examples/rejected/OS1024.oscript"
580
580
  },
581
581
  {
582
582
  "code": "OS1025",
@@ -598,7 +598,7 @@
598
598
  },
599
599
  "spec": "language.md 15.2, 19",
600
600
  "refines": null,
601
- "test": "tests/errors/OS1025"
601
+ "test": "tests/examples/rejected/OS1025.oscript"
602
602
  },
603
603
  {
604
604
  "code": "OS1026",
@@ -619,7 +619,7 @@
619
619
  },
620
620
  "spec": "language.md 3.2",
621
621
  "refines": null,
622
- "test": "tests/errors/OS1026"
622
+ "test": "tests/examples/rejected/OS1026.oscript"
623
623
  },
624
624
  {
625
625
  "code": "OS1027",
@@ -640,7 +640,7 @@
640
640
  },
641
641
  "spec": "language.md 3.8",
642
642
  "refines": "OS1001",
643
- "test": "tests/errors/OS1027"
643
+ "test": "tests/examples/rejected/OS1027.oscript"
644
644
  },
645
645
  {
646
646
  "code": "OS1028",
@@ -663,7 +663,7 @@
663
663
  },
664
664
  "spec": "language.md 3.11",
665
665
  "refines": "OS1003",
666
- "test": "tests/errors/OS1028"
666
+ "test": "tests/examples/rejected/OS1028.oscript"
667
667
  },
668
668
  {
669
669
  "code": "OS1029",
@@ -685,7 +685,7 @@
685
685
  },
686
686
  "spec": "language.md 3.3, 3.5",
687
687
  "refines": "OS1001",
688
- "test": "tests/errors/OS1029"
688
+ "test": "tests/examples/rejected/OS1029.oscript"
689
689
  },
690
690
  {
691
691
  "code": "OS2001",
@@ -707,7 +707,7 @@
707
707
  },
708
708
  "spec": "language.md 12.2, 12.5",
709
709
  "refines": null,
710
- "test": "tests/errors/OS2001"
710
+ "test": "tests/unit/check-names.test.ts"
711
711
  },
712
712
  {
713
713
  "code": "OS2002",
@@ -729,7 +729,7 @@
729
729
  },
730
730
  "spec": "language.md 12.3, 12.4",
731
731
  "refines": null,
732
- "test": "tests/errors/OS2002"
732
+ "test": "tests/unit/check-names.test.ts"
733
733
  },
734
734
  {
735
735
  "code": "OS2003",
@@ -739,11 +739,11 @@
739
739
  "since": 1,
740
740
  "message": "{leftType} and {rightType} do not mix here.",
741
741
  "placeholders": {
742
- "leftType": "the type of the left operand or of the name's first assignment",
742
+ "leftType": "the type of the left operand or of the name's first assignment, or the words a per-bar value where the position takes a value of any type and a declaration handle was written",
743
743
  "rightType": "the type of the right operand or of the value being assigned"
744
744
  },
745
745
  "cause": "There is no implicit conversion anywhere in the language: 0 is not false, an empty string is not false, and a number is not a string. A name's type is fixed by its first assignment, so assigning a different type later arrives here too. A first assignment of none fixes no type, because none is a member of every type; the type comes from the first assignment that gives a definite one, and this code names the second definite type rather than the first. Every silent coercion rule is a source of bugs that survive review, and a trading script that quietly treats a zero as a false is a bug nobody finds until it costs money. A declaration handle arrives here as well: plot(), plotCandles(), fill() and level() return the compile-time half of a declaration (language.md 5.4), so a handle in a position that requires a value has nothing to give, and the message names its type as plot, fill or level.",
746
- "fix": "Convert explicitly: text(x) for a string, number(s) for a number, bool(x) for a bool, or use a separate name for the second value. A plot, fill or level handle converts to nothing: leave it named at the top level, pass it to fill(), and use draw.line() or draw.box() where the script needs something it can keep.",
746
+ "fix": "Convert explicitly: text(x) for a string, or text(x, decimals) to fix the decimals. Where no conversion applies, write the value in the type the line needs, or give the second value a name of its own. A plot, fill or level handle converts to nothing: leave it named at the top level, pass it to fill(), and use draw.line() or draw.box() where the script needs something it can keep.",
747
747
  "autofix": false,
748
748
  "example": {
749
749
  "before": "s = \"count: \" + 5",
@@ -751,7 +751,7 @@
751
751
  },
752
752
  "spec": "language.md 5.3, 5.4, 10.1",
753
753
  "refines": null,
754
- "test": "tests/errors/OS2003"
754
+ "test": "tests/unit/check-handles.test.ts"
755
755
  },
756
756
  {
757
757
  "code": "OS2004",
@@ -764,7 +764,7 @@
764
764
  "expr": "the expression the history operator was applied to"
765
765
  },
766
766
  "cause": "History is retained for four kinds of value: a built-in series, a name assigned at the top level of the file, a call to a function declared to return a series, and a series parameter of a user function. Retaining it for every temporary inside every block would cost memory per bar and would not run fifty thousand bars in a browser tab. A name bound to a declaration handle is none of the four, although it sits at the top level: it is a compile-time binding with no per-bar value at all. A runtime object carries no history either, so [] on a line, a label, a box, a polyline or a table is this error as well (language.md 5.4).",
767
- "fix": "Assign the value to a name at the top level of the file, then read that name's history.",
767
+ "fix": "If the value is a per-bar number computed inside a block or left as a temporary, assign it at the top level of the file and read the history of that top level name. If it is a declaration handle, a runtime object or a library fact that is not a series, no name gives it a history: assign what you want to look back at to a top level name of its own, and read that.",
768
768
  "autofix": false,
769
769
  "example": {
770
770
  "before": "if trending\n body = close - open\n plot(body[1], \"Previous body\", aqua)",
@@ -772,7 +772,7 @@
772
772
  },
773
773
  "spec": "language.md 5.2, 5.4",
774
774
  "refines": null,
775
- "test": "tests/errors/OS2004"
775
+ "test": "tests/unit/check-types.test.ts"
776
776
  },
777
777
  {
778
778
  "code": "OS2005",
@@ -794,7 +794,7 @@
794
794
  },
795
795
  "spec": "language.md 11.4",
796
796
  "refines": null,
797
- "test": "tests/errors/OS2005"
797
+ "test": "tests/unit/check-names.test.ts"
798
798
  },
799
799
  {
800
800
  "code": "OS2006",
@@ -815,7 +815,7 @@
815
815
  },
816
816
  "spec": "language.md 10.3",
817
817
  "refines": null,
818
- "test": "tests/errors/OS2006"
818
+ "test": "tests/unit/check-names.test.ts"
819
819
  },
820
820
  {
821
821
  "code": "OS2007",
@@ -834,7 +834,7 @@
834
834
  },
835
835
  "spec": "language.md 13.1",
836
836
  "refines": null,
837
- "test": "tests/errors/OS2007"
837
+ "test": "tests/unit/check-support.ts"
838
838
  },
839
839
  {
840
840
  "code": "OS2008",
@@ -856,7 +856,7 @@
856
856
  },
857
857
  "spec": "language.md 13.1",
858
858
  "refines": null,
859
- "test": "tests/errors/OS2008"
859
+ "test": "tests/unit/check-calls.test.ts"
860
860
  },
861
861
  {
862
862
  "code": "OS2009",
@@ -879,7 +879,7 @@
879
879
  },
880
880
  "spec": "language.md 15.2",
881
881
  "refines": null,
882
- "test": "tests/errors/OS2009"
882
+ "test": "tests/unit/check-names.test.ts"
883
883
  },
884
884
  {
885
885
  "code": "OS2010",
@@ -902,7 +902,7 @@
902
902
  },
903
903
  "spec": "language.md 15.1",
904
904
  "refines": null,
905
- "test": "tests/errors/OS2010"
905
+ "test": null
906
906
  },
907
907
  {
908
908
  "code": "OS2011",
@@ -924,7 +924,7 @@
924
924
  },
925
925
  "spec": "language.md 5.3, 10.2",
926
926
  "refines": "OS2003",
927
- "test": "tests/errors/OS2011"
927
+ "test": "tests/unit/check-types.test.ts"
928
928
  },
929
929
  {
930
930
  "code": "OS2012",
@@ -938,7 +938,7 @@
938
938
  "rightType": "the type of the arm after the colon"
939
939
  },
940
940
  "cause": "The ternary yields one value, so both arms must agree on its type. The one exception is none, which is a member of every type and is how an arm says there is nothing here.",
941
- "fix": "Make both arms the same type with text() or number(), or use none for the empty arm.",
941
+ "fix": "Make both arms the same type with text() or toNumber(), or use none for the empty arm.",
942
942
  "autofix": false,
943
943
  "example": {
944
944
  "before": "label = up ? 1 : \"down\"",
@@ -946,7 +946,7 @@
946
946
  },
947
947
  "spec": "language.md 9.5",
948
948
  "refines": "OS2003",
949
- "test": "tests/errors/OS2012"
949
+ "test": "tests/unit/check-types.test.ts"
950
950
  },
951
951
  {
952
952
  "code": "OS2013",
@@ -969,7 +969,7 @@
969
969
  },
970
970
  "spec": "language.md 14.1",
971
971
  "refines": "OS2003",
972
- "test": "tests/errors/OS2013"
972
+ "test": "tests/unit/check-types.test.ts"
973
973
  },
974
974
  {
975
975
  "code": "OS2014",
@@ -990,7 +990,7 @@
990
990
  },
991
991
  "spec": "language.md 11.1, 18",
992
992
  "refines": null,
993
- "test": "tests/errors/OS2014"
993
+ "test": "tests/emit/worked-example.test.ts"
994
994
  },
995
995
  {
996
996
  "code": "OS2015",
@@ -1009,7 +1009,7 @@
1009
1009
  },
1010
1010
  "spec": "language.md 14.1",
1011
1011
  "refines": null,
1012
- "test": "tests/errors/OS2015"
1012
+ "test": "tests/unit/check-types.test.ts"
1013
1013
  },
1014
1014
  {
1015
1015
  "code": "OS2016",
@@ -1030,7 +1030,7 @@
1030
1030
  },
1031
1031
  "spec": "language.md 5.1, 5.4, 19",
1032
1032
  "refines": null,
1033
- "test": "tests/errors/OS2016"
1033
+ "test": "tests/unit/check-types.test.ts"
1034
1034
  },
1035
1035
  {
1036
1036
  "code": "OS2017",
@@ -1052,7 +1052,7 @@
1052
1052
  },
1053
1053
  "spec": "language.md 11.1",
1054
1054
  "refines": null,
1055
- "test": "tests/errors/OS2017"
1055
+ "test": "tests/unit/check-names.test.ts"
1056
1056
  },
1057
1057
  {
1058
1058
  "code": "OS2018",
@@ -1073,7 +1073,7 @@
1073
1073
  },
1074
1074
  "spec": "language.md 11.2",
1075
1075
  "refines": null,
1076
- "test": "tests/errors/OS2018"
1076
+ "test": "tests/unit/check-names.test.ts"
1077
1077
  },
1078
1078
  {
1079
1079
  "code": "OS2019",
@@ -1094,7 +1094,28 @@
1094
1094
  },
1095
1095
  "spec": "language.md 5.4, 14.1, 19",
1096
1096
  "refines": "OS2016",
1097
- "test": "tests/errors/OS2019"
1097
+ "test": "tests/unit/check-types.test.ts"
1098
+ },
1099
+ {
1100
+ "code": "OS2020",
1101
+ "title": "Name is planned, not implemented",
1102
+ "severity": "error",
1103
+ "stage": "check",
1104
+ "since": 1,
1105
+ "message": "{name} is planned and is not implemented in this version.",
1106
+ "placeholders": {
1107
+ "name": "the planned name that was called or read"
1108
+ },
1109
+ "cause": "The library names a few calls and facts it does not implement yet, so that the gap is visible rather than left for a reader to guess at (stdlib.md 1). The checker knows this name and knows it carries no behaviour, which is a different fact from a name it has never heard of: nothing about the spelling is wrong, no line above it would help, and the name starts working on a version that implements it.",
1110
+ "fix": "Compute what {name} would give from names the library implements today, or take the line out until a version implements it. Do not reach for the nearest name that compiles: a neighbour computes something else, and a plot that quietly changes meaning is worse than one that refuses to compile.",
1111
+ "autofix": false,
1112
+ "example": {
1113
+ "before": "zScore = (close - sma(close, 20)) / stdev(close, 20)\nplot(math.tanh(zScore), \"Squashed\", aqua)",
1114
+ "after": "zScore = (close - sma(close, 20)) / stdev(close, 20)\ndoubled = exp(2 * zScore)\nplot((doubled - 1) / (doubled + 1), \"Squashed\", aqua)"
1115
+ },
1116
+ "spec": "stdlib.md 1",
1117
+ "refines": "OS2001",
1118
+ "test": "tests/unit/check-names.test.ts"
1098
1119
  },
1099
1120
  {
1100
1121
  "code": "OS3001",
@@ -1113,12 +1134,12 @@
1113
1134
  "fix": "Pass the arguments the signature names: {signature}.",
1114
1135
  "autofix": false,
1115
1136
  "example": {
1116
- "before": "e = ema(close)",
1137
+ "before": "e = ema(close, 9, 2)",
1117
1138
  "after": "e = ema(close, 9)"
1118
1139
  },
1119
1140
  "spec": "language.md 11.2",
1120
1141
  "refines": null,
1121
- "test": "tests/errors/OS3001"
1142
+ "test": "tests/unit/check-calls.test.ts"
1122
1143
  },
1123
1144
  {
1124
1145
  "code": "OS3002",
@@ -1142,7 +1163,7 @@
1142
1163
  },
1143
1164
  "spec": "language.md 11.2",
1144
1165
  "refines": null,
1145
- "test": "tests/errors/OS3002"
1166
+ "test": "tests/unit/check-calls.test.ts"
1146
1167
  },
1147
1168
  {
1148
1169
  "code": "OS3003",
@@ -1159,11 +1180,11 @@
1159
1180
  "autofix": false,
1160
1181
  "example": {
1161
1182
  "before": "study(\"Range\", precision = round(close / 1000))",
1162
- "after": "study(\"Range\", precision = input(2, \"Precision\"))"
1183
+ "after": "study(\"Range\", precision = input(2, \"precision\"))"
1163
1184
  },
1164
1185
  "spec": "language.md 13.2, 15.3",
1165
1186
  "refines": null,
1166
- "test": "tests/errors/OS3003"
1187
+ "test": "tests/unit/check-calls.test.ts"
1167
1188
  },
1168
1189
  {
1169
1190
  "code": "OS3004",
@@ -1182,12 +1203,12 @@
1182
1203
  "fix": "Pass a whole number inside {range}, and wrap a computed value in floor() or round().",
1183
1204
  "autofix": false,
1184
1205
  "example": {
1185
- "before": "s = sma(close, len / 2)",
1186
- "after": "s = sma(close, floor(len / 2))"
1206
+ "before": "t = table(\"Summary\", 2.5, 2)",
1207
+ "after": "t = table(\"Summary\", 3, 2)"
1187
1208
  },
1188
1209
  "spec": "language.md 5.1, 10.3",
1189
1210
  "refines": null,
1190
- "test": "tests/errors/OS3004"
1211
+ "test": "tests/engine/machine.test.ts"
1191
1212
  },
1192
1213
  {
1193
1214
  "code": "OS3005",
@@ -1206,7 +1227,7 @@
1206
1227
  },
1207
1228
  "spec": "language.md 11.2",
1208
1229
  "refines": null,
1209
- "test": "tests/errors/OS3005"
1230
+ "test": "tests/unit/check-calls.test.ts"
1210
1231
  },
1211
1232
  {
1212
1233
  "code": "OS3006",
@@ -1228,7 +1249,7 @@
1228
1249
  },
1229
1250
  "spec": "language.md 7.1, 15.3; stdlib.md 17.6",
1230
1251
  "refines": null,
1231
- "test": "tests/errors/OS3006"
1252
+ "test": "tests/unit/check-calls.test.ts"
1232
1253
  },
1233
1254
  {
1234
1255
  "code": "OS3007",
@@ -1243,11 +1264,11 @@
1243
1264
  "autofix": false,
1244
1265
  "example": {
1245
1266
  "before": "if useBand\n len = input(20, \"Length\")",
1246
- "after": "len = input(20, \"Length\")\nif useBand\n b = sma(close, len)"
1267
+ "after": "len = input(20, \"Length\")\nb = sma(close, len)\nplot(useBand ? b : none, \"Band\", aqua)"
1247
1268
  },
1248
1269
  "spec": "language.md 13.4",
1249
1270
  "refines": null,
1250
- "test": "tests/errors/OS3007"
1271
+ "test": "tests/unit/check-calls.test.ts"
1251
1272
  },
1252
1273
  {
1253
1274
  "code": "OS3008",
@@ -1271,7 +1292,7 @@
1271
1292
  },
1272
1293
  "spec": "language.md 13.3",
1273
1294
  "refines": null,
1274
- "test": "tests/errors/OS3008"
1295
+ "test": "tests/unit/check-calls.test.ts"
1275
1296
  },
1276
1297
  {
1277
1298
  "code": "OS3009",
@@ -1289,12 +1310,12 @@
1289
1310
  "fix": "Set {required} in the declaration, or choose a value of {option} that stands on its own.",
1290
1311
  "autofix": false,
1291
1312
  "example": {
1292
- "before": "study(\"Ticks\")\n\nif close > open\n alert(\"Up\", frequency = \"everyUpdate\")",
1293
- "after": "study(\"Ticks\", onUnconfirmed = true)\n\nif close > open\n alert(\"Up\", frequency = \"everyUpdate\")"
1313
+ "before": "study(\"Ticks\")\n\nif close > open\n alert(\"Up\", id = \"up\", frequency = \"everyUpdate\")",
1314
+ "after": "study(\"Ticks\", onUnconfirmed = true)\n\nif close > open\n alert(\"Up\", id = \"up\", frequency = \"everyUpdate\")"
1294
1315
  },
1295
1316
  "spec": "language.md 7.5, 13.2",
1296
1317
  "refines": null,
1297
- "test": "tests/errors/OS3009"
1318
+ "test": "tests/unit/check-calls.test.ts"
1298
1319
  },
1299
1320
  {
1300
1321
  "code": "OS3010",
@@ -1316,7 +1337,7 @@
1316
1337
  },
1317
1338
  "spec": "language.md 13.3, 15.3",
1318
1339
  "refines": null,
1319
- "test": "tests/errors/OS3010"
1340
+ "test": "tests/unit/check-calls.test.ts"
1320
1341
  },
1321
1342
  {
1322
1343
  "code": "OS3011",
@@ -1332,7 +1353,7 @@
1332
1353
  "found": "the type of the expression at the call site"
1333
1354
  },
1334
1355
  "cause": "Arguments are checked against the declared parameter types, with broadcast as the only widening: a plain value may be passed where a series is expected, and it is read as that same value on every bar. Nothing else converts on its own. A declaration handle passed to an argument that does not take one arrives here too; where that argument wanted a runtime object the case has its own code, OS3019, and fill's two plot arguments have OS3020.",
1335
- "fix": "Convert the value with text(), number() or bool(), or pass an expression of type {expected}.",
1356
+ "fix": "Convert the value with text(), toNumber() or toBool(), or pass an expression of type {expected}.",
1336
1357
  "autofix": false,
1337
1358
  "example": {
1338
1359
  "before": "e = ema(close, \"9\")",
@@ -1340,7 +1361,7 @@
1340
1361
  },
1341
1362
  "spec": "language.md 5.2, 5.3",
1342
1363
  "refines": null,
1343
- "test": "tests/errors/OS3011"
1364
+ "test": "tests/unit/check-calls.test.ts"
1344
1365
  },
1345
1366
  {
1346
1367
  "code": "OS3012",
@@ -1363,7 +1384,7 @@
1363
1384
  },
1364
1385
  "spec": "language.md 11.2, 13.2",
1365
1386
  "refines": null,
1366
- "test": "tests/errors/OS3012"
1387
+ "test": "tests/unit/check-calls.test.ts"
1367
1388
  },
1368
1389
  {
1369
1390
  "code": "OS3013",
@@ -1384,7 +1405,7 @@
1384
1405
  },
1385
1406
  "spec": "language.md 11.2",
1386
1407
  "refines": null,
1387
- "test": "tests/errors/OS3013"
1408
+ "test": "tests/unit/check-calls.test.ts"
1388
1409
  },
1389
1410
  {
1390
1411
  "code": "OS3014",
@@ -1405,7 +1426,7 @@
1405
1426
  },
1406
1427
  "spec": "language.md 10.7",
1407
1428
  "refines": null,
1408
- "test": "tests/errors/OS3014"
1429
+ "test": "tests/unit/check-calls.test.ts"
1409
1430
  },
1410
1431
  {
1411
1432
  "code": "OS3015",
@@ -1426,7 +1447,7 @@
1426
1447
  },
1427
1448
  "spec": "language.md 10.7",
1428
1449
  "refines": null,
1429
- "test": "tests/errors/OS3015"
1450
+ "test": "tests/unit/check-calls.test.ts"
1430
1451
  },
1431
1452
  {
1432
1453
  "code": "OS3016",
@@ -1448,7 +1469,7 @@
1448
1469
  },
1449
1470
  "spec": "language.md 13.2",
1450
1471
  "refines": null,
1451
- "test": "tests/errors/OS3016"
1472
+ "test": "tests/unit/check-calls.test.ts"
1452
1473
  },
1453
1474
  {
1454
1475
  "code": "OS3017",
@@ -1458,11 +1479,11 @@
1458
1479
  "since": 1,
1459
1480
  "message": "{kind} names must be unique in a file; {name} is also used at line {line}.",
1460
1481
  "placeholders": {
1461
- "kind": "the thing being named: plot, plotCandles, level, input, table or leg",
1482
+ "kind": "the thing being named: plot, plotCandles, level, input, table, alert or leg",
1462
1483
  "name": "the repeated name, quoted",
1463
1484
  "line": "the line of the first use of that name"
1464
1485
  },
1465
- "cause": "The legend row, the settings dialog and the saved layout all key a column by its name, and an alert message names it. Two columns with one name would overwrite each other's saved settings. fill is not on the list: a band has no name of its own and is identified by the two plots it is drawn between. A leg's name is what every later call keys on, so two legs with one name leave every leg call with no answer.",
1486
+ "cause": "The legend row, the settings dialog and the saved layout all key a column by its name, and an alert message names it. Two columns with one name would overwrite each other's saved settings. fill is not on the list: a band has no name of its own and is identified by the two plots it is drawn between. A leg's name is what every later call keys on, so two legs with one name leave every leg call with no answer. An alert is named by its id, written or derived from the line, and a subscription is kept under that name, so two alerts sharing one leave the user subscribed to whichever of the two the host kept.",
1466
1487
  "fix": "Rename one of them so each name appears once.",
1467
1488
  "autofix": false,
1468
1489
  "example": {
@@ -1471,7 +1492,7 @@
1471
1492
  },
1472
1493
  "spec": "language.md 15.3",
1473
1494
  "refines": null,
1474
- "test": "tests/errors/OS3017"
1495
+ "test": "tests/unit/check-calls.test.ts"
1475
1496
  },
1476
1497
  {
1477
1498
  "code": "OS3018",
@@ -1493,7 +1514,7 @@
1493
1514
  },
1494
1515
  "spec": "language.md 13.4",
1495
1516
  "refines": null,
1496
- "test": "tests/errors/OS3018"
1517
+ "test": "tests/unit/check-calls.test.ts"
1497
1518
  },
1498
1519
  {
1499
1520
  "code": "OS3019",
@@ -1517,7 +1538,7 @@
1517
1538
  },
1518
1539
  "spec": "language.md 5.4, 15.3",
1519
1540
  "refines": "OS3011",
1520
- "test": "tests/errors/OS3019"
1541
+ "test": "tests/unit/check-calls.test.ts"
1521
1542
  },
1522
1543
  {
1523
1544
  "code": "OS3020",
@@ -1539,7 +1560,89 @@
1539
1560
  },
1540
1561
  "spec": "language.md 5.4, 15.3",
1541
1562
  "refines": "OS3011",
1542
- "test": "tests/errors/OS3020"
1563
+ "test": "tests/unit/check-calls.test.ts"
1564
+ },
1565
+ {
1566
+ "code": "OS3021",
1567
+ "title": "An input written in place has no title",
1568
+ "severity": "error",
1569
+ "stage": "check",
1570
+ "since": 1,
1571
+ "message": "An input() assigned to no name is named by its title, and this one has no title written as a string literal.",
1572
+ "placeholders": {},
1573
+ "cause": "A host stores one value per input key, and the key is the name the input was assigned to (host-interface.md 8.1). An input written where a value belongs is assigned to no name, so its title is its key as well as its dialog label. The title is read from the line as a string literal rather than folded, because a key and a label are both fixed before anything is computed and because the row a reader sees should be named on the line that declares it. With neither a name nor such a title there is nothing to label the row with and nothing to store a user's value under, and a key made from the input's position instead would move the moment another input was written above it, taking a user's stored value onto a different row.",
1574
+ "fix": "Give it a title written as a string literal: input(2, \"Precision\").",
1575
+ "autofix": false,
1576
+ "example": {
1577
+ "before": "study(\"Range\", precision = input(2))",
1578
+ "after": "study(\"Range\", precision = input(2, \"Precision\"))"
1579
+ },
1580
+ "spec": "language.md 13.4, host-interface.md 8.1",
1581
+ "refines": null,
1582
+ "test": "tests/unit/check-calls.test.ts"
1583
+ },
1584
+ {
1585
+ "code": "OS3022",
1586
+ "title": "Two inputs share a settings key",
1587
+ "severity": "error",
1588
+ "stage": "check",
1589
+ "since": 1,
1590
+ "message": "This input is keyed by its title {name}, which is already the name of the input at line {line}.",
1591
+ "placeholders": {
1592
+ "name": "the title of the input written in place, quoted",
1593
+ "line": "the line of the input that already carries that key"
1594
+ },
1595
+ "cause": "A host stores one value per key (host-interface.md 8.1). An input assigned to a name is keyed by that name, and one written in place is keyed by its title, so a title that spells another input's name puts two rows on one key. One user value would then serve two rows and nothing anywhere decides which of them gets it. Two inputs carrying one title are OS3017 for the same reason.",
1596
+ "fix": "Give this one a title of its own, or rename the input at line {line}.",
1597
+ "autofix": false,
1598
+ "example": {
1599
+ "before": "width = input(2, \"Width\")\nplot(close + width * input(3, \"width\"), \"Band\", aqua)",
1600
+ "after": "width = input(2, \"Width\")\nplot(close + width * input(3, \"Multiplier\"), \"Band\", aqua)"
1601
+ },
1602
+ "spec": "language.md 13.4, host-interface.md 8.1",
1603
+ "refines": "OS3017",
1604
+ "test": "tests/unit/check-calls.test.ts"
1605
+ },
1606
+ {
1607
+ "code": "OS3023",
1608
+ "title": "An order names a leg this file does not declare",
1609
+ "severity": "error",
1610
+ "stage": "check",
1611
+ "since": 1,
1612
+ "message": "{name} was given a {argument}, and this file declares none.",
1613
+ "placeholders": {
1614
+ "name": "the order function that was called",
1615
+ "argument": "the parameter that names the declaration, which is leg"
1616
+ },
1617
+ "cause": "Every order function names the leg it acts on, and a leg is a contract declared before the run (stdlib.md 17.1, 17.6). A file that declares no leg has exactly one, the instrument its chart is showing, and every order acts on it with no leg named. So in a file with no leg declaration there is no name a leg argument could carry, and one written there names nothing. Ignored, it is silent in the most expensive way an order can be: a script that entered under one name and closed another flattened the only leg there is and was told nothing, and a name the script computed was dropped just as quietly. It is refused whatever the argument holds, rather than held against a list of accepted values the way OS3008 holds every other fixed set, because here the list is empty and the value is not what is wrong.",
1618
+ "fix": "Leave {argument} out. A file that declares no leg has exactly one, and every order acts on it.",
1619
+ "autofix": false,
1620
+ "example": {
1621
+ "before": "if pos.isFlat\n buy(qty = 1, leg = \"hedge\")\nelse\n close()",
1622
+ "after": "if pos.isFlat\n buy(qty = 1)\nelse\n close()"
1623
+ },
1624
+ "spec": "stdlib.md 17.1, 17.2",
1625
+ "refines": "OS3008",
1626
+ "test": "tests/unit/check-calls.test.ts"
1627
+ },
1628
+ {
1629
+ "code": "OS3024",
1630
+ "title": "An input written in place has an empty title",
1631
+ "severity": "error",
1632
+ "stage": "check",
1633
+ "since": 1,
1634
+ "message": "An input() assigned to no name is named by its title, and this one's title is empty.",
1635
+ "placeholders": {},
1636
+ "cause": "The title of an input written where a value belongs is its settings key as well as its dialog label (host-interface.md 8.1), and the empty string is neither. There is nothing to store a user's value under and nothing to label the row with, and a second input written the same way would land on the same empty key and take the same stored value. This is the case OS3021 refuses, reached by a different edit, and it carries its own code because OS3021 tells a reader to give the input a title written as a string literal and this reader has written one. A message and a fix that are both already true of the program in front of somebody send them to change nothing. What is wrong here is not that the title was left out: it is that the title says nothing, and the fix is to give it something to say. An input assigned to a name is not this. It has a key already, and an empty title there is read as no title and labelled with the name, which language.md 13.4 states.",
1637
+ "fix": "Give the title something to say: input(2, \"Precision\").",
1638
+ "autofix": false,
1639
+ "example": {
1640
+ "before": "study(\"Range\", precision = input(2, \"\"))",
1641
+ "after": "study(\"Range\", precision = input(2, \"Precision\"))"
1642
+ },
1643
+ "spec": "language.md 13.4, host-interface.md 8.1",
1644
+ "refines": "OS3021",
1645
+ "test": "tests/unit/check-calls.test.ts"
1543
1646
  },
1544
1647
  {
1545
1648
  "code": "OS4001",
@@ -1560,7 +1663,7 @@
1560
1663
  },
1561
1664
  "spec": "language.md 7.4",
1562
1665
  "refines": null,
1563
- "test": "tests/errors/OS4001"
1666
+ "test": "tests/engine/machine.test.ts"
1564
1667
  },
1565
1668
  {
1566
1669
  "code": "OS4002",
@@ -1578,12 +1681,12 @@
1578
1681
  "fix": "Raise the depth in one place: limits(history = {suggested}).",
1579
1682
  "autofix": false,
1580
1683
  "example": {
1581
- "before": "study(\"Long lookback\")\n\nold = close[5000]",
1582
- "after": "study(\"Long lookback\")\nlimits(history = 5001)\n\nold = close[5000]"
1684
+ "before": "study(\"Long lookback\")\nlimits(history = 50)\n\nold = close[120]",
1685
+ "after": "study(\"Long lookback\")\nlimits(history = 120)\n\nold = close[120]"
1583
1686
  },
1584
1687
  "spec": "language.md 7.4, 10.7",
1585
1688
  "refines": null,
1586
- "test": "tests/errors/OS4002"
1689
+ "test": "tests/engine/machine.test.ts"
1587
1690
  },
1588
1691
  {
1589
1692
  "code": "OS4003",
@@ -1601,12 +1704,12 @@
1601
1704
  "fix": "Round the value before passing it: floor() towards zero, round() to nearest.",
1602
1705
  "autofix": false,
1603
1706
  "example": {
1604
- "before": "mid = element(values, size(values) / 2)",
1605
- "after": "mid = element(values, floor(size(values) / 2))"
1707
+ "before": "s = sma(close, len / 2)",
1708
+ "after": "s = sma(close, floor(len / 2))"
1606
1709
  },
1607
1710
  "spec": "language.md 14.1",
1608
1711
  "refines": null,
1609
- "test": "tests/errors/OS4003"
1712
+ "test": null
1610
1713
  },
1611
1714
  {
1612
1715
  "code": "OS4004",
@@ -1629,7 +1732,7 @@
1629
1732
  },
1630
1733
  "spec": "language.md 14.1",
1631
1734
  "refines": null,
1632
- "test": "tests/errors/OS4004"
1735
+ "test": "tests/engine/machine.test.ts"
1633
1736
  },
1634
1737
  {
1635
1738
  "code": "OS4005",
@@ -1651,7 +1754,7 @@
1651
1754
  },
1652
1755
  "spec": "language.md 5.4",
1653
1756
  "refines": null,
1654
- "test": "tests/errors/OS4005"
1757
+ "test": "tests/engine/objects.test.ts"
1655
1758
  },
1656
1759
  {
1657
1760
  "code": "OS4006",
@@ -1672,7 +1775,8 @@
1672
1775
  },
1673
1776
  "spec": "language.md 14.1",
1674
1777
  "refines": null,
1675
- "test": "tests/errors/OS4006"
1778
+ "test": null,
1779
+ "deferred": "Nothing raises this yet. Taking an element from an empty array raises the broader OS4004, and summarising one returns absence, which is the silent drain this entry exists to refuse. Raised when the array library tells the empty case apart from an index outside a filled array, language.md 14.1."
1676
1780
  },
1677
1781
  {
1678
1782
  "code": "OS4007",
@@ -1695,7 +1799,8 @@
1695
1799
  },
1696
1800
  "spec": "language.md 14.1",
1697
1801
  "refines": null,
1698
- "test": "tests/errors/OS4007"
1802
+ "test": null,
1803
+ "deferred": "Nothing raises this yet. slice takes whatever range it is given and returns a shortened or empty array, so a reversed or out of range pair produces a plausible answer instead of a refusal. Raised when the array library checks the range against the array, language.md 14.1."
1699
1804
  },
1700
1805
  {
1701
1806
  "code": "OS4008",
@@ -1719,7 +1824,8 @@
1719
1824
  },
1720
1825
  "spec": "language.md 15.3",
1721
1826
  "refines": null,
1722
- "test": "tests/errors/OS4008"
1827
+ "test": null,
1828
+ "deferred": "Nothing raises this yet. A write outside the declared grid raises the broader OS4004, which names an index rather than the shape the declaration fixed. Raised when the table surface reports the cell against the table it was written to, language.md 15.3."
1723
1829
  },
1724
1830
  {
1725
1831
  "code": "OS4009",
@@ -1742,7 +1848,8 @@
1742
1848
  },
1743
1849
  "spec": "language.md 3.8",
1744
1850
  "refines": null,
1745
- "test": "tests/errors/OS4009"
1851
+ "test": null,
1852
+ "deferred": "Nothing raises this yet. The colour calls build a colour from whatever channels they are given, so a channel outside its range reaches the chart rather than stopping the bar. Raised when the colour library checks each channel, language.md 3.8."
1746
1853
  },
1747
1854
  {
1748
1855
  "code": "OS4010",
@@ -1765,7 +1872,8 @@
1765
1872
  },
1766
1873
  "spec": "language.md 15.2",
1767
1874
  "refines": null,
1768
- "test": "tests/errors/OS4010"
1875
+ "test": null,
1876
+ "deferred": "Nothing raises this yet. Building a date returns absence only when a field is not a whole number, so a month past the end of the year rolls into the next one and becomes a timestamp the script never meant. Raised when the calendar library checks each field against its range, language.md 15.2."
1769
1877
  },
1770
1878
  {
1771
1879
  "code": "OS4011",
@@ -1787,7 +1895,8 @@
1787
1895
  },
1788
1896
  "spec": "language.md 15.2",
1789
1897
  "refines": null,
1790
- "test": "tests/errors/OS4011"
1898
+ "test": null,
1899
+ "deferred": "Nothing raises this yet. Taking part of a string slices the code points it holds, so a position outside the string returns a shorter string or an empty one, which is the plausible empty result this entry refuses. Raised when the string library checks the position against the string, language.md 15.2."
1791
1900
  },
1792
1901
  {
1793
1902
  "code": "OS4012",
@@ -1810,7 +1919,8 @@
1810
1919
  },
1811
1920
  "spec": "language.md 14.1",
1812
1921
  "refines": null,
1813
- "test": "tests/errors/OS4012"
1922
+ "test": null,
1923
+ "deferred": "Nothing raises this yet. A computed name outside the accepted set produces absence on every bar rather than stopping, and only a name written as a literal is refused, at compile time, with OS3008. Raised when the engine checks a computed name on the bar that produced it, language.md 14.1."
1814
1924
  },
1815
1925
  {
1816
1926
  "code": "OS4013",
@@ -1831,7 +1941,7 @@
1831
1941
  },
1832
1942
  "spec": "language.md 10.3",
1833
1943
  "refines": null,
1834
- "test": "tests/errors/OS4013"
1944
+ "test": "tests/engine/machine.test.ts"
1835
1945
  },
1836
1946
  {
1837
1947
  "code": "OS5001",
@@ -1854,7 +1964,7 @@
1854
1964
  },
1855
1965
  "spec": "language.md 10.7",
1856
1966
  "refines": null,
1857
- "test": "tests/errors/OS5001"
1967
+ "test": "tests/engine/budget.test.ts"
1858
1968
  },
1859
1969
  {
1860
1970
  "code": "OS5002",
@@ -1876,8 +1986,9 @@
1876
1986
  "after": "var window = [0.0]\npush(window, close)\nif size(window) > 500\n shift(window)"
1877
1987
  },
1878
1988
  "spec": "language.md 14.1",
1989
+ "unexercised": "The ceiling is the engine's own and it is a large one, so an example that reached it would be a run long enough to fill it rather than a script anybody would read. The before block shows the window that is never trimmed, which is the shape that gets there, and not the bar it stops on.",
1879
1990
  "refines": null,
1880
- "test": "tests/errors/OS5002"
1991
+ "test": "tests/engine/budget.test.ts"
1881
1992
  },
1882
1993
  {
1883
1994
  "code": "OS5003",
@@ -1900,13 +2011,13 @@
1900
2011
  },
1901
2012
  "spec": "language.md 10.7; host-interface.md 10.1",
1902
2013
  "refines": null,
1903
- "test": "tests/errors/OS5003"
2014
+ "test": "tests/engine/verify.test.ts"
1904
2015
  },
1905
2016
  {
1906
2017
  "code": "OS5004",
1907
2018
  "title": "The program needs more state regions than the engine allows",
1908
2019
  "severity": "error",
1909
- "stage": "check",
2020
+ "stage": "host",
1910
2021
  "since": 1,
1911
2022
  "message": "This program needs {found} state regions and the engine allows {max}; {first} calls {second} on several paths.",
1912
2023
  "placeholders": {
@@ -1924,7 +2035,7 @@
1924
2035
  },
1925
2036
  "spec": "compiled-program.md, state regions",
1926
2037
  "refines": null,
1927
- "test": "tests/errors/OS5004"
2038
+ "test": "tests/engine/verify.test.ts"
1928
2039
  },
1929
2040
  {
1930
2041
  "code": "OS5005",
@@ -1946,8 +2057,9 @@
1946
2057
  "after": "inner = c ? (d ? 1 : 2) : 3\nz = a ? (b ? inner : 4) : 5"
1947
2058
  },
1948
2059
  "spec": "language.md 19",
2060
+ "unexercised": "The ceiling is far above anything written by hand, which is the whole point of it: generated source is how a file reaches it. The before block shows the shape at four levels, where a reader can see it, and nothing that short can raise the code.",
1949
2061
  "refines": null,
1950
- "test": "tests/errors/OS5005"
2062
+ "test": "tests/unit/parse-diagnostics.test.ts"
1951
2063
  },
1952
2064
  {
1953
2065
  "code": "OS5006",
@@ -1969,7 +2081,7 @@
1969
2081
  },
1970
2082
  "spec": "language.md 15.2",
1971
2083
  "refines": null,
1972
- "test": "tests/errors/OS5006"
2084
+ "test": "tests/engine/requests-load.test.ts"
1973
2085
  },
1974
2086
  {
1975
2087
  "code": "OS5007",
@@ -1992,7 +2104,7 @@
1992
2104
  },
1993
2105
  "spec": "language.md 7.1",
1994
2106
  "refines": null,
1995
- "test": "tests/errors/OS5007"
2107
+ "test": "tests/engine/budget.test.ts"
1996
2108
  },
1997
2109
  {
1998
2110
  "code": "OS5008",
@@ -2013,14 +2125,15 @@
2013
2125
  "after": "var logLines: array<string> = []\npush(logLines, text(close))\nif size(logLines) > 50\n shift(logLines)"
2014
2126
  },
2015
2127
  "spec": "language.md 5.1",
2128
+ "unexercised": "The ceiling is the engine's own and a bar appends a few characters, so reaching it takes a run of thousands of bars rather than an example. The before block shows the log that is never trimmed, which is the shape that gets there.",
2016
2129
  "refines": null,
2017
- "test": "tests/errors/OS5008"
2130
+ "test": "tests/engine/budget.test.ts"
2018
2131
  },
2019
2132
  {
2020
2133
  "code": "OS5009",
2021
2134
  "title": "The program is too large",
2022
2135
  "severity": "error",
2023
- "stage": "check",
2136
+ "stage": "host",
2024
2137
  "since": 1,
2025
2138
  "message": "This file compiles to {found} instructions and the ceiling is {max}.",
2026
2139
  "placeholders": {
@@ -2036,7 +2149,30 @@
2036
2149
  },
2037
2150
  "spec": "language.md 10.7",
2038
2151
  "refines": null,
2039
- "test": "tests/errors/OS5009"
2152
+ "test": "tests/engine/verify.test.ts"
2153
+ },
2154
+ {
2155
+ "code": "OS5010",
2156
+ "title": "Too many drawing objects",
2157
+ "severity": "error",
2158
+ "stage": "runtime",
2159
+ "since": 1,
2160
+ "message": "A script holds at most {max} drawing objects; this one would be number {found}.",
2161
+ "placeholders": {
2162
+ "max": "the number of drawing objects the host will hold at once",
2163
+ "found": "the count the object being created would have reached"
2164
+ },
2165
+ "cause": "An object lives until the script deletes it, so a script that creates one on every bar and deletes none grows for as long as the chart is open, and nothing can reclaim it: an undeleted object is held by the chart whether or not the script still names it. The ceiling is the host's, and reaching it stops the bar and names the number. The oldest object is never dropped to make room, because a study that is correct on the right of the chart and quietly wrong on the left is worse than one that stops.",
2166
+ "fix": "Delete each object when it stops being wanted, and bound the set: keep the objects in an array, and when it is longer than you want, delete the oldest object and remove the element.",
2167
+ "autofix": false,
2168
+ "example": {
2169
+ "before": "var zones: array<box> = []\npush(zones, draw.box(time, low, time, high))",
2170
+ "after": "var zones: array<box> = []\npush(zones, draw.box(time, low, time, high))\nif size(zones) > 50\n draw.delete(element(zones, 0))\n shift(zones)"
2171
+ },
2172
+ "spec": "stdlib.md 14.4",
2173
+ "unexercised": "The ceiling is the host's and a bar creates one object, so reaching it takes a run of thousands of bars rather than an example. The before block shows the script that creates on every bar and deletes on none, which is the shape that gets there.",
2174
+ "refines": null,
2175
+ "test": "tests/engine/objects.test.ts"
2040
2176
  },
2041
2177
  {
2042
2178
  "code": "OS6001",
@@ -2057,7 +2193,7 @@
2057
2193
  },
2058
2194
  "spec": "language.md 15.2",
2059
2195
  "refines": null,
2060
- "test": "tests/errors/OS6001"
2196
+ "test": "tests/unit/check-repaint.test.ts"
2061
2197
  },
2062
2198
  {
2063
2199
  "code": "OS6002",
@@ -2079,7 +2215,7 @@
2079
2215
  },
2080
2216
  "spec": "language.md 15.2",
2081
2217
  "refines": null,
2082
- "test": "tests/errors/OS6002"
2218
+ "test": "tests/engine/requests-load.test.ts"
2083
2219
  },
2084
2220
  {
2085
2221
  "code": "OS6003",
@@ -2100,7 +2236,7 @@
2100
2236
  },
2101
2237
  "spec": "language.md 15.2",
2102
2238
  "refines": null,
2103
- "test": "tests/errors/OS6003"
2239
+ "test": "tests/unit/check-repaint.test.ts"
2104
2240
  },
2105
2241
  {
2106
2242
  "code": "OS6004",
@@ -2119,12 +2255,13 @@
2119
2255
  "fix": "Recompile the script against this engine's library, or run the program on an engine with the library version it was compiled against.",
2120
2256
  "autofix": false,
2121
2257
  "example": {
2258
+ "kind": "transcript",
2122
2259
  "before": "program: library 5, entry 12 name \"stdev\" arity 3\nengine: library 4, entry \"stdev\" arity 2",
2123
2260
  "after": "program: library 4, entry 12 name \"stdev\" arity 2\nengine: library 4, entry \"stdev\" arity 2"
2124
2261
  },
2125
2262
  "spec": "compiled-program.md, the function table",
2126
2263
  "refines": null,
2127
- "test": "tests/errors/OS6004"
2264
+ "test": "tests/engine/verify.test.ts"
2128
2265
  },
2129
2266
  {
2130
2267
  "code": "OS6005",
@@ -2145,7 +2282,7 @@
2145
2282
  },
2146
2283
  "spec": "language.md 15.2",
2147
2284
  "refines": null,
2148
- "test": "tests/errors/OS6005"
2285
+ "test": "tests/stdlib/calendar.test.ts"
2149
2286
  },
2150
2287
  {
2151
2288
  "code": "OS6006",
@@ -2161,12 +2298,13 @@
2161
2298
  "fix": "Run the program on an engine that has {tag}, or remove the feature that needs it: the tag names it.",
2162
2299
  "autofix": false,
2163
2300
  "example": {
2301
+ "kind": "transcript",
2164
2302
  "before": "program requires: core.1, arrays, orders\nengine has: core.1, arrays",
2165
2303
  "after": "program requires: core.1, arrays\nengine has: core.1, arrays"
2166
2304
  },
2167
2305
  "spec": "compiled-program.md, capability tags",
2168
2306
  "refines": null,
2169
- "test": "tests/errors/OS6006"
2307
+ "test": "tests/engine/verify.test.ts"
2170
2308
  },
2171
2309
  {
2172
2310
  "code": "OS6007",
@@ -2188,7 +2326,7 @@
2188
2326
  },
2189
2327
  "spec": "language.md 15.2",
2190
2328
  "refines": null,
2191
- "test": "tests/errors/OS6007"
2329
+ "test": "tests/hosts/host.ts"
2192
2330
  },
2193
2331
  {
2194
2332
  "code": "OS6008",
@@ -2210,7 +2348,7 @@
2210
2348
  },
2211
2349
  "spec": "language.md 15.2",
2212
2350
  "refines": null,
2213
- "test": "tests/errors/OS6008"
2351
+ "test": "tests/hosts/host.ts"
2214
2352
  },
2215
2353
  {
2216
2354
  "code": "OS6009",
@@ -2233,7 +2371,7 @@
2233
2371
  },
2234
2372
  "spec": "language.md 15.2",
2235
2373
  "refines": null,
2236
- "test": "tests/errors/OS6009"
2374
+ "test": "tests/engine/requests-host.test.ts"
2237
2375
  },
2238
2376
  {
2239
2377
  "code": "OS6010",
@@ -2250,12 +2388,13 @@
2250
2388
  "fix": "Choose an instrument and interval that have history, or widen the chart's date range until bars exist.",
2251
2389
  "autofix": false,
2252
2390
  "example": {
2391
+ "kind": "transcript",
2253
2392
  "before": "host input: symbol SYMBOL, interval 5, bars 0",
2254
2393
  "after": "host input: symbol SYMBOL, interval 5, bars 1240"
2255
2394
  },
2256
2395
  "spec": "language.md 7.1",
2257
2396
  "refines": null,
2258
- "test": "tests/errors/OS6010"
2397
+ "test": "tests/engine/series.test.ts"
2259
2398
  },
2260
2399
  {
2261
2400
  "code": "OS6011",
@@ -2273,12 +2412,13 @@
2273
2412
  "fix": "Reload the history; if the same bar repeats, the feed is sending duplicates and the host has to sort and deduplicate the bars before the engine runs.",
2274
2413
  "autofix": false,
2275
2414
  "example": {
2415
+ "kind": "transcript",
2276
2416
  "before": "host input:\n bar 41 09:15\n bar 42 09:15\n bar 43 09:10",
2277
2417
  "after": "host input:\n bar 41 09:10\n bar 42 09:15\n bar 43 09:20"
2278
2418
  },
2279
2419
  "spec": "language.md 7.1",
2280
2420
  "refines": null,
2281
- "test": "tests/errors/OS6011"
2421
+ "test": "tests/engine/series.test.ts"
2282
2422
  },
2283
2423
  {
2284
2424
  "code": "OS6012",
@@ -2300,7 +2440,7 @@
2300
2440
  },
2301
2441
  "spec": "language.md 15.2",
2302
2442
  "refines": null,
2303
- "test": "tests/errors/OS6012"
2443
+ "test": "tests/engine/requests-host.test.ts"
2304
2444
  },
2305
2445
  {
2306
2446
  "code": "OS6013",
@@ -2323,7 +2463,8 @@
2323
2463
  },
2324
2464
  "spec": "language.md 15.2",
2325
2465
  "refines": null,
2326
- "test": "tests/errors/OS6013"
2466
+ "test": null,
2467
+ "deferred": "Nothing raises this yet. A read's identity is settled once before bar 0 and nothing asks again, so there is no second identity for the engine to compare the first one against. Raised when the engine resolves a read's identity per bar, language.md 15.2."
2327
2468
  },
2328
2469
  {
2329
2470
  "code": "OS6014",
@@ -2346,7 +2487,7 @@
2346
2487
  },
2347
2488
  "spec": "language.md 15.2",
2348
2489
  "refines": null,
2349
- "test": "tests/errors/OS6014"
2490
+ "test": "tests/hosts/reads.ts"
2350
2491
  },
2351
2492
  {
2352
2493
  "code": "OS6015",
@@ -2369,7 +2510,7 @@
2369
2510
  },
2370
2511
  "spec": "language.md 15.2",
2371
2512
  "refines": null,
2372
- "test": "tests/errors/OS6015"
2513
+ "test": "tests/engine/requests-load.test.ts"
2373
2514
  },
2374
2515
  {
2375
2516
  "code": "OS6016",
@@ -2377,21 +2518,22 @@
2377
2518
  "severity": "error",
2378
2519
  "stage": "host",
2379
2520
  "since": 1,
2380
- "message": "This program is in compiled format {found} and this engine implements up to {max}.",
2521
+ "message": "This program is in compiled format {found} and this engine implements format {max}; a different major number is a different format, whether it is higher or lower.",
2381
2522
  "placeholders": {
2382
2523
  "found": "the format version the program declares",
2383
- "max": "the highest format version the engine implements"
2524
+ "max": "the format version this engine implements"
2384
2525
  },
2385
- "cause": "The compiled program is a versioned data format, and an engine refuses a format it cannot read rather than guessing at instructions it does not know. Refusing at load, with both numbers named, is the whole reason the version is carried.",
2526
+ "cause": "The compiled program is a versioned data format, and an engine refuses a format it cannot read rather than guessing at instructions it does not know. Only the major number decides. A higher minor loads, because a minor addition whose absence would change a number has to announce itself as a tag in the program's requires list, and an older minor loads because it carries a subset of the fields this engine already reads. A major number that is not this engine's is a different format wearing the same name, so it is refused in both directions: a program older than this engine is refused for the same reason as one newer, and neither is run approximately. Refusing at load, with both numbers named, is the whole reason the version is carried.",
2386
2527
  "fix": "Run the program on an engine that implements format {found}, or recompile the source with a compiler that emits format {max}.",
2387
2528
  "autofix": false,
2388
2529
  "example": {
2389
- "before": "program: compiled format 3\nengine: compiled format 2",
2390
- "after": "program: compiled format 2\nengine: compiled format 2"
2530
+ "kind": "transcript",
2531
+ "before": "program: compiled format 0.9\nengine: compiled format 1.0",
2532
+ "after": "program: compiled format 1.0\nengine: compiled format 1.0"
2391
2533
  },
2392
2534
  "spec": "compiled-program.md, loading a program",
2393
2535
  "refines": null,
2394
- "test": "tests/errors/OS6016"
2536
+ "test": "tests/engine/verify.test.ts"
2395
2537
  },
2396
2538
  {
2397
2539
  "code": "OS6017",
@@ -2408,12 +2550,13 @@
2408
2550
  "fix": "Upgrade the engine to one that implements language version {found}, or recompile the source against a version it has.",
2409
2551
  "autofix": false,
2410
2552
  "example": {
2553
+ "kind": "transcript",
2411
2554
  "before": "program: language version 2\nengine: language version 1",
2412
2555
  "after": "program: language version 1\nengine: language version 1"
2413
2556
  },
2414
2557
  "spec": "language.md 4.1",
2415
2558
  "refines": null,
2416
- "test": "tests/errors/OS6017"
2559
+ "test": "tests/engine/verify.test.ts"
2417
2560
  },
2418
2561
  {
2419
2562
  "code": "OS6018",
@@ -2430,12 +2573,13 @@
2430
2573
  "fix": "Recompile the script from its source; a program that fails verification came from a broken compiler or was edited after it was written, and neither is repairable by hand.",
2431
2574
  "autofix": false,
2432
2575
  "example": {
2576
+ "kind": "transcript",
2433
2577
  "before": "instruction 402: JUMP target 9911, program holds 812 instructions",
2434
2578
  "after": "instruction 402: JUMP target 411, program holds 812 instructions"
2435
2579
  },
2436
2580
  "spec": "compiled-program.md 3.5, 9.4",
2437
2581
  "refines": null,
2438
- "test": "tests/errors/OS6018"
2582
+ "test": "tests/engine/verify.test.ts"
2439
2583
  },
2440
2584
  {
2441
2585
  "code": "OS6019",
@@ -2453,12 +2597,13 @@
2453
2597
  "fix": "Correct the value in the settings dialog, or widen the input's own min, max or options so the value is allowed.",
2454
2598
  "autofix": false,
2455
2599
  "example": {
2600
+ "kind": "transcript",
2456
2601
  "before": "input len: min 1, max 500\nhost setting: len = 0",
2457
2602
  "after": "input len: min 1, max 500\nhost setting: len = 14"
2458
2603
  },
2459
2604
  "spec": "language.md 13.4",
2460
2605
  "refines": null,
2461
- "test": "tests/errors/OS6019"
2606
+ "test": "tests/engine/verify.test.ts"
2462
2607
  },
2463
2608
  {
2464
2609
  "code": "OS7001",
@@ -2480,7 +2625,7 @@
2480
2625
  },
2481
2626
  "spec": "language.md 13.1, 13.3",
2482
2627
  "refines": null,
2483
- "test": "tests/errors/OS7001"
2628
+ "test": "tests/unit/check-names.test.ts"
2484
2629
  },
2485
2630
  {
2486
2631
  "code": "OS7002",
@@ -2502,7 +2647,7 @@
2502
2647
  },
2503
2648
  "spec": "language.md 6.8",
2504
2649
  "refines": null,
2505
- "test": "tests/errors/OS7002"
2650
+ "test": "tests/engine/refusals.test.ts"
2506
2651
  },
2507
2652
  {
2508
2653
  "code": "OS7003",
@@ -2523,7 +2668,7 @@
2523
2668
  },
2524
2669
  "spec": "language.md 15.2",
2525
2670
  "refines": null,
2526
- "test": "tests/errors/OS7003"
2671
+ "test": "tests/unit/check-repaint.test.ts"
2527
2672
  },
2528
2673
  {
2529
2674
  "code": "OS7004",
@@ -2545,7 +2690,7 @@
2545
2690
  },
2546
2691
  "spec": "language.md 13.3",
2547
2692
  "refines": null,
2548
- "test": "tests/errors/OS7004"
2693
+ "test": "tests/engine/refusals.test.ts"
2549
2694
  },
2550
2695
  {
2551
2696
  "code": "OS7005",
@@ -2568,7 +2713,8 @@
2568
2713
  },
2569
2714
  "spec": "language.md 13.3",
2570
2715
  "refines": null,
2571
- "test": "tests/errors/OS7005"
2716
+ "test": "tests/engine/ending.test.ts",
2717
+ "deferred": "Nothing raises this yet. Nothing compares an order's quantity with the lot size its leg trades in, so a quantity no exchange would accept is sent and a backtest can report a trade that could not have happened. The same missing fact is what leaves two other shapes of stdlib.md 17.1 unheld, and all three are settled together. A quantity stated on a close in a declaration counting in lots, cash or an equity percent cannot be held against a position folded in units, which is the narrowing OS7017 carries. And an order that opposes what the leg holds in such a declaration cannot be divided into the half that closes the outgoing position and the half that opens its replacement, so it is sent whole. What is kept without the lot size, and kept in every unit: it is sent on a position reference of its own, whether or not anything has settled, so that it crosses nothing; and the outgoing position is named again, because a close works its own quantity out in units and is divided across the positions holding the leg's own side, oldest first, so that position returns to zero as soon as the leg's net comes back to its side. What is not kept is the instruction itself closing it. The outgoing position is left holding what it holds, and on a leg whose net never returns to that side it is carried for the life of the run with no order able to name it. Raised when order validation lands, stdlib.md 17.2, which is also when the ledger is given the lot size its leg trades in."
2572
2718
  },
2573
2719
  {
2574
2720
  "code": "OS7006",
@@ -2591,7 +2737,7 @@
2591
2737
  },
2592
2738
  "spec": "language.md 13.3",
2593
2739
  "refines": null,
2594
- "test": "tests/errors/OS7006"
2740
+ "test": "tests/engine/refusals.test.ts"
2595
2741
  },
2596
2742
  {
2597
2743
  "code": "OS7007",
@@ -2613,7 +2759,7 @@
2613
2759
  },
2614
2760
  "spec": "language.md 13.3",
2615
2761
  "refines": null,
2616
- "test": "tests/errors/OS7007"
2762
+ "test": "tests/engine/refusals.test.ts"
2617
2763
  },
2618
2764
  {
2619
2765
  "code": "OS7008",
@@ -2635,7 +2781,7 @@
2635
2781
  },
2636
2782
  "spec": "language.md 13.3",
2637
2783
  "refines": null,
2638
- "test": "tests/errors/OS7008"
2784
+ "test": "tests/engine/refusals.test.ts"
2639
2785
  },
2640
2786
  {
2641
2787
  "code": "OS7009",
@@ -2648,15 +2794,15 @@
2648
2794
  "tag": "the tag that was passed"
2649
2795
  },
2650
2796
  "cause": "A tag names an order from the moment it is placed. Acting on a tag that names nothing is a script that has lost track of its own orders, and ignoring the call would leave it believing an order exists that does not. This code is for a call that acts on an order. The reading calls of stdlib.md section 17.3 read the ledger, which keeps a row after the order finishes, so a tag that names no row reads as the entry's documented empty value rather than raising.",
2651
- "fix": "Use the tag the order was placed with, and test order.working({tag}) before acting on it.",
2797
+ "fix": "Use the tag the order was placed with, or cancelAll() where the script means every order it has working.",
2652
2798
  "autofix": false,
2653
2799
  "example": {
2654
- "before": "buy(qty = 1, tag = \"entry\")\norder.bracket(tag = \"entries\", loss = 10)",
2655
- "after": "buy(qty = 1, tag = \"entry\")\nif order.working(\"entry\")\n order.bracket(tag = \"entry\", loss = 10)"
2800
+ "before": "buy(qty = 1, tag = \"entry\")\ncancel(\"entries\")",
2801
+ "after": "buy(qty = 1, tag = \"entry\")\ncancel(\"entry\")"
2656
2802
  },
2657
2803
  "spec": "language.md 15.2; stdlib.md 17.3",
2658
2804
  "refines": null,
2659
- "test": "tests/errors/OS7009"
2805
+ "test": "tests/engine/tags.test.ts"
2660
2806
  },
2661
2807
  {
2662
2808
  "code": "OS7010",
@@ -2675,12 +2821,12 @@
2675
2821
  "fix": "Put the stop below a long entry and the limit above it, and swap the two for a short.",
2676
2822
  "autofix": false,
2677
2823
  "example": {
2678
- "before": "buy(qty = 1)\nexit(limit = pos.avgPrice - atrValue, stop = pos.avgPrice + atrValue)",
2679
- "after": "buy(qty = 1)\nexit(limit = pos.avgPrice + atrValue, stop = pos.avgPrice - atrValue)"
2824
+ "before": "if pos.isFlat\n buy(qty = 1)\nelse\n exit(limit = pos.avgPrice - atrValue, stop = pos.avgPrice + atrValue)",
2825
+ "after": "if pos.isFlat\n buy(qty = 1)\nelse\n exit(limit = pos.avgPrice + atrValue, stop = pos.avgPrice - atrValue)"
2680
2826
  },
2681
2827
  "spec": "language.md 13.3",
2682
2828
  "refines": null,
2683
- "test": "tests/errors/OS7010"
2829
+ "test": "tests/engine/refusals.test.ts"
2684
2830
  },
2685
2831
  {
2686
2832
  "code": "OS7011",
@@ -2702,7 +2848,8 @@
2702
2848
  },
2703
2849
  "spec": "language.md 13.3",
2704
2850
  "refines": null,
2705
- "test": "tests/errors/OS7011"
2851
+ "test": null,
2852
+ "deferred": "Nothing raises this yet. Nothing compares an order's cost with the capital the strategy has, so a backtest can spend money it never had and report a return nobody could have earned. Raised when the ledger holds a capital figure to check against, language.md 13.3."
2706
2853
  },
2707
2854
  {
2708
2855
  "code": "OS7012",
@@ -2720,11 +2867,12 @@
2720
2867
  "autofix": false,
2721
2868
  "example": {
2722
2869
  "before": "if crossUp(fast, slow)\n buy(qty = 1)",
2723
- "after": "if crossUp(fast, slow) and session.isOpen\n buy(qty = 1)"
2870
+ "after": "if crossUp(fast, slow) and session.isIn(\"0915-1530\")\n buy(qty = 1)"
2724
2871
  },
2725
2872
  "spec": "language.md 15.2",
2726
2873
  "refines": null,
2727
- "test": "tests/errors/OS7012"
2874
+ "test": null,
2875
+ "deferred": "Nothing raises this yet. Nothing compares the bar's time with the instrument's session before an order is sent, so an order outside the session leaves the engine as though the venue were open. Raised when order validation reads the session, language.md 15.2."
2728
2876
  },
2729
2877
  {
2730
2878
  "code": "OS7013",
@@ -2742,12 +2890,12 @@
2742
2890
  "fix": "Make the conditions exclusive with else if, or place the exit on this bar and the entry on the next.",
2743
2891
  "autofix": false,
2744
2892
  "example": {
2745
- "before": "if crossUp(fast, slow)\n buy(qty = 1)\nif rsi(close, 14) > 70\n sell(qty = 1)",
2746
- "after": "if crossUp(fast, slow)\n buy(qty = 1)\nelse if rsi(close, 14) > 70\n sell(qty = 1)"
2893
+ "before": "r = rsi(close, 14)\nif crossUp(fast, slow)\n buy(qty = 1)\nif r > 70\n sell(qty = 1)",
2894
+ "after": "r = rsi(close, 14)\nif crossUp(fast, slow)\n buy(qty = 1)\nelse if r > 70\n sell(qty = 1)"
2747
2895
  },
2748
2896
  "spec": "language.md 13.3",
2749
2897
  "refines": null,
2750
- "test": "tests/errors/OS7013"
2898
+ "test": "tests/engine/refusals.test.ts"
2751
2899
  },
2752
2900
  {
2753
2901
  "code": "OS7014",
@@ -2769,7 +2917,8 @@
2769
2917
  },
2770
2918
  "spec": "language.md 13.3",
2771
2919
  "refines": null,
2772
- "test": "tests/errors/OS7014"
2920
+ "test": null,
2921
+ "deferred": "Nothing raises this yet. A refusal that comes back is folded into the ledger row as a status and its text, and no diagnostic is raised, so nothing reports it against the line that placed the order. Raised when a refused fold reports, stdlib.md 17.8."
2773
2922
  },
2774
2923
  {
2775
2924
  "code": "OS7015",
@@ -2788,7 +2937,52 @@
2788
2937
  },
2789
2938
  "spec": "language.md 13.3",
2790
2939
  "refines": null,
2791
- "test": "tests/errors/OS7015"
2940
+ "test": "tests/hosts/strategy.test.ts",
2941
+ "deferred": "Nothing raises this yet. A strategy with nowhere to send orders is not stopped: it places intents that reach nobody, and nothing says so. Raised when the engine checks for a destination before the first order, host-interface.md 7.4."
2942
+ },
2943
+ {
2944
+ "code": "OS7016",
2945
+ "title": "A close names a tag nothing places",
2946
+ "severity": "error",
2947
+ "stage": "check",
2948
+ "since": 1,
2949
+ "message": "No order in this file is placed with the tag {tag}.",
2950
+ "placeholders": {
2951
+ "tag": "the tag the close was given"
2952
+ },
2953
+ "cause": "A close names the part of a position that one tag entered. A tag no order in the file is placed with can never name a part of one, so the call sends nothing on every bar and says nothing, and the script goes on believing it has flattened. It is read from the file rather than from the run because the run cannot tell this from an ordinary bar: a tag that has never named a ledger row is also what a working script looks like before its entry has happened. A tag the script computes is not read, and neither is any close in a file where an order's tag is computed.",
2954
+ "fix": "Use the tag the entry was placed with, or leave the tag out to flatten the whole leg.",
2955
+ "autofix": false,
2956
+ "example": {
2957
+ "before": "if pos.isFlat\n buy(qty = 1, tag = \"entry\")\nelse\n close(tag = \"entries\")",
2958
+ "after": "if pos.isFlat\n buy(qty = 1, tag = \"entry\")\nelse\n close(tag = \"entry\")"
2959
+ },
2960
+ "spec": "stdlib.md 17.2",
2961
+ "refines": null,
2962
+ "test": "tests/unit/check-tags.test.ts"
2963
+ },
2964
+ {
2965
+ "code": "OS7017",
2966
+ "title": "A close states more than it is closing",
2967
+ "severity": "error",
2968
+ "stage": "runtime",
2969
+ "since": 1,
2970
+ "message": "close was given a quantity of {qty}, and {part} has {held} left to close.",
2971
+ "placeholders": {
2972
+ "qty": "the quantity the call stated",
2973
+ "part": "what the close is closing: the leg, or the tag it named",
2974
+ "held": "what is left for a close to send: what that part holds, less what is already working against it"
2975
+ },
2976
+ "cause": "No order crosses zero, and a reducing order can never send more than is available to reduce. A close larger than what is left to close sends one order that flattens the position and opens the opposite one under the same position reference, so a leg that was long ends short and a call named close has opened a position. The quantity is an argument the script wrote, which makes it a claim about the strategy's own position, and this claim is false. Sending what is there instead would leave the script believing it closed the number it asked for, and reading it as a reversal would make close open a position, which is the most expensive naming mistake available. What is left to close is what the leg holds, or what the tag the close names holds, less everything already working against it. A position is folded from settled fills, so an order the destination has not answered has filled nothing and the leg still reads what it held before that order left: measured against that alone, two closes of two on a leg of three each pass the ceiling and the pair ends the leg one short, and a close on every bar against a destination that never answers ends the run short by the position once per bar. The scope is therefore the run and the position rather than the bar, and what is still working is read from the ledger of stdlib.md 17.7: an order neither terminal nor fully filled, counted by the part of it that has not filled. A rejection, a cancellation and an expiry release what they were holding, because nothing more is coming from an order that has ended. What is counted is every order still going on the side that reduces what the leg holds now, and not only the ones that were reductions when they left: an entry the destination has not answered, on a leg the orders after it took the other way, is a reduction now, and leaving it out offered a close the whole of a position five units of which were already on their way. A close that states no quantity is not this: the engine works out what is left and sends it, which is nothing at all once the whole of it is going, and closing a tag that holds nothing sends nothing and says nothing. The comparison is made in full only where the two numbers count the same thing, which is a declaration whose quantity type is units: elsewhere a position folded from filled quantities and a quantity stated in the declaration's own unit are two different kinds of number, and a refusal with the wrong one in it is worse than none. The half of it that needs no conversion is made whatever the declaration counts in, because nothing left to close is zero in every unit. What that leaves unheld is one shape, a quantity stated against a position that is still there in a declaration counting in lots, cash or an equity percent, and joining those two numbers needs the instrument's lot size, which is the fact OS7005 is deferred on.",
2977
+ "fix": "Leave the quantity out and close() flattens what is left, or size the part from pos.size and keep the quantity at or under {held}.",
2978
+ "autofix": false,
2979
+ "example": {
2980
+ "before": "if pos.isFlat\n buy(qty = 1)\nelse\n close(qty = 5)",
2981
+ "after": "if pos.isFlat\n buy(qty = 1)\nelse\n close()"
2982
+ },
2983
+ "spec": "stdlib.md 17.1, 17.2",
2984
+ "refines": null,
2985
+ "test": "tests/engine/closing.test.ts"
2792
2986
  },
2793
2987
  {
2794
2988
  "code": "OS8001",
@@ -2809,7 +3003,7 @@
2809
3003
  },
2810
3004
  "spec": "language.md 11.4",
2811
3005
  "refines": null,
2812
- "test": "tests/errors/OS8001"
3006
+ "test": "tests/unit/check-conditional.test.ts"
2813
3007
  },
2814
3008
  {
2815
3009
  "code": "OS8002",
@@ -2830,7 +3024,7 @@
2830
3024
  },
2831
3025
  "spec": "language.md 7.5",
2832
3026
  "refines": null,
2833
- "test": "tests/errors/OS8002"
3027
+ "test": "tests/unit/check-repaint.test.ts"
2834
3028
  },
2835
3029
  {
2836
3030
  "code": "OS8003",
@@ -2851,7 +3045,7 @@
2851
3045
  },
2852
3046
  "spec": "language.md 4",
2853
3047
  "refines": null,
2854
- "test": "tests/errors/OS8003"
3048
+ "test": "tests/unit/diagnostics.test.ts"
2855
3049
  },
2856
3050
  {
2857
3051
  "code": "OS8004",
@@ -2874,7 +3068,8 @@
2874
3068
  },
2875
3069
  "spec": "language.md 6.6",
2876
3070
  "refines": null,
2877
- "test": "tests/errors/OS8004"
3071
+ "test": null,
3072
+ "deferred": "Nothing raises this yet. The checker does not follow which names a branch on a possibly absent condition assigns, so the warmup shape this warns about compiles silently. Raised when the checker follows assignments out of a conditional block, language.md 6.6."
2878
3073
  },
2879
3074
  {
2880
3075
  "code": "OS8005",
@@ -2895,7 +3090,7 @@
2895
3090
  },
2896
3091
  "spec": "language.md 7.5",
2897
3092
  "refines": null,
2898
- "test": "tests/errors/OS8005"
3093
+ "test": "tests/unit/check-repaint.test.ts"
2899
3094
  },
2900
3095
  {
2901
3096
  "code": "OS8006",
@@ -2916,7 +3111,8 @@
2916
3111
  },
2917
3112
  "spec": "language.md 15.2",
2918
3113
  "refines": null,
2919
- "test": "tests/errors/OS8006"
3114
+ "test": null,
3115
+ "deferred": "Nothing raises this yet. The checker does not compare a session average's call with the chart's interval, so the accumulation this warns about compiles silently. Raised when the checker reads the declared interval at the call site, language.md 15.2."
2920
3116
  },
2921
3117
  {
2922
3118
  "code": "OS8007",
@@ -2938,19 +3134,19 @@
2938
3134
  },
2939
3135
  "spec": "language.md 13.2, 15.3",
2940
3136
  "refines": null,
2941
- "test": "tests/errors/OS8007"
3137
+ "test": null
2942
3138
  },
2943
3139
  {
2944
3140
  "code": "OS8008",
2945
- "title": "An alert with no id",
3141
+ "title": "An alert with no fixed id",
2946
3142
  "severity": "warning",
2947
3143
  "stage": "check",
2948
3144
  "since": 1,
2949
- "message": "This alert has no id, so its identity is derived from its position at line {line}.",
3145
+ "message": "This alert has no fixed id, so its identity is derived from its position at line {line}.",
2950
3146
  "placeholders": {
2951
3147
  "line": "the line the alert is declared on"
2952
3148
  },
2953
- "cause": "A user's alert subscription is keyed by the alert's id, and an id derived from a call's position changes the moment a line is inserted above it. The subscription then belongs to an alert that no longer exists, and it stops firing without telling anybody.",
3149
+ "cause": "A user's alert subscription is keyed by the alert's id, and an id derived from a call's position changes the moment a line is inserted above it. The subscription then belongs to an alert that no longer exists, and it stops firing without telling anybody. An id taken from an input() is not fixed either, and is derived in the same way: the key is written into the program before any setting is read, and a name that moves when somebody opens the settings dialog is not a name a subscription can be kept under.",
2954
3150
  "fix": "Give the alert a stable id of your own: alert(\"text\", id = \"emaCross\").",
2955
3151
  "autofix": false,
2956
3152
  "example": {
@@ -2959,7 +3155,7 @@
2959
3155
  },
2960
3156
  "spec": "language.md 15.3",
2961
3157
  "refines": null,
2962
- "test": "tests/errors/OS8008"
3158
+ "test": "tests/unit/check-repaint.test.ts"
2963
3159
  },
2964
3160
  {
2965
3161
  "code": "OS8009",
@@ -2980,7 +3176,7 @@
2980
3176
  },
2981
3177
  "spec": "language.md 6.7",
2982
3178
  "refines": null,
2983
- "test": "tests/errors/OS8009"
3179
+ "test": "tests/unit/check-warmup.test.ts"
2984
3180
  },
2985
3181
  {
2986
3182
  "code": "OS8010",
@@ -3002,7 +3198,7 @@
3002
3198
  },
3003
3199
  "spec": "language.md 12.2",
3004
3200
  "refines": null,
3005
- "test": "tests/errors/OS8010"
3201
+ "test": "tests/unit/diagnostics.test.ts"
3006
3202
  },
3007
3203
  {
3008
3204
  "code": "OS8011",
@@ -3023,7 +3219,7 @@
3023
3219
  },
3024
3220
  "spec": "language.md 7.5, 8.2",
3025
3221
  "refines": null,
3026
- "test": "tests/errors/OS8011"
3222
+ "test": "tests/unit/check-handles.test.ts"
3027
3223
  },
3028
3224
  {
3029
3225
  "code": "OS8012",
@@ -3044,7 +3240,7 @@
3044
3240
  },
3045
3241
  "spec": "language.md 6.4, 6.5",
3046
3242
  "refines": null,
3047
- "test": "tests/errors/OS8012"
3243
+ "test": null
3048
3244
  },
3049
3245
  {
3050
3246
  "code": "OS8013",
@@ -3067,7 +3263,8 @@
3067
3263
  },
3068
3264
  "spec": "language.md 4.1",
3069
3265
  "refines": null,
3070
- "test": "tests/errors/OS8013"
3266
+ "test": null,
3267
+ "deferred": "Nothing raises this yet. No name in the library is marked deprecated and there is no marker for one to carry, so the checker has nothing to warn about. Raised when the library carries a deprecation marker the checker reads, language.md 4.1."
3071
3268
  },
3072
3269
  {
3073
3270
  "code": "OS8014",
@@ -3088,7 +3285,8 @@
3088
3285
  },
3089
3286
  "spec": "language.md 7.2",
3090
3287
  "refines": null,
3091
- "test": "tests/errors/OS8014"
3288
+ "test": null,
3289
+ "deferred": "Nothing raises this yet. The checker does not follow a bar index into a persistent value, so the stored position this warns about compiles silently. Raised when the checker follows a bar index into persistent state, language.md 7.2."
3092
3290
  },
3093
3291
  {
3094
3292
  "code": "OS8015",
@@ -3111,7 +3309,7 @@
3111
3309
  },
3112
3310
  "spec": "language.md 10.3",
3113
3311
  "refines": null,
3114
- "test": "tests/errors/OS8015"
3312
+ "test": null
3115
3313
  },
3116
3314
  {
3117
3315
  "code": "OS8016",
@@ -3132,7 +3330,7 @@
3132
3330
  },
3133
3331
  "spec": "language.md 11.3",
3134
3332
  "refines": null,
3135
- "test": "tests/errors/OS8016"
3333
+ "test": null
3136
3334
  },
3137
3335
  {
3138
3336
  "code": "OS8017",
@@ -3153,7 +3351,7 @@
3153
3351
  },
3154
3352
  "spec": "language.md 10.2",
3155
3353
  "refines": null,
3156
- "test": "tests/errors/OS8017"
3354
+ "test": null
3157
3355
  },
3158
3356
  {
3159
3357
  "code": "OS8018",
@@ -3175,7 +3373,7 @@
3175
3373
  },
3176
3374
  "spec": "language.md 13.4",
3177
3375
  "refines": null,
3178
- "test": "tests/errors/OS8018"
3376
+ "test": "tests/unit/check-calls.test.ts"
3179
3377
  },
3180
3378
  {
3181
3379
  "code": "OS8019",
@@ -3198,7 +3396,8 @@
3198
3396
  },
3199
3397
  "spec": "language.md 5.4",
3200
3398
  "refines": null,
3201
- "test": "tests/errors/OS8019"
3399
+ "test": null,
3400
+ "deferred": "Nothing raises this yet. The checker does not follow a reference to a deleted object, so the held handle this warns about compiles silently. Raised when the checker follows a deletion to the names and elements still holding the object, language.md 5.4."
3202
3401
  }
3203
3402
  ]
3204
3403
  }