oakscriptjs 0.24.0 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (300) hide show
  1. package/README.md +25 -1
  2. package/bin/oakscript.mjs +10 -3
  3. package/dist/cjs/box/index.d.ts +348 -289
  4. package/dist/cjs/box/index.d.ts.map +1 -1
  5. package/dist/cjs/box/index.js.map +2 -2
  6. package/dist/cjs/check/node.d.ts.map +1 -1
  7. package/dist/cjs/check/node.js +1 -0
  8. package/dist/cjs/check/node.js.map +2 -2
  9. package/dist/cjs/check/preview.d.ts +31 -0
  10. package/dist/cjs/check/preview.d.ts.map +1 -0
  11. package/dist/cjs/check/preview.js +303 -0
  12. package/dist/cjs/check/preview.js.map +7 -0
  13. package/dist/cjs/color/index.d.ts +11 -11
  14. package/dist/cjs/color/index.js.map +1 -1
  15. package/dist/cjs/color/parse.d.ts +2 -0
  16. package/dist/cjs/color/parse.d.ts.map +1 -1
  17. package/dist/cjs/color/parse.js +6 -0
  18. package/dist/cjs/color/parse.js.map +2 -2
  19. package/dist/cjs/compare/index.d.ts +76 -12
  20. package/dist/cjs/compare/index.d.ts.map +1 -1
  21. package/dist/cjs/compare/index.js.map +2 -2
  22. package/dist/cjs/drawing/registry.d.ts +28 -5
  23. package/dist/cjs/drawing/registry.d.ts.map +1 -1
  24. package/dist/cjs/drawing/registry.js +14 -0
  25. package/dist/cjs/drawing/registry.js.map +2 -2
  26. package/dist/cjs/index.d.ts +1 -1
  27. package/dist/cjs/index.js +1 -1
  28. package/dist/cjs/index.js.map +1 -1
  29. package/dist/cjs/label/index.d.ts +265 -187
  30. package/dist/cjs/label/index.d.ts.map +1 -1
  31. package/dist/cjs/label/index.js +1 -1
  32. package/dist/cjs/label/index.js.map +2 -2
  33. package/dist/cjs/line/index.d.ts +247 -207
  34. package/dist/cjs/line/index.d.ts.map +1 -1
  35. package/dist/cjs/line/index.js.map +2 -2
  36. package/dist/cjs/linefill/index.d.ts +61 -89
  37. package/dist/cjs/linefill/index.d.ts.map +1 -1
  38. package/dist/cjs/linefill/index.js.map +2 -2
  39. package/dist/cjs/math/index.d.ts +49 -40
  40. package/dist/cjs/math/index.d.ts.map +1 -1
  41. package/dist/cjs/math/index.js.map +2 -2
  42. package/dist/cjs/polyline/index.d.ts +57 -78
  43. package/dist/cjs/polyline/index.d.ts.map +1 -1
  44. package/dist/cjs/polyline/index.js.map +2 -2
  45. package/dist/cjs/runtime/input-active.d.ts +2 -2
  46. package/dist/cjs/runtime/input-active.js.map +1 -1
  47. package/dist/cjs/runtime/series.d.ts +241 -161
  48. package/dist/cjs/runtime/series.d.ts.map +1 -1
  49. package/dist/cjs/runtime/series.js +223 -127
  50. package/dist/cjs/runtime/series.js.map +2 -2
  51. package/dist/cjs/script/api/alert.d.ts +37 -0
  52. package/dist/cjs/script/api/alert.d.ts.map +1 -0
  53. package/dist/cjs/script/api/alert.js +17 -0
  54. package/dist/cjs/script/api/alert.js.map +7 -0
  55. package/dist/cjs/script/api/calc.d.ts +232 -0
  56. package/dist/cjs/script/api/calc.d.ts.map +1 -0
  57. package/dist/cjs/script/api/calc.js +17 -0
  58. package/dist/cjs/script/api/calc.js.map +7 -0
  59. package/dist/cjs/script/api/color.d.ts +213 -0
  60. package/dist/cjs/script/api/color.d.ts.map +1 -0
  61. package/dist/cjs/script/api/color.js +17 -0
  62. package/dist/cjs/script/api/color.js.map +7 -0
  63. package/dist/cjs/script/api/context.d.ts +764 -0
  64. package/dist/cjs/script/api/context.d.ts.map +1 -0
  65. package/dist/cjs/script/api/context.js +17 -0
  66. package/dist/cjs/script/api/context.js.map +7 -0
  67. package/dist/cjs/script/api/log.d.ts +58 -0
  68. package/dist/cjs/script/api/log.d.ts.map +1 -0
  69. package/dist/cjs/script/api/log.js +17 -0
  70. package/dist/cjs/script/api/log.js.map +7 -0
  71. package/dist/cjs/script/api/strategy.d.ts +391 -0
  72. package/dist/cjs/script/api/strategy.d.ts.map +1 -0
  73. package/dist/cjs/script/api/strategy.js +17 -0
  74. package/dist/cjs/script/api/strategy.js.map +7 -0
  75. package/dist/cjs/script/api/ta.d.ts +1012 -0
  76. package/dist/cjs/script/api/ta.d.ts.map +1 -0
  77. package/dist/cjs/script/api/ta.js +17 -0
  78. package/dist/cjs/script/api/ta.js.map +7 -0
  79. package/dist/cjs/script/api/table.d.ts +479 -0
  80. package/dist/cjs/script/api/table.d.ts.map +1 -0
  81. package/dist/cjs/script/api/table.js +17 -0
  82. package/dist/cjs/script/api/table.js.map +7 -0
  83. package/dist/cjs/script/constants.d.ts +228 -83
  84. package/dist/cjs/script/constants.d.ts.map +1 -1
  85. package/dist/cjs/script/constants.js +87 -0
  86. package/dist/cjs/script/constants.js.map +2 -2
  87. package/dist/cjs/script/define.d.ts +94 -0
  88. package/dist/cjs/script/define.d.ts.map +1 -0
  89. package/dist/cjs/script/define.js +127 -0
  90. package/dist/cjs/script/define.js.map +7 -0
  91. package/dist/cjs/script/drawing-args.d.ts.map +1 -1
  92. package/dist/cjs/script/drawing-args.js +1 -1
  93. package/dist/cjs/script/drawing-args.js.map +2 -2
  94. package/dist/cjs/script/formula.d.ts +53 -0
  95. package/dist/cjs/script/formula.d.ts.map +1 -0
  96. package/dist/cjs/script/formula.js +402 -0
  97. package/dist/cjs/script/formula.js.map +7 -0
  98. package/dist/cjs/script/globals.d.ts +10 -0
  99. package/dist/cjs/script/globals.d.ts.map +1 -1
  100. package/dist/cjs/script/globals.js.map +1 -1
  101. package/dist/cjs/script/index.d.ts +1065 -1006
  102. package/dist/cjs/script/index.d.ts.map +1 -1
  103. package/dist/cjs/script/index.js +530 -60
  104. package/dist/cjs/script/index.js.map +3 -3
  105. package/dist/cjs/script/json.d.ts +117 -0
  106. package/dist/cjs/script/json.d.ts.map +1 -0
  107. package/dist/cjs/script/json.js +321 -0
  108. package/dist/cjs/script/json.js.map +7 -0
  109. package/dist/cjs/str/index.d.ts +50 -75
  110. package/dist/cjs/str/index.d.ts.map +1 -1
  111. package/dist/cjs/str/index.js +2 -2
  112. package/dist/cjs/str/index.js.map +2 -2
  113. package/dist/cjs/strategy/index.d.ts +102 -1
  114. package/dist/cjs/strategy/index.d.ts.map +1 -1
  115. package/dist/cjs/strategy/index.js.map +2 -2
  116. package/dist/cjs/table/index.d.ts +330 -49
  117. package/dist/cjs/table/index.d.ts.map +1 -1
  118. package/dist/cjs/table/index.js +55 -27
  119. package/dist/cjs/table/index.js.map +2 -2
  120. package/dist/cjs/text/index.d.ts +12 -14
  121. package/dist/cjs/text/index.d.ts.map +1 -1
  122. package/dist/cjs/text/index.js.map +2 -2
  123. package/dist/cjs/types/index.d.ts +15 -8
  124. package/dist/cjs/types/index.d.ts.map +1 -1
  125. package/dist/cjs/types/index.js +12 -3
  126. package/dist/cjs/types/index.js.map +2 -2
  127. package/dist/esm/box/index.d.ts +348 -289
  128. package/dist/esm/box/index.d.ts.map +1 -1
  129. package/dist/esm/box/index.js +276 -276
  130. package/dist/esm/box/index.js.map +1 -1
  131. package/dist/esm/check/node.d.ts.map +1 -1
  132. package/dist/esm/check/node.js +1 -0
  133. package/dist/esm/check/node.js.map +1 -1
  134. package/dist/esm/check/preview.d.ts +31 -0
  135. package/dist/esm/check/preview.d.ts.map +1 -0
  136. package/dist/esm/check/preview.js +296 -0
  137. package/dist/esm/check/preview.js.map +1 -0
  138. package/dist/esm/color/index.d.ts +11 -11
  139. package/dist/esm/color/index.js +11 -11
  140. package/dist/esm/color/parse.d.ts +2 -0
  141. package/dist/esm/color/parse.d.ts.map +1 -1
  142. package/dist/esm/color/parse.js +7 -0
  143. package/dist/esm/color/parse.js.map +1 -1
  144. package/dist/esm/compare/index.d.ts +76 -12
  145. package/dist/esm/compare/index.d.ts.map +1 -1
  146. package/dist/esm/compare/index.js +76 -12
  147. package/dist/esm/compare/index.js.map +1 -1
  148. package/dist/esm/drawing/registry.d.ts +28 -5
  149. package/dist/esm/drawing/registry.d.ts.map +1 -1
  150. package/dist/esm/drawing/registry.js +39 -3
  151. package/dist/esm/drawing/registry.js.map +1 -1
  152. package/dist/esm/index.d.ts +1 -1
  153. package/dist/esm/index.js +1 -1
  154. package/dist/esm/label/index.d.ts +265 -187
  155. package/dist/esm/label/index.d.ts.map +1 -1
  156. package/dist/esm/label/index.js +207 -177
  157. package/dist/esm/label/index.js.map +1 -1
  158. package/dist/esm/line/index.d.ts +247 -207
  159. package/dist/esm/line/index.d.ts.map +1 -1
  160. package/dist/esm/line/index.js +202 -194
  161. package/dist/esm/line/index.js.map +1 -1
  162. package/dist/esm/linefill/index.d.ts +61 -89
  163. package/dist/esm/linefill/index.d.ts.map +1 -1
  164. package/dist/esm/linefill/index.js +61 -89
  165. package/dist/esm/linefill/index.js.map +1 -1
  166. package/dist/esm/math/index.d.ts +49 -40
  167. package/dist/esm/math/index.d.ts.map +1 -1
  168. package/dist/esm/math/index.js +22 -9
  169. package/dist/esm/math/index.js.map +1 -1
  170. package/dist/esm/polyline/index.d.ts +57 -78
  171. package/dist/esm/polyline/index.d.ts.map +1 -1
  172. package/dist/esm/polyline/index.js +57 -78
  173. package/dist/esm/polyline/index.js.map +1 -1
  174. package/dist/esm/runtime/input-active.d.ts +2 -2
  175. package/dist/esm/runtime/input-active.js +2 -2
  176. package/dist/esm/runtime/series.d.ts +241 -161
  177. package/dist/esm/runtime/series.d.ts.map +1 -1
  178. package/dist/esm/runtime/series.js +241 -161
  179. package/dist/esm/runtime/series.js.map +1 -1
  180. package/dist/esm/script/api/alert.d.ts +37 -0
  181. package/dist/esm/script/api/alert.d.ts.map +1 -0
  182. package/dist/esm/script/api/alert.js +7 -0
  183. package/dist/esm/script/api/alert.js.map +1 -0
  184. package/dist/esm/script/api/calc.d.ts +232 -0
  185. package/dist/esm/script/api/calc.d.ts.map +1 -0
  186. package/dist/esm/script/api/calc.js +6 -0
  187. package/dist/esm/script/api/calc.js.map +1 -0
  188. package/dist/esm/script/api/color.d.ts +213 -0
  189. package/dist/esm/script/api/color.d.ts.map +1 -0
  190. package/dist/esm/script/api/color.js +6 -0
  191. package/dist/esm/script/api/color.js.map +1 -0
  192. package/dist/esm/script/api/context.d.ts +764 -0
  193. package/dist/esm/script/api/context.d.ts.map +1 -0
  194. package/dist/esm/script/api/context.js +7 -0
  195. package/dist/esm/script/api/context.js.map +1 -0
  196. package/dist/esm/script/api/log.d.ts +58 -0
  197. package/dist/esm/script/api/log.d.ts.map +1 -0
  198. package/dist/esm/script/api/log.js +6 -0
  199. package/dist/esm/script/api/log.js.map +1 -0
  200. package/dist/esm/script/api/strategy.d.ts +391 -0
  201. package/dist/esm/script/api/strategy.d.ts.map +1 -0
  202. package/dist/esm/script/api/strategy.js +7 -0
  203. package/dist/esm/script/api/strategy.js.map +1 -0
  204. package/dist/esm/script/api/ta.d.ts +1012 -0
  205. package/dist/esm/script/api/ta.d.ts.map +1 -0
  206. package/dist/esm/script/api/ta.js +6 -0
  207. package/dist/esm/script/api/ta.js.map +1 -0
  208. package/dist/esm/script/api/table.d.ts +479 -0
  209. package/dist/esm/script/api/table.d.ts.map +1 -0
  210. package/dist/esm/script/api/table.js +7 -0
  211. package/dist/esm/script/api/table.js.map +1 -0
  212. package/dist/esm/script/constants.d.ts +228 -83
  213. package/dist/esm/script/constants.d.ts.map +1 -1
  214. package/dist/esm/script/constants.js +110 -24
  215. package/dist/esm/script/constants.js.map +1 -1
  216. package/dist/esm/script/define.d.ts +94 -0
  217. package/dist/esm/script/define.d.ts.map +1 -0
  218. package/dist/esm/script/define.js +136 -0
  219. package/dist/esm/script/define.js.map +1 -0
  220. package/dist/esm/script/drawing-args.d.ts.map +1 -1
  221. package/dist/esm/script/drawing-args.js +2 -1
  222. package/dist/esm/script/drawing-args.js.map +1 -1
  223. package/dist/esm/script/formula.d.ts +53 -0
  224. package/dist/esm/script/formula.d.ts.map +1 -0
  225. package/dist/esm/script/formula.js +408 -0
  226. package/dist/esm/script/formula.js.map +1 -0
  227. package/dist/esm/script/globals.d.ts +10 -0
  228. package/dist/esm/script/globals.d.ts.map +1 -1
  229. package/dist/esm/script/globals.js.map +1 -1
  230. package/dist/esm/script/index.d.ts +1065 -1006
  231. package/dist/esm/script/index.d.ts.map +1 -1
  232. package/dist/esm/script/index.js +1096 -151
  233. package/dist/esm/script/index.js.map +1 -1
  234. package/dist/esm/script/json.d.ts +117 -0
  235. package/dist/esm/script/json.d.ts.map +1 -0
  236. package/dist/esm/script/json.js +375 -0
  237. package/dist/esm/script/json.js.map +1 -0
  238. package/dist/esm/str/index.d.ts +50 -75
  239. package/dist/esm/str/index.d.ts.map +1 -1
  240. package/dist/esm/str/index.js +51 -76
  241. package/dist/esm/str/index.js.map +1 -1
  242. package/dist/esm/strategy/index.d.ts +102 -1
  243. package/dist/esm/strategy/index.d.ts.map +1 -1
  244. package/dist/esm/strategy/index.js +1 -1
  245. package/dist/esm/strategy/index.js.map +1 -1
  246. package/dist/esm/table/index.d.ts +330 -49
  247. package/dist/esm/table/index.d.ts.map +1 -1
  248. package/dist/esm/table/index.js +372 -61
  249. package/dist/esm/table/index.js.map +1 -1
  250. package/dist/esm/text/index.d.ts +12 -14
  251. package/dist/esm/text/index.d.ts.map +1 -1
  252. package/dist/esm/text/index.js +12 -14
  253. package/dist/esm/text/index.js.map +1 -1
  254. package/dist/esm/types/index.d.ts +15 -8
  255. package/dist/esm/types/index.d.ts.map +1 -1
  256. package/dist/esm/types/index.js +15 -8
  257. package/dist/esm/types/index.js.map +1 -1
  258. package/docs/first-indicator.md +152 -0
  259. package/docs/guide.md +1185 -0
  260. package/docs/inventory.md +772 -0
  261. package/docs/no-code.md +207 -0
  262. package/docs/recipes.md +202 -0
  263. package/package.json +2 -1
  264. package/skills/oakscript/SKILL.md +8 -0
  265. package/skills/oakscript/reference/errors.md +3 -2
  266. package/src/box/index.ts +348 -289
  267. package/src/check/node.ts +1 -0
  268. package/src/check/preview.ts +307 -0
  269. package/src/color/index.ts +11 -11
  270. package/src/color/parse.ts +7 -0
  271. package/src/compare/index.ts +76 -12
  272. package/src/drawing/registry.ts +44 -5
  273. package/src/index.ts +1 -1
  274. package/src/label/index.ts +267 -189
  275. package/src/line/index.ts +248 -208
  276. package/src/linefill/index.ts +61 -89
  277. package/src/math/index.ts +51 -42
  278. package/src/polyline/index.ts +57 -78
  279. package/src/runtime/input-active.ts +2 -2
  280. package/src/runtime/series.ts +243 -163
  281. package/src/script/api/alert.ts +43 -0
  282. package/src/script/api/calc.ts +250 -0
  283. package/src/script/api/color.ts +245 -0
  284. package/src/script/api/context.ts +944 -0
  285. package/src/script/api/log.ts +60 -0
  286. package/src/script/api/strategy.ts +410 -0
  287. package/src/script/api/ta.ts +1115 -0
  288. package/src/script/api/table.ts +538 -0
  289. package/src/script/constants.ts +229 -25
  290. package/src/script/define.ts +221 -0
  291. package/src/script/drawing-args.ts +2 -1
  292. package/src/script/formula.ts +438 -0
  293. package/src/script/globals.ts +10 -0
  294. package/src/script/index.ts +1517 -239
  295. package/src/script/json.ts +457 -0
  296. package/src/str/index.ts +51 -76
  297. package/src/strategy/index.ts +102 -1
  298. package/src/table/index.ts +388 -62
  299. package/src/text/index.ts +12 -14
  300. package/src/types/index.ts +15 -8
@@ -0,0 +1 @@
1
+ {"version":3,"file":"strategy.d.ts","sourceRoot":"","sources":["../../../../src/script/api/strategy.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EACV,uBAAuB,EACvB,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACrB,aAAa,EACd,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,kFAAkF;AAClF,MAAM,WAAW,2BAA2B;IAC1C,mFAAmF;IACnF,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;IAC5B,+DAA+D;IAC/D,QAAQ,CAAC,iBAAiB,EAAE,mBAAmB,CAAC;IACh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AAE,MAAM,CAAC;IACrC,6GAA6G;IAC7G,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;CACnC"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var strategy_exports = {};
16
+ module.exports = __toCommonJS(strategy_exports);
17
+ //# sourceMappingURL=strategy.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/script/api/strategy.ts"],
4
+ "sourcesContent": ["/**\n * @fileoverview Documented type of the `strategy` script global: the `strategy()` declaration and the `strategy.*`\n * namespace (constants, order calls, results, trades, risk rules).\n * @module script/api/strategy\n */\n\nimport type { Series } from '../../runtime/series.js';\nimport type {\n StrategyCloseAllOptions,\n StrategyCloseOptions,\n StrategyDirection,\n StrategyEntryOptions,\n StrategyExitOptions,\n StrategyOptions,\n StrategyRiskDirection,\n StrategyRiskValueType,\n StrategyTrade,\n} from '../../strategy/index.js';\nimport type { BarContext } from '../index.js';\n\n/** `strategy.commission.*`: how `commission_value` of `strategy()` is counted. */\nexport interface StrategyCommissionConstants {\n /** Commission in percent of the order value (`commission_value: 0.1` is 0.1 %). */\n readonly percent: 'percent';\n /** Commission in money for each contract (or share) traded. */\n readonly cash_per_contract: 'cash_per_contract';\n /** Commission in money for each filled order, whatever its size. */\n readonly cash_per_order: 'cash_per_order';\n}\n\n/** `strategy.direction.*`: the directions allowed by `strategy.risk.allow_entry_in()`. */\nexport interface StrategyRiskDirectionConstants {\n /** Long and short entries are both allowed. */\n readonly all: 'all';\n /** Only long entries open a position. */\n readonly long: 'long';\n /** Only short entries open a position. */\n readonly short: 'short';\n}\n\n/** `strategy.oca.*`: how the orders of one OCA group (`oca_name`) act on each other. */\nexport interface StrategyOcaConstants {\n /** No group: the order does not act on other orders. */\n readonly none: 'none';\n /** When one order of the group fills, the other orders of the group are cancelled. */\n readonly cancel: 'cancel';\n /** When one order of the group fills, the quantity of the other orders of the group is reduced by the filled quantity. */\n readonly reduce: 'reduce';\n}\n\n/** `strategy.risk.*`: rules that stop or limit trading. Call them at the top level, after `strategy()`. */\nexport interface StrategyRiskNamespace {\n /**\n * Lets entries open positions in one direction only. An entry in the other direction then only closes the open\n * position instead of reversing it.\n * @param direction - `strategy.direction.all`, `strategy.direction.long` or `strategy.direction.short`.\n * @returns Nothing.\n * @example\n * ```js\n * strategy(\"Long only\", { overlay: true });\n * strategy.risk.allow_entry_in(strategy.direction.long);\n * ```\n */\n allow_entry_in(direction: StrategyRiskDirection): void;\n /**\n * Stops trading after a number of losing days in a row: pending orders are cancelled, the position is closed\n * and no new order is placed.\n * @param count - Number of consecutive losing days that stops trading.\n * @param alert_message - Message of the alert sent when the rule fires. Default: none.\n * @returns Nothing.\n * @example\n * ```js\n * strategy(\"Guarded\", { overlay: true });\n * strategy.risk.max_cons_loss_days(3);\n * ```\n */\n max_cons_loss_days(count: number, alert_message?: string): void;\n /**\n * Stops trading when the drawdown of the equity reaches a limit: pending orders are cancelled, the position is\n * closed and no new order is placed.\n * @param value - Largest drawdown allowed, in percent of the equity or in money (see `type`).\n * @param type - `\"percent_of_equity\"` or `\"cash\"` (`strategy.percent_of_equity`, `strategy.cash`).\n * @param alert_message - Message of the alert sent when the rule fires. Default: none.\n * @returns Nothing.\n * @example\n * ```js\n * strategy(\"Guarded\", { overlay: true });\n * strategy.risk.max_drawdown(20, strategy.percent_of_equity);\n * ```\n */\n max_drawdown(value: number, type: StrategyRiskValueType, alert_message?: string): void;\n /**\n * Limits the number of filled orders in one trading day: when it is reached, pending orders are cancelled, the\n * position is closed and trading stops until the next day.\n * @param count - Largest number of filled orders per day.\n * @param alert_message - Message of the alert sent when the rule fires. Default: none.\n * @returns Nothing.\n * @example\n * ```js\n * strategy(\"Intraday\", { overlay: true });\n * strategy.risk.max_intraday_filled_orders(10);\n * ```\n */\n max_intraday_filled_orders(count: number, alert_message?: string): void;\n /**\n * Limits the loss of one trading day: when it is reached, pending orders are cancelled, the position is closed\n * and trading stops until the next day.\n * @param value - Largest daily loss, in percent of the equity or in money (see `type`).\n * @param type - `\"percent_of_equity\"` or `\"cash\"` (`strategy.percent_of_equity`, `strategy.cash`).\n * @param alert_message - Message of the alert sent when the rule fires. Default: none.\n * @returns Nothing.\n * @example\n * ```js\n * strategy(\"Intraday\", { overlay: true });\n * strategy.risk.max_intraday_loss(500, strategy.cash);\n * ```\n */\n max_intraday_loss(value: number, type: StrategyRiskValueType, alert_message?: string): void;\n /**\n * Caps the size of the position: an entry that would go past it is reduced to fit.\n * @param contracts - Largest absolute position size, in contracts (shares, units).\n * @returns Nothing.\n * @example\n * ```js\n * strategy(\"Capped\", { overlay: true });\n * strategy.risk.max_position_size(100);\n * ```\n */\n max_position_size(contracts: number): void;\n}\n\n/**\n * The `strategy` global: call it to declare a strategy, and use its members to place orders and read the results.\n *\n * OakScript does not fill orders itself: the host (the app's backtester) supplies the order engine. Order calls and\n * the per-bar results (`strategy.position_size`, `strategy.equity`...) work only inside `strategy.eachBar()`;\n * `strategy.initial_capital`, `strategy.account_currency`, the constants and the risk rules work anywhere after\n * `strategy()`. A value the engine does not provide throws \"... is not provided by the strategy engine\".\n */\nexport interface StrategyNamespace {\n /**\n * Declares the script as a strategy and sets its name and its backtest properties (capital, order size,\n * commission...). Call it once, at the top of the script, instead of `indicator()`.\n * @param title - Name of the strategy, shown on the chart and in the lists.\n * @param options - Strategy properties, e.g. `overlay` (default false: own pane), `initial_capital` (default\n * 100000), `default_qty_type` (default `strategy.percent_of_equity`), `default_qty_value` (default 100),\n * `pyramiding` (default 0), `commission_type`, `commission_value` (default 0), `slippage` (ticks, default 0),\n * `process_orders_on_close` (default false). Default: all defaults.\n * @returns Nothing.\n * @example\n * ```js\n * strategy(\"MA Cross\", { overlay: true, initial_capital: 10000, default_qty_type: strategy.percent_of_equity, default_qty_value: 50 });\n * ```\n */\n (title: string, options?: StrategyOptions): void;\n\n /** Direction of a long order: buys (`strategy.entry(\"L\", strategy.long)`). */\n readonly long: 'long';\n /** Direction of a short order: sells (`strategy.entry(\"S\", strategy.short)`). */\n readonly short: 'short';\n /** Order size type: `default_qty_value` is a number of contracts (shares, units). */\n readonly fixed: 'fixed';\n /** Order size type: `default_qty_value` is an amount of money; also the money type of the risk rules. */\n readonly cash: 'cash';\n /** Order size type: `default_qty_value` is a percent of the equity; also the percent type of the risk rules. */\n readonly percent_of_equity: 'percent_of_equity';\n /** Commission types for the `commission_type` property of `strategy()`. */\n readonly commission: StrategyCommissionConstants;\n /** Directions for `strategy.risk.allow_entry_in()`. */\n readonly direction: StrategyRiskDirectionConstants;\n /** One-cancels-all group types for the `oca_type` option of `strategy.entry()` / `strategy.order()`. */\n readonly oca: StrategyOcaConstants;\n\n /**\n * The strategy's bar loop: runs the callback once per bar, oldest first, at the bar's close. Before each call the\n * engine fills the orders placed earlier; place, change or cancel orders and read the results inside it. Compute\n * every Series (`ta.*`) before it and read them with `c.get()`. A script has one `strategy.eachBar()`.\n * @param fn - Called with the bar context `c` (`c.i`, `c.close`, `c.get(series)`...); what it returns becomes\n * the value of that bar (true / false give 1 / 0, nothing gives NaN).\n * @returns A Series of the values returned by `fn`, one per bar.\n * @example\n * ```js\n * const up = ta.crossover(ta.sma(close, 10), ta.sma(close, 30));\n * strategy.eachBar((c) => {\n * if (c.get(up) === 1) strategy.entry(\"Long\", strategy.long);\n * });\n * ```\n */\n eachBar(fn: (c: BarContext) => number | boolean | void): Series;\n\n /**\n * Places an order that opens or adds to a position. An entry in the other direction first closes the open\n * position (a reversal); entries in the same direction beyond the first follow the `pyramiding` property. Without\n * `limit` or `stop` it is a market order, filled at the next bar's open. Calling it again with the id of a pending\n * order changes that order.\n * @param id - Name of the entry; exits refer to it with `from_entry`.\n * @param direction - `strategy.long` or `strategy.short`.\n * @param options - `qty` (default: from `default_qty_type` / `default_qty_value`), `limit` and `stop` prices,\n * `oca_name`, `oca_type`, `comment`, `alert_message`, `disable_alert`. NaN values count as not given. Default: {}.\n * @returns Nothing.\n * @example\n * ```js\n * const up = ta.crossover(ta.ema(close, 12), ta.ema(close, 26));\n * strategy.eachBar((c) => {\n * if (c.get(up) === 1) strategy.entry(\"Long\", strategy.long, { comment: \"EMA cross\" });\n * });\n * ```\n */\n entry(id: string, direction: StrategyDirection, options?: StrategyEntryOptions): void;\n /**\n * Places a plain order: a buy (`strategy.long`) or a sell (`strategy.short`) that adds to or reduces the position,\n * with no reversal and no `pyramiding` limit. Without `limit` or `stop` it is a market order. Calling it again with\n * the id of a pending order changes that order.\n * @param id - Name of the order.\n * @param direction - `strategy.long` (buy) or `strategy.short` (sell).\n * @param options - `qty` (default: from `default_qty_type` / `default_qty_value`), `limit` and `stop` prices,\n * `oca_name`, `oca_type`, `comment`, `alert_message`, `disable_alert`. NaN values count as not given. Default: {}.\n * @returns Nothing.\n * @example\n * ```js\n * strategy.eachBar((c) => {\n * if (c.close > c.get(close, 1)) strategy.order(\"Buy\", strategy.long, { qty: 1 });\n * });\n * ```\n */\n order(id: string, direction: StrategyDirection, options?: StrategyEntryOptions): void;\n /**\n * Places the exit orders of an entry: a stop loss, a take profit and / or a trailing stop. They wait while the\n * entry is pending and are cancelled with its position. Calling it again with the same id moves the orders (e.g.\n * a stop updated on every bar).\n * @param id - Name of the exit order.\n * @param options - `from_entry` (default: every open entry), `qty` / `qty_percent` (default: 100 % of the\n * position), prices `stop`, `limit`, `trail_price`, distances in ticks `loss`, `profit`, `trail_points`,\n * `trail_offset`, comments and alert messages. Give at least one price or distance. NaN values count as not given.\n * Default: {}.\n * @returns Nothing.\n * @example\n * ```js\n * strategy.eachBar((c) => {\n * const avg = strategy.position_avg_price;\n * if (strategy.position_size > 0) strategy.exit(\"Exit\", { from_entry: \"Long\", stop: avg * 0.98, limit: avg * 1.04 });\n * });\n * ```\n */\n exit(id: string, options?: StrategyExitOptions): void;\n /**\n * Closes the open trades of an entry with a market order, filled at the next bar's open (or at this bar's close with\n * `immediately: true`).\n * @param id - Name of the entry to close.\n * @param options - `qty` / `qty_percent` (default: the whole position of the entry), `comment`, `alert_message`,\n * `immediately` (default false), `disable_alert`. Default: {}.\n * @returns Nothing.\n * @example\n * ```js\n * const down = ta.crossunder(ta.ema(close, 12), ta.ema(close, 26));\n * strategy.eachBar((c) => {\n * if (c.get(down) === 1) strategy.close(\"Long\", { comment: \"Cross down\" });\n * });\n * ```\n */\n close(id: string, options?: StrategyCloseOptions): void;\n /**\n * Closes the whole position, whatever entries opened it, with a market order filled at the next bar's open (or at\n * this bar's close with `immediately: true`).\n * @param options - `comment`, `alert_message`, `immediately` (default false), `disable_alert`. Default: {}.\n * @returns Nothing.\n * @example\n * ```js\n * const rsi = ta.rsi(close, 14);\n * strategy.eachBar((c) => {\n * if (c.get(rsi) > 70) strategy.close_all({ comment: \"RSI > 70\" });\n * });\n * ```\n */\n close_all(options?: StrategyCloseAllOptions): void;\n /**\n * Cancels the pending orders (entries, orders or exits) with this id. Filled orders are not affected.\n * @param id - Name of the orders to cancel.\n * @returns Nothing.\n * @example\n * ```js\n * strategy.eachBar((c) => {\n * if (c.close < c.open) strategy.cancel(\"Breakout\");\n * });\n * ```\n */\n cancel(id: string): void;\n /**\n * Cancels every pending order of the strategy. Filled orders and the position are not affected.\n * @returns Nothing.\n * @example\n * ```js\n * strategy.eachBar((c) => {\n * if (c.i === c.n - 1) strategy.cancel_all();\n * });\n * ```\n */\n cancel_all(): void;\n /**\n * Reads one open trade: its entry, size and profit so far.\n * @param index - Number of the open trade, 0 for the oldest, `strategy.opentrades - 1` for the newest.\n * @returns The trade (`entry_id`, `entry_price`, `entry_bar_index`, `entry_time`, `size`, `profit`, `commission`,\n * `max_runup`, `max_drawdown`...), or undefined when there is no such trade.\n * @example\n * ```js\n * strategy.eachBar((c) => {\n * const trade = strategy.opentrade(0);\n * if (trade && c.i - trade.entry_bar_index >= 10) strategy.close(trade.entry_id);\n * });\n * ```\n */\n opentrade(index: number): StrategyTrade | undefined;\n /**\n * Reads one closed trade: its entry, exit and result.\n * @param index - Number of the closed trade, 0 for the oldest, `strategy.closedtrades - 1` for the newest.\n * @returns The trade (`entry_*` and `exit_*` fields, `size`, `profit`, `profit_percent`, `commission`...), or\n * undefined when there is no such trade.\n * @example\n * ```js\n * strategy.eachBar((c) => {\n * const last = strategy.closedtrade(strategy.closedtrades - 1);\n * if (last && last.exit_bar_index === c.i && last.profit < 0) alert(\"Losing trade closed\");\n * });\n * ```\n */\n closedtrade(index: number): StrategyTrade | undefined;\n /**\n * Gives the quantity an entry without `qty` would get if it filled at a price, from the `default_qty_type` and\n * `default_qty_value` properties and the current equity. Not every engine provides it.\n * @param fill_price - Price the order would fill at.\n * @returns The quantity, in contracts (shares, units).\n * @example\n * ```js\n * strategy.eachBar((c) => {\n * const half = Math.floor(strategy.default_entry_qty(c.close) / 2);\n * if (strategy.position_size === 0) strategy.entry(\"Half\", strategy.long, { qty: half });\n * });\n * ```\n */\n default_entry_qty(fill_price: number): number;\n /** Risk rules that stop or limit trading (drawdown, daily loss, position size...). */\n readonly risk: StrategyRiskNamespace;\n\n /** Size of the current position: positive when long, negative when short, 0 when flat. */\n readonly position_size: number;\n /** Average entry price of the current position; NaN when flat. */\n readonly position_avg_price: number;\n /** Current equity: initial capital + net profit + open profit, in the account currency. */\n readonly equity: number;\n /** Starting capital of the backtest (the `initial_capital` property); readable anywhere after `strategy()`. */\n readonly initial_capital: number;\n /** Profit of all closed trades, after commission, in the account currency. */\n readonly netprofit: number;\n /** `strategy.netprofit` in percent of the initial capital. */\n readonly netprofit_percent: number;\n /** Profit or loss of the open trades not yet realized, in the account currency. */\n readonly openprofit: number;\n /** `strategy.openprofit` in percent. */\n readonly openprofit_percent: number;\n /** Sum of the profits of the winning closed trades, in the account currency. */\n readonly grossprofit: number;\n /** `strategy.grossprofit` in percent of the initial capital. */\n readonly grossprofit_percent: number;\n /** Sum of the losses of the losing closed trades, as a positive amount in the account currency. */\n readonly grossloss: number;\n /** `strategy.grossloss` in percent of the initial capital. */\n readonly grossloss_percent: number;\n /** Number of open trades (a number, not a function: read a trade with `strategy.opentrade(i)`). */\n readonly opentrades: number;\n /** Number of closed trades (a number, not a function: read a trade with `strategy.closedtrade(i)`). */\n readonly closedtrades: number;\n /** Number of closed trades with a profit. */\n readonly wintrades: number;\n /** Number of closed trades with a loss. */\n readonly losstrades: number;\n /** Number of closed trades that broke even (profit 0). */\n readonly eventrades: number;\n /** Average profit per closed trade, in the account currency; NaN before the first closed trade. */\n readonly avg_trade: number;\n /** Average profit per closed trade, in percent; NaN before the first closed trade. */\n readonly avg_trade_percent: number;\n /** Average profit of the winning trades, in the account currency; NaN before the first one. */\n readonly avg_winning_trade: number;\n /** Average profit of the winning trades, in percent; NaN before the first one. */\n readonly avg_winning_trade_percent: number;\n /** Average loss of the losing trades, as a positive amount in the account currency; NaN before the first one. */\n readonly avg_losing_trade: number;\n /** Average loss of the losing trades, as a positive percent; NaN before the first one. */\n readonly avg_losing_trade_percent: number;\n /** Largest drop of the equity from a peak so far, in the account currency. */\n readonly max_drawdown: number;\n /** `strategy.max_drawdown` in percent. */\n readonly max_drawdown_percent: number;\n /** Largest rise of the equity from a low so far, in the account currency. */\n readonly max_runup: number;\n /** `strategy.max_runup` in percent. */\n readonly max_runup_percent: number;\n /** Largest position held so far, long or short, in contracts (shares, units). */\n readonly max_contracts_held_all: number;\n /** Largest long position held so far, in contracts (shares, units). */\n readonly max_contracts_held_long: number;\n /** Largest short position held so far, in contracts (shares, units). */\n readonly max_contracts_held_short: number;\n /** Price at which a margin call would close part of the current position; NaN when there is none. */\n readonly margin_liquidation_price: number;\n /** Id of the entry that opened the current position (its oldest open trade); empty when flat. */\n readonly position_entry_name: string;\n /** Currency of the account the results are counted in (e.g. \"USD\"); readable anywhere after `strategy()`. */\n readonly account_currency: string;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
6
+ "names": []
7
+ }