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.
- package/CHANGELOG.md +1200 -0
- package/README.md +49 -28
- package/dist/adapters/charts/alerts.d.ts +70 -0
- package/dist/adapters/charts/alerts.d.ts.map +1 -0
- package/dist/adapters/charts/alerts.js +52 -0
- package/dist/adapters/charts/alerts.js.map +1 -0
- package/dist/adapters/charts/bars.d.ts +39 -0
- package/dist/adapters/charts/bars.d.ts.map +1 -0
- package/dist/adapters/charts/bars.js +32 -0
- package/dist/adapters/charts/bars.js.map +1 -0
- package/dist/adapters/charts/candles.d.ts +40 -0
- package/dist/adapters/charts/candles.d.ts.map +1 -0
- package/dist/adapters/charts/candles.js +85 -0
- package/dist/adapters/charts/candles.js.map +1 -0
- package/dist/adapters/charts/colours.d.ts +47 -0
- package/dist/adapters/charts/colours.d.ts.map +1 -0
- package/dist/adapters/charts/colours.js +80 -0
- package/dist/adapters/charts/colours.js.map +1 -0
- package/dist/adapters/charts/columns.d.ts +37 -0
- package/dist/adapters/charts/columns.d.ts.map +1 -0
- package/dist/adapters/charts/columns.js +56 -0
- package/dist/adapters/charts/columns.js.map +1 -0
- package/dist/adapters/charts/contract.d.ts +278 -0
- package/dist/adapters/charts/contract.d.ts.map +1 -0
- package/dist/adapters/charts/contract.js +2 -0
- package/dist/adapters/charts/contract.js.map +1 -0
- package/dist/adapters/charts/descriptor.d.ts +48 -0
- package/dist/adapters/charts/descriptor.d.ts.map +1 -0
- package/dist/adapters/charts/descriptor.js +111 -0
- package/dist/adapters/charts/descriptor.js.map +1 -0
- package/dist/adapters/charts/drawings.d.ts +43 -0
- package/dist/adapters/charts/drawings.d.ts.map +1 -0
- package/dist/adapters/charts/drawings.js +172 -0
- package/dist/adapters/charts/drawings.js.map +1 -0
- package/dist/adapters/charts/errors.d.ts +28 -0
- package/dist/adapters/charts/errors.d.ts.map +1 -0
- package/dist/adapters/charts/errors.js +21 -0
- package/dist/adapters/charts/errors.js.map +1 -0
- package/dist/adapters/charts/fields.d.ts +33 -0
- package/dist/adapters/charts/fields.d.ts.map +1 -0
- package/dist/adapters/charts/fields.js +51 -0
- package/dist/adapters/charts/fields.js.map +1 -0
- package/dist/adapters/charts/fills.d.ts +23 -0
- package/dist/adapters/charts/fills.d.ts.map +1 -0
- package/dist/adapters/charts/fills.js +48 -0
- package/dist/adapters/charts/fills.js.map +1 -0
- package/dist/adapters/charts/index.d.ts +37 -0
- package/dist/adapters/charts/index.d.ts.map +1 -0
- package/dist/adapters/charts/index.js +33 -0
- package/dist/adapters/charts/index.js.map +1 -0
- package/dist/adapters/charts/levels.d.ts +39 -0
- package/dist/adapters/charts/levels.d.ts.map +1 -0
- package/dist/adapters/charts/levels.js +61 -0
- package/dist/adapters/charts/levels.js.map +1 -0
- package/dist/adapters/charts/markers.d.ts +41 -0
- package/dist/adapters/charts/markers.d.ts.map +1 -0
- package/dist/adapters/charts/markers.js +75 -0
- package/dist/adapters/charts/markers.js.map +1 -0
- package/dist/adapters/charts/paint.d.ts +61 -0
- package/dist/adapters/charts/paint.d.ts.map +1 -0
- package/dist/adapters/charts/paint.js +47 -0
- package/dist/adapters/charts/paint.js.map +1 -0
- package/dist/adapters/charts/plots.d.ts +39 -0
- package/dist/adapters/charts/plots.d.ts.map +1 -0
- package/dist/adapters/charts/plots.js +117 -0
- package/dist/adapters/charts/plots.js.map +1 -0
- package/dist/adapters/charts/produced.d.ts +57 -0
- package/dist/adapters/charts/produced.d.ts.map +1 -0
- package/dist/adapters/charts/produced.js +11 -0
- package/dist/adapters/charts/produced.js.map +1 -0
- package/dist/adapters/charts/requests.d.ts +114 -0
- package/dist/adapters/charts/requests.d.ts.map +1 -0
- package/dist/adapters/charts/requests.js +277 -0
- package/dist/adapters/charts/requests.js.map +1 -0
- package/dist/adapters/charts/run.d.ts +147 -0
- package/dist/adapters/charts/run.d.ts.map +1 -0
- package/dist/adapters/charts/run.js +148 -0
- package/dist/adapters/charts/run.js.map +1 -0
- package/dist/adapters/charts/settings.d.ts +78 -0
- package/dist/adapters/charts/settings.d.ts.map +1 -0
- package/dist/adapters/charts/settings.js +225 -0
- package/dist/adapters/charts/settings.js.map +1 -0
- package/dist/adapters/charts/surfaces.d.ts +204 -0
- package/dist/adapters/charts/surfaces.d.ts.map +1 -0
- package/dist/adapters/charts/surfaces.js +2 -0
- package/dist/adapters/charts/surfaces.js.map +1 -0
- package/dist/adapters/charts/tables.d.ts +65 -0
- package/dist/adapters/charts/tables.d.ts.map +1 -0
- package/dist/adapters/charts/tables.js +84 -0
- package/dist/adapters/charts/tables.js.map +1 -0
- package/dist/core/catalogue/catalogue.generated.d.ts +98 -10
- package/dist/core/catalogue/catalogue.generated.d.ts.map +1 -1
- package/dist/core/catalogue/catalogue.generated.js +17 -9
- package/dist/core/catalogue/catalogue.generated.js.map +1 -1
- package/dist/core/catalogue/values.generated.d.ts +25 -0
- package/dist/core/catalogue/values.generated.d.ts.map +1 -1
- package/dist/core/check/arguments.d.ts +41 -0
- package/dist/core/check/arguments.d.ts.map +1 -0
- package/dist/core/check/arguments.js +84 -0
- package/dist/core/check/arguments.js.map +1 -0
- package/dist/core/check/call-sites.d.ts +22 -0
- package/dist/core/check/call-sites.d.ts.map +1 -0
- package/dist/core/check/call-sites.js +329 -0
- package/dist/core/check/call-sites.js.map +1 -0
- package/dist/core/check/call-warmup.d.ts +37 -0
- package/dist/core/check/call-warmup.d.ts.map +1 -0
- package/dist/core/check/call-warmup.js +97 -0
- package/dist/core/check/call-warmup.js.map +1 -0
- package/dist/core/check/calls.d.ts +33 -0
- package/dist/core/check/calls.d.ts.map +1 -0
- package/dist/core/check/calls.js +348 -0
- package/dist/core/check/calls.js.map +1 -0
- package/dist/core/check/check.d.ts +23 -0
- package/dist/core/check/check.d.ts.map +1 -0
- package/dist/core/check/check.js +163 -0
- package/dist/core/check/check.js.map +1 -0
- package/dist/core/check/checked.d.ts +198 -0
- package/dist/core/check/checked.d.ts.map +1 -0
- package/dist/core/check/checked.js +19 -0
- package/dist/core/check/checked.js.map +1 -0
- package/dist/core/check/checker.d.ts +182 -0
- package/dist/core/check/checker.d.ts.map +1 -0
- package/dist/core/check/checker.js +280 -0
- package/dist/core/check/checker.js.map +1 -0
- package/dist/core/check/conditional.d.ts +35 -0
- package/dist/core/check/conditional.d.ts.map +1 -0
- package/dist/core/check/conditional.js +100 -0
- package/dist/core/check/conditional.js.map +1 -0
- package/dist/core/check/constant.d.ts +47 -0
- package/dist/core/check/constant.d.ts.map +1 -0
- package/dist/core/check/constant.js +101 -0
- package/dist/core/check/constant.js.map +1 -0
- package/dist/core/check/declaration.d.ts +33 -0
- package/dist/core/check/declaration.d.ts.map +1 -0
- package/dist/core/check/declaration.js +181 -0
- package/dist/core/check/declaration.js.map +1 -0
- package/dist/core/check/expressions.d.ts +36 -0
- package/dist/core/check/expressions.d.ts.map +1 -0
- package/dist/core/check/expressions.js +398 -0
- package/dist/core/check/expressions.js.map +1 -0
- package/dist/core/check/functions.d.ts +31 -0
- package/dist/core/check/functions.d.ts.map +1 -0
- package/dist/core/check/functions.js +238 -0
- package/dist/core/check/functions.js.map +1 -0
- package/dist/core/check/handles.d.ts +48 -0
- package/dist/core/check/handles.d.ts.map +1 -0
- package/dist/core/check/handles.js +43 -0
- package/dist/core/check/handles.js.map +1 -0
- package/dist/core/check/index.d.ts +30 -0
- package/dist/core/check/index.d.ts.map +1 -0
- package/dist/core/check/index.js +26 -0
- package/dist/core/check/index.js.map +1 -0
- package/dist/core/check/library-bars.d.ts +7 -0
- package/dist/core/check/library-bars.d.ts.map +1 -0
- package/dist/core/check/library-bars.js +181 -0
- package/dist/core/check/library-bars.js.map +1 -0
- package/dist/core/check/library-orders.d.ts +5 -0
- package/dist/core/check/library-orders.d.ts.map +1 -0
- package/dist/core/check/library-orders.js +250 -0
- package/dist/core/check/library-orders.js.map +1 -0
- package/dist/core/check/library-output.d.ts +7 -0
- package/dist/core/check/library-output.d.ts.map +1 -0
- package/dist/core/check/library-output.js +195 -0
- package/dist/core/check/library-output.js.map +1 -0
- package/dist/core/check/library-series.d.ts +3 -0
- package/dist/core/check/library-series.d.ts.map +1 -0
- package/dist/core/check/library-series.js +415 -0
- package/dist/core/check/library-series.js.map +1 -0
- package/dist/core/check/library.d.ts +204 -0
- package/dist/core/check/library.d.ts.map +1 -0
- package/dist/core/check/library.js +198 -0
- package/dist/core/check/library.js.map +1 -0
- package/dist/core/check/literals.d.ts +19 -0
- package/dist/core/check/literals.d.ts.map +1 -0
- package/dist/core/check/literals.js +22 -0
- package/dist/core/check/literals.js.map +1 -0
- package/dist/core/check/outputs.d.ts +31 -0
- package/dist/core/check/outputs.d.ts.map +1 -0
- package/dist/core/check/outputs.js +113 -0
- package/dist/core/check/outputs.js.map +1 -0
- package/dist/core/check/statements.d.ts +25 -0
- package/dist/core/check/statements.d.ts.map +1 -0
- package/dist/core/check/statements.js +377 -0
- package/dist/core/check/statements.js.map +1 -0
- package/dist/core/check/suggest.d.ts +25 -0
- package/dist/core/check/suggest.d.ts.map +1 -0
- package/dist/core/check/suggest.js +61 -0
- package/dist/core/check/suggest.js.map +1 -0
- package/dist/core/check/surface.d.ts +38 -0
- package/dist/core/check/surface.d.ts.map +1 -0
- package/dist/core/check/surface.js +100 -0
- package/dist/core/check/surface.js.map +1 -0
- package/dist/core/check/tags.d.ts +4 -0
- package/dist/core/check/tags.d.ts.map +1 -0
- package/dist/core/check/tags.js +54 -0
- package/dist/core/check/tags.js.map +1 -0
- package/dist/core/check/types.d.ts +153 -0
- package/dist/core/check/types.d.ts.map +1 -0
- package/dist/core/check/types.js +221 -0
- package/dist/core/check/types.js.map +1 -0
- package/dist/core/check/warmup.d.ts +73 -0
- package/dist/core/check/warmup.d.ts.map +1 -0
- package/dist/core/check/warmup.js +62 -0
- package/dist/core/check/warmup.js.map +1 -0
- package/dist/core/diagnostics/collector.d.ts +12 -0
- package/dist/core/diagnostics/collector.d.ts.map +1 -1
- package/dist/core/diagnostics/collector.js +27 -1
- package/dist/core/diagnostics/collector.js.map +1 -1
- package/dist/core/emit/calls.d.ts +38 -0
- package/dist/core/emit/calls.d.ts.map +1 -0
- package/dist/core/emit/calls.js +347 -0
- package/dist/core/emit/calls.js.map +1 -0
- package/dist/core/emit/canonical.d.ts +39 -0
- package/dist/core/emit/canonical.d.ts.map +1 -0
- package/dist/core/emit/canonical.js +71 -0
- package/dist/core/emit/canonical.js.map +1 -0
- package/dist/core/emit/channels.d.ts +28 -0
- package/dist/core/emit/channels.d.ts.map +1 -0
- package/dist/core/emit/channels.js +110 -0
- package/dist/core/emit/channels.js.map +1 -0
- package/dist/core/emit/code.d.ts +75 -0
- package/dist/core/emit/code.d.ts.map +1 -0
- package/dist/core/emit/code.js +104 -0
- package/dist/core/emit/code.js.map +1 -0
- package/dist/core/emit/colours.d.ts +35 -0
- package/dist/core/emit/colours.d.ts.map +1 -0
- package/dist/core/emit/colours.js +50 -0
- package/dist/core/emit/colours.js.map +1 -0
- package/dist/core/emit/context.d.ts +271 -0
- package/dist/core/emit/context.d.ts.map +1 -0
- package/dist/core/emit/context.js +358 -0
- package/dist/core/emit/context.js.map +1 -0
- package/dist/core/emit/defaults.d.ts +45 -0
- package/dist/core/emit/defaults.d.ts.map +1 -0
- package/dist/core/emit/defaults.js +116 -0
- package/dist/core/emit/defaults.js.map +1 -0
- package/dist/core/emit/emit.d.ts +13 -0
- package/dist/core/emit/emit.d.ts.map +1 -0
- package/dist/core/emit/emit.js +281 -0
- package/dist/core/emit/emit.js.map +1 -0
- package/dist/core/emit/events.d.ts +21 -0
- package/dist/core/emit/events.d.ts.map +1 -0
- package/dist/core/emit/events.js +112 -0
- package/dist/core/emit/events.js.map +1 -0
- package/dist/core/emit/expressions.d.ts +23 -0
- package/dist/core/emit/expressions.d.ts.map +1 -0
- package/dist/core/emit/expressions.js +253 -0
- package/dist/core/emit/expressions.js.map +1 -0
- package/dist/core/emit/functions.d.ts +30 -0
- package/dist/core/emit/functions.d.ts.map +1 -0
- package/dist/core/emit/functions.js +171 -0
- package/dist/core/emit/functions.js.map +1 -0
- package/dist/core/emit/gaps.d.ts +34 -0
- package/dist/core/emit/gaps.d.ts.map +1 -0
- package/dist/core/emit/gaps.js +16 -0
- package/dist/core/emit/gaps.js.map +1 -0
- package/dist/core/emit/index.d.ts +29 -0
- package/dist/core/emit/index.d.ts.map +1 -0
- package/dist/core/emit/index.js +23 -0
- package/dist/core/emit/index.js.map +1 -0
- package/dist/core/emit/inputs.d.ts +47 -0
- package/dist/core/emit/inputs.d.ts.map +1 -0
- package/dist/core/emit/inputs.js +150 -0
- package/dist/core/emit/inputs.js.map +1 -0
- package/dist/core/emit/layout.d.ts +73 -0
- package/dist/core/emit/layout.d.ts.map +1 -0
- package/dist/core/emit/layout.js +126 -0
- package/dist/core/emit/layout.js.map +1 -0
- package/dist/core/emit/meta.d.ts +14 -0
- package/dist/core/emit/meta.d.ts.map +1 -0
- package/dist/core/emit/meta.js +68 -0
- package/dist/core/emit/meta.js.map +1 -0
- package/dist/core/emit/opcodes.d.ts +28 -0
- package/dist/core/emit/opcodes.d.ts.map +1 -0
- package/dist/core/emit/opcodes.js +137 -0
- package/dist/core/emit/opcodes.js.map +1 -0
- package/dist/core/emit/outputs.d.ts +67 -0
- package/dist/core/emit/outputs.d.ts.map +1 -0
- package/dist/core/emit/outputs.js +293 -0
- package/dist/core/emit/outputs.js.map +1 -0
- package/dist/core/emit/pool.d.ts +33 -0
- package/dist/core/emit/pool.d.ts.map +1 -0
- package/dist/core/emit/pool.js +79 -0
- package/dist/core/emit/pool.js.map +1 -0
- package/dist/core/emit/program.d.ts +333 -0
- package/dist/core/emit/program.d.ts.map +1 -0
- package/dist/core/emit/program.js +15 -0
- package/dist/core/emit/program.js.map +1 -0
- package/dist/core/emit/registers.d.ts +35 -0
- package/dist/core/emit/registers.d.ts.map +1 -0
- package/dist/core/emit/registers.js +170 -0
- package/dist/core/emit/registers.js.map +1 -0
- package/dist/core/emit/request-scope.d.ts +36 -0
- package/dist/core/emit/request-scope.d.ts.map +1 -0
- package/dist/core/emit/request-scope.js +41 -0
- package/dist/core/emit/request-scope.js.map +1 -0
- package/dist/core/emit/requests.d.ts +69 -0
- package/dist/core/emit/requests.d.ts.map +1 -0
- package/dist/core/emit/requests.js +230 -0
- package/dist/core/emit/requests.js.map +1 -0
- package/dist/core/emit/requires.d.ts +4 -0
- package/dist/core/emit/requires.d.ts.map +1 -0
- package/dist/core/emit/requires.js +71 -0
- package/dist/core/emit/requires.js.map +1 -0
- package/dist/core/emit/sha256.d.ts +24 -0
- package/dist/core/emit/sha256.d.ts.map +1 -0
- package/dist/core/emit/sha256.js +109 -0
- package/dist/core/emit/sha256.js.map +1 -0
- package/dist/core/emit/statements.d.ts +20 -0
- package/dist/core/emit/statements.d.ts.map +1 -0
- package/dist/core/emit/statements.js +393 -0
- package/dist/core/emit/statements.js.map +1 -0
- package/dist/core/emit/values.d.ts +80 -0
- package/dist/core/emit/values.d.ts.map +1 -0
- package/dist/core/emit/values.js +242 -0
- package/dist/core/emit/values.js.map +1 -0
- package/dist/core/engine/alerts.d.ts +66 -0
- package/dist/core/engine/alerts.d.ts.map +1 -0
- package/dist/core/engine/alerts.js +119 -0
- package/dist/core/engine/alerts.js.map +1 -0
- package/dist/core/engine/arithmetic.d.ts +82 -0
- package/dist/core/engine/arithmetic.d.ts.map +1 -0
- package/dist/core/engine/arithmetic.js +141 -0
- package/dist/core/engine/arithmetic.js.map +1 -0
- package/dist/core/engine/bars.d.ts +95 -0
- package/dist/core/engine/bars.d.ts.map +1 -0
- package/dist/core/engine/bars.js +133 -0
- package/dist/core/engine/bars.js.map +1 -0
- package/dist/core/engine/budget.d.ts +162 -0
- package/dist/core/engine/budget.d.ts.map +1 -0
- package/dist/core/engine/budget.js +188 -0
- package/dist/core/engine/budget.js.map +1 -0
- package/dist/core/engine/channels.d.ts +106 -0
- package/dist/core/engine/channels.d.ts.map +1 -0
- package/dist/core/engine/channels.js +99 -0
- package/dist/core/engine/channels.js.map +1 -0
- package/dist/core/engine/drawings.d.ts +64 -0
- package/dist/core/engine/drawings.d.ts.map +1 -0
- package/dist/core/engine/drawings.js +67 -0
- package/dist/core/engine/drawings.js.map +1 -0
- package/dist/core/engine/engine.d.ts +140 -0
- package/dist/core/engine/engine.d.ts.map +1 -0
- package/dist/core/engine/engine.js +405 -0
- package/dist/core/engine/engine.js.map +1 -0
- package/dist/core/engine/errors.d.ts +64 -0
- package/dist/core/engine/errors.d.ts.map +1 -0
- package/dist/core/engine/errors.js +63 -0
- package/dist/core/engine/errors.js.map +1 -0
- package/dist/core/engine/frames.d.ts +48 -0
- package/dist/core/engine/frames.d.ts.map +1 -0
- package/dist/core/engine/frames.js +41 -0
- package/dist/core/engine/frames.js.map +1 -0
- package/dist/core/engine/grids.d.ts +25 -0
- package/dist/core/engine/grids.d.ts.map +1 -0
- package/dist/core/engine/grids.js +77 -0
- package/dist/core/engine/grids.js.map +1 -0
- package/dist/core/engine/guard.d.ts +4 -0
- package/dist/core/engine/guard.d.ts.map +1 -0
- package/dist/core/engine/guard.js +46 -0
- package/dist/core/engine/guard.js.map +1 -0
- package/dist/core/engine/host.d.ts +219 -0
- package/dist/core/engine/host.d.ts.map +1 -0
- package/dist/core/engine/host.js +38 -0
- package/dist/core/engine/host.js.map +1 -0
- package/dist/core/engine/index.d.ts +49 -0
- package/dist/core/engine/index.d.ts.map +1 -0
- package/dist/core/engine/index.js +33 -0
- package/dist/core/engine/index.js.map +1 -0
- package/dist/core/engine/inputs.d.ts +77 -0
- package/dist/core/engine/inputs.d.ts.map +1 -0
- package/dist/core/engine/inputs.js +205 -0
- package/dist/core/engine/inputs.js.map +1 -0
- package/dist/core/engine/ledger/call.d.ts +63 -0
- package/dist/core/engine/ledger/call.d.ts.map +1 -0
- package/dist/core/engine/ledger/call.js +136 -0
- package/dist/core/engine/ledger/call.js.map +1 -0
- package/dist/core/engine/ledger/closable.d.ts +155 -0
- package/dist/core/engine/ledger/closable.d.ts.map +1 -0
- package/dist/core/engine/ledger/closable.js +173 -0
- package/dist/core/engine/ledger/closable.js.map +1 -0
- package/dist/core/engine/ledger/holdings.d.ts +194 -0
- package/dist/core/engine/ledger/holdings.d.ts.map +1 -0
- package/dist/core/engine/ledger/holdings.js +237 -0
- package/dist/core/engine/ledger/holdings.js.map +1 -0
- package/dist/core/engine/ledger/index.d.ts +19 -0
- package/dist/core/engine/ledger/index.d.ts.map +1 -0
- package/dist/core/engine/ledger/index.js +2 -0
- package/dist/core/engine/ledger/index.js.map +1 -0
- package/dist/core/engine/ledger/intent.d.ts +106 -0
- package/dist/core/engine/ledger/intent.d.ts.map +1 -0
- package/dist/core/engine/ledger/intent.js +21 -0
- package/dist/core/engine/ledger/intent.js.map +1 -0
- package/dist/core/engine/ledger/ledger.d.ts +143 -0
- package/dist/core/engine/ledger/ledger.d.ts.map +1 -0
- package/dist/core/engine/ledger/ledger.js +237 -0
- package/dist/core/engine/ledger/ledger.js.map +1 -0
- package/dist/core/engine/ledger/place.d.ts +75 -0
- package/dist/core/engine/ledger/place.d.ts.map +1 -0
- package/dist/core/engine/ledger/place.js +174 -0
- package/dist/core/engine/ledger/place.js.map +1 -0
- package/dist/core/engine/ledger/positions.d.ts +68 -0
- package/dist/core/engine/ledger/positions.d.ts.map +1 -0
- package/dist/core/engine/ledger/positions.js +114 -0
- package/dist/core/engine/ledger/positions.js.map +1 -0
- package/dist/core/engine/ledger/refuse.d.ts +43 -0
- package/dist/core/engine/ledger/refuse.d.ts.map +1 -0
- package/dist/core/engine/ledger/refuse.js +329 -0
- package/dist/core/engine/ledger/refuse.js.map +1 -0
- package/dist/core/engine/ledger/row.d.ts +176 -0
- package/dist/core/engine/ledger/row.d.ts.map +1 -0
- package/dist/core/engine/ledger/row.js +169 -0
- package/dist/core/engine/ledger/row.js.map +1 -0
- package/dist/core/engine/ledger/sizing.d.ts +142 -0
- package/dist/core/engine/ledger/sizing.d.ts.map +1 -0
- package/dist/core/engine/ledger/sizing.js +223 -0
- package/dist/core/engine/ledger/sizing.js.map +1 -0
- package/dist/core/engine/library/arrays.d.ts +14 -0
- package/dist/core/engine/library/arrays.d.ts.map +1 -0
- package/dist/core/engine/library/arrays.js +285 -0
- package/dist/core/engine/library/arrays.js.map +1 -0
- package/dist/core/engine/library/averages.d.ts +9 -0
- package/dist/core/engine/library/averages.d.ts.map +1 -0
- package/dist/core/engine/library/averages.js +41 -0
- package/dist/core/engine/library/averages.js.map +1 -0
- package/dist/core/engine/library/binding.d.ts +230 -0
- package/dist/core/engine/library/binding.d.ts.map +1 -0
- package/dist/core/engine/library/binding.js +109 -0
- package/dist/core/engine/library/binding.js.map +1 -0
- package/dist/core/engine/library/chart.d.ts +3 -0
- package/dist/core/engine/library/chart.d.ts.map +1 -0
- package/dist/core/engine/library/chart.js +83 -0
- package/dist/core/engine/library/chart.js.map +1 -0
- package/dist/core/engine/library/colours.d.ts +26 -0
- package/dist/core/engine/library/colours.d.ts.map +1 -0
- package/dist/core/engine/library/colours.js +81 -0
- package/dist/core/engine/library/colours.js.map +1 -0
- package/dist/core/engine/library/dates.d.ts +3 -0
- package/dist/core/engine/library/dates.d.ts.map +1 -0
- package/dist/core/engine/library/dates.js +75 -0
- package/dist/core/engine/library/dates.js.map +1 -0
- package/dist/core/engine/library/index.d.ts +13 -0
- package/dist/core/engine/library/index.d.ts.map +1 -0
- package/dist/core/engine/library/index.js +86 -0
- package/dist/core/engine/library/index.js.map +1 -0
- package/dist/core/engine/library/maths.d.ts +3 -0
- package/dist/core/engine/library/maths.d.ts.map +1 -0
- package/dist/core/engine/library/maths.js +89 -0
- package/dist/core/engine/library/maths.js.map +1 -0
- package/dist/core/engine/library/objects.d.ts +3 -0
- package/dist/core/engine/library/objects.d.ts.map +1 -0
- package/dist/core/engine/library/objects.js +199 -0
- package/dist/core/engine/library/objects.js.map +1 -0
- package/dist/core/engine/library/oscillators.d.ts +3 -0
- package/dist/core/engine/library/oscillators.d.ts.map +1 -0
- package/dist/core/engine/library/oscillators.js +29 -0
- package/dist/core/engine/library/oscillators.js.map +1 -0
- package/dist/core/engine/library/ranges.d.ts +3 -0
- package/dist/core/engine/library/ranges.d.ts.map +1 -0
- package/dist/core/engine/library/ranges.js +23 -0
- package/dist/core/engine/library/ranges.js.map +1 -0
- package/dist/core/engine/library/series.d.ts +3 -0
- package/dist/core/engine/library/series.d.ts.map +1 -0
- package/dist/core/engine/library/series.js +46 -0
- package/dist/core/engine/library/series.js.map +1 -0
- package/dist/core/engine/library/state.d.ts +35 -0
- package/dist/core/engine/library/state.d.ts.map +1 -0
- package/dist/core/engine/library/state.js +19 -0
- package/dist/core/engine/library/state.js.map +1 -0
- package/dist/core/engine/library/studies.d.ts +3 -0
- package/dist/core/engine/library/studies.d.ts.map +1 -0
- package/dist/core/engine/library/studies.js +35 -0
- package/dist/core/engine/library/studies.js.map +1 -0
- package/dist/core/engine/library/text.d.ts +6 -0
- package/dist/core/engine/library/text.d.ts.map +1 -0
- package/dist/core/engine/library/text.js +280 -0
- package/dist/core/engine/library/text.js.map +1 -0
- package/dist/core/engine/library/trend.d.ts +3 -0
- package/dist/core/engine/library/trend.d.ts.map +1 -0
- package/dist/core/engine/library/trend.js +29 -0
- package/dist/core/engine/library/trend.js.map +1 -0
- package/dist/core/engine/library/volume.d.ts +3 -0
- package/dist/core/engine/library/volume.d.ts.map +1 -0
- package/dist/core/engine/library/volume.js +51 -0
- package/dist/core/engine/library/volume.js.map +1 -0
- package/dist/core/engine/load.d.ts +45 -0
- package/dist/core/engine/load.d.ts.map +1 -0
- package/dist/core/engine/load.js +60 -0
- package/dist/core/engine/load.js.map +1 -0
- package/dist/core/engine/machine.d.ts +107 -0
- package/dist/core/engine/machine.d.ts.map +1 -0
- package/dist/core/engine/machine.js +337 -0
- package/dist/core/engine/machine.js.map +1 -0
- package/dist/core/engine/memory.d.ts +60 -0
- package/dist/core/engine/memory.d.ts.map +1 -0
- package/dist/core/engine/memory.js +92 -0
- package/dist/core/engine/memory.js.map +1 -0
- package/dist/core/engine/operations.d.ts +62 -0
- package/dist/core/engine/operations.d.ts.map +1 -0
- package/dist/core/engine/operations.js +149 -0
- package/dist/core/engine/operations.js.map +1 -0
- package/dist/core/engine/orders.d.ts +56 -0
- package/dist/core/engine/orders.d.ts.map +1 -0
- package/dist/core/engine/orders.js +83 -0
- package/dist/core/engine/orders.js.map +1 -0
- package/dist/core/engine/registers.d.ts +50 -0
- package/dist/core/engine/registers.d.ts.map +1 -0
- package/dist/core/engine/registers.js +85 -0
- package/dist/core/engine/registers.js.map +1 -0
- package/dist/core/engine/request-body.d.ts +138 -0
- package/dist/core/engine/request-body.d.ts.map +1 -0
- package/dist/core/engine/request-body.js +227 -0
- package/dist/core/engine/request-body.js.map +1 -0
- package/dist/core/engine/request-plan.d.ts +79 -0
- package/dist/core/engine/request-plan.d.ts.map +1 -0
- package/dist/core/engine/request-plan.js +228 -0
- package/dist/core/engine/request-plan.js.map +1 -0
- package/dist/core/engine/requests.d.ts +105 -0
- package/dist/core/engine/requests.d.ts.map +1 -0
- package/dist/core/engine/requests.js +260 -0
- package/dist/core/engine/requests.js.map +1 -0
- package/dist/core/engine/results.d.ts +40 -0
- package/dist/core/engine/results.d.ts.map +1 -0
- package/dist/core/engine/results.js +2 -0
- package/dist/core/engine/results.js.map +1 -0
- package/dist/core/engine/series.d.ts +61 -0
- package/dist/core/engine/series.d.ts.map +1 -0
- package/dist/core/engine/series.js +41 -0
- package/dist/core/engine/series.js.map +1 -0
- package/dist/core/engine/session/hours.d.ts +49 -0
- package/dist/core/engine/session/hours.d.ts.map +1 -0
- package/dist/core/engine/session/hours.js +31 -0
- package/dist/core/engine/session/hours.js.map +1 -0
- package/dist/core/engine/session/index.d.ts +17 -0
- package/dist/core/engine/session/index.d.ts.map +1 -0
- package/dist/core/engine/session/index.js +3 -0
- package/dist/core/engine/session/index.js.map +1 -0
- package/dist/core/engine/session/record.d.ts +56 -0
- package/dist/core/engine/session/record.d.ts.map +1 -0
- package/dist/core/engine/session/record.js +165 -0
- package/dist/core/engine/session/record.js.map +1 -0
- package/dist/core/engine/session/spec.d.ts +19 -0
- package/dist/core/engine/session/spec.d.ts.map +1 -0
- package/dist/core/engine/session/spec.js +31 -0
- package/dist/core/engine/session/spec.js.map +1 -0
- package/dist/core/engine/timeframe.d.ts +59 -0
- package/dist/core/engine/timeframe.d.ts.map +1 -0
- package/dist/core/engine/timeframe.js +140 -0
- package/dist/core/engine/timeframe.js.map +1 -0
- package/dist/core/engine/types.d.ts +15 -0
- package/dist/core/engine/types.d.ts.map +1 -0
- package/dist/core/engine/types.js +2 -0
- package/dist/core/engine/types.js.map +1 -0
- package/dist/core/engine/values/heap.d.ts +134 -0
- package/dist/core/engine/values/heap.d.ts.map +1 -0
- package/dist/core/engine/values/heap.js +230 -0
- package/dist/core/engine/values/heap.js.map +1 -0
- package/dist/core/engine/values/index.d.ts +13 -0
- package/dist/core/engine/values/index.d.ts.map +1 -0
- package/dist/core/engine/values/index.js +3 -0
- package/dist/core/engine/values/index.js.map +1 -0
- package/dist/core/engine/values/value.d.ts +82 -0
- package/dist/core/engine/values/value.d.ts.map +1 -0
- package/dist/core/engine/values/value.js +134 -0
- package/dist/core/engine/values/value.js.map +1 -0
- package/dist/core/engine/verify-budgets.d.ts +35 -0
- package/dist/core/engine/verify-budgets.d.ts.map +1 -0
- package/dist/core/engine/verify-budgets.js +172 -0
- package/dist/core/engine/verify-budgets.js.map +1 -0
- package/dist/core/engine/verify-code.d.ts +32 -0
- package/dist/core/engine/verify-code.d.ts.map +1 -0
- package/dist/core/engine/verify-code.js +278 -0
- package/dist/core/engine/verify-code.js.map +1 -0
- package/dist/core/engine/verify-requests.d.ts +44 -0
- package/dist/core/engine/verify-requests.d.ts.map +1 -0
- package/dist/core/engine/verify-requests.js +220 -0
- package/dist/core/engine/verify-requests.js.map +1 -0
- package/dist/core/engine/verify-shape.d.ts +46 -0
- package/dist/core/engine/verify-shape.d.ts.map +1 -0
- package/dist/core/engine/verify-shape.js +147 -0
- package/dist/core/engine/verify-shape.js.map +1 -0
- package/dist/core/engine/verify-tables.d.ts +19 -0
- package/dist/core/engine/verify-tables.d.ts.map +1 -0
- package/dist/core/engine/verify-tables.js +171 -0
- package/dist/core/engine/verify-tables.js.map +1 -0
- package/dist/core/engine/verify.d.ts +19 -0
- package/dist/core/engine/verify.d.ts.map +1 -0
- package/dist/core/engine/verify.js +309 -0
- package/dist/core/engine/verify.js.map +1 -0
- package/dist/core/index.d.ts +61 -6
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +48 -6
- package/dist/core/index.js.map +1 -1
- package/dist/core/parse/expressions.js +1 -1
- package/dist/core/parse/expressions.js.map +1 -1
- package/dist/core/parse/names.d.ts +7 -1
- package/dist/core/parse/names.d.ts.map +1 -1
- package/dist/core/parse/names.js +28 -2
- package/dist/core/parse/names.js.map +1 -1
- package/dist/core/stdlib/averages/exponential.d.ts +51 -0
- package/dist/core/stdlib/averages/exponential.d.ts.map +1 -0
- package/dist/core/stdlib/averages/exponential.js +72 -0
- package/dist/core/stdlib/averages/exponential.js.map +1 -0
- package/dist/core/stdlib/averages/index.d.ts +7 -0
- package/dist/core/stdlib/averages/index.d.ts.map +1 -0
- package/dist/core/stdlib/averages/index.js +5 -0
- package/dist/core/stdlib/averages/index.js.map +1 -0
- package/dist/core/stdlib/averages/select.d.ts +35 -0
- package/dist/core/stdlib/averages/select.d.ts.map +1 -0
- package/dist/core/stdlib/averages/select.js +43 -0
- package/dist/core/stdlib/averages/select.js.map +1 -0
- package/dist/core/stdlib/averages/shaped.d.ts +61 -0
- package/dist/core/stdlib/averages/shaped.d.ts.map +1 -0
- package/dist/core/stdlib/averages/shaped.js +126 -0
- package/dist/core/stdlib/averages/shaped.js.map +1 -0
- package/dist/core/stdlib/averages/simple.d.ts +58 -0
- package/dist/core/stdlib/averages/simple.d.ts.map +1 -0
- package/dist/core/stdlib/averages/simple.js +92 -0
- package/dist/core/stdlib/averages/simple.js.map +1 -0
- package/dist/core/stdlib/calendar/civil.d.ts +56 -0
- package/dist/core/stdlib/calendar/civil.d.ts.map +1 -0
- package/dist/core/stdlib/calendar/civil.js +70 -0
- package/dist/core/stdlib/calendar/civil.js.map +1 -0
- package/dist/core/stdlib/calendar/fields.d.ts +36 -0
- package/dist/core/stdlib/calendar/fields.d.ts.map +1 -0
- package/dist/core/stdlib/calendar/fields.js +93 -0
- package/dist/core/stdlib/calendar/fields.js.map +1 -0
- package/dist/core/stdlib/calendar/format.d.ts +19 -0
- package/dist/core/stdlib/calendar/format.d.ts.map +1 -0
- package/dist/core/stdlib/calendar/format.js +51 -0
- package/dist/core/stdlib/calendar/format.js.map +1 -0
- package/dist/core/stdlib/calendar/index.d.ts +7 -0
- package/dist/core/stdlib/calendar/index.d.ts.map +1 -0
- package/dist/core/stdlib/calendar/index.js +5 -0
- package/dist/core/stdlib/calendar/index.js.map +1 -0
- package/dist/core/stdlib/calendar/zone.d.ts +53 -0
- package/dist/core/stdlib/calendar/zone.d.ts.map +1 -0
- package/dist/core/stdlib/calendar/zone.js +138 -0
- package/dist/core/stdlib/calendar/zone.js.map +1 -0
- package/dist/core/stdlib/index.d.ts +57 -0
- package/dist/core/stdlib/index.d.ts.map +1 -0
- package/dist/core/stdlib/index.js +51 -0
- package/dist/core/stdlib/index.js.map +1 -0
- package/dist/core/stdlib/maths/arithmetic.d.ts +38 -0
- package/dist/core/stdlib/maths/arithmetic.d.ts.map +1 -0
- package/dist/core/stdlib/maths/arithmetic.js +66 -0
- package/dist/core/stdlib/maths/arithmetic.js.map +1 -0
- package/dist/core/stdlib/maths/elementary.d.ts +65 -0
- package/dist/core/stdlib/maths/elementary.d.ts.map +1 -0
- package/dist/core/stdlib/maths/elementary.js +93 -0
- package/dist/core/stdlib/maths/elementary.js.map +1 -0
- package/dist/core/stdlib/maths/index.d.ts +4 -0
- package/dist/core/stdlib/maths/index.d.ts.map +1 -0
- package/dist/core/stdlib/maths/index.js +4 -0
- package/dist/core/stdlib/maths/index.js.map +1 -0
- package/dist/core/stdlib/maths/rounding.d.ts +43 -0
- package/dist/core/stdlib/maths/rounding.d.ts.map +1 -0
- package/dist/core/stdlib/maths/rounding.js +62 -0
- package/dist/core/stdlib/maths/rounding.js.map +1 -0
- package/dist/core/stdlib/momentum/convergence.d.ts +36 -0
- package/dist/core/stdlib/momentum/convergence.d.ts.map +1 -0
- package/dist/core/stdlib/momentum/convergence.js +48 -0
- package/dist/core/stdlib/momentum/convergence.js.map +1 -0
- package/dist/core/stdlib/momentum/index.d.ts +6 -0
- package/dist/core/stdlib/momentum/index.d.ts.map +1 -0
- package/dist/core/stdlib/momentum/index.js +6 -0
- package/dist/core/stdlib/momentum/index.js.map +1 -0
- package/dist/core/stdlib/momentum/pressure.d.ts +43 -0
- package/dist/core/stdlib/momentum/pressure.d.ts.map +1 -0
- package/dist/core/stdlib/momentum/pressure.js +103 -0
- package/dist/core/stdlib/momentum/pressure.js.map +1 -0
- package/dist/core/stdlib/momentum/rates.d.ts +74 -0
- package/dist/core/stdlib/momentum/rates.d.ts.map +1 -0
- package/dist/core/stdlib/momentum/rates.js +134 -0
- package/dist/core/stdlib/momentum/rates.js.map +1 -0
- package/dist/core/stdlib/momentum/rsi.d.ts +21 -0
- package/dist/core/stdlib/momentum/rsi.d.ts.map +1 -0
- package/dist/core/stdlib/momentum/rsi.js +30 -0
- package/dist/core/stdlib/momentum/rsi.js.map +1 -0
- package/dist/core/stdlib/momentum/stochastic.d.ts +44 -0
- package/dist/core/stdlib/momentum/stochastic.d.ts.map +1 -0
- package/dist/core/stdlib/momentum/stochastic.js +97 -0
- package/dist/core/stdlib/momentum/stochastic.js.map +1 -0
- package/dist/core/stdlib/series/changes.d.ts +59 -0
- package/dist/core/stdlib/series/changes.d.ts.map +1 -0
- package/dist/core/stdlib/series/changes.js +129 -0
- package/dist/core/stdlib/series/changes.js.map +1 -0
- package/dist/core/stdlib/series/conditions.d.ts +34 -0
- package/dist/core/stdlib/series/conditions.d.ts.map +1 -0
- package/dist/core/stdlib/series/conditions.js +52 -0
- package/dist/core/stdlib/series/conditions.js.map +1 -0
- package/dist/core/stdlib/series/extremes.d.ts +29 -0
- package/dist/core/stdlib/series/extremes.d.ts.map +1 -0
- package/dist/core/stdlib/series/extremes.js +62 -0
- package/dist/core/stdlib/series/extremes.js.map +1 -0
- package/dist/core/stdlib/series/index.d.ts +9 -0
- package/dist/core/stdlib/series/index.d.ts.map +1 -0
- package/dist/core/stdlib/series/index.js +7 -0
- package/dist/core/stdlib/series/index.js.map +1 -0
- package/dist/core/stdlib/series/pivots.d.ts +25 -0
- package/dist/core/stdlib/series/pivots.d.ts.map +1 -0
- package/dist/core/stdlib/series/pivots.js +42 -0
- package/dist/core/stdlib/series/pivots.js.map +1 -0
- package/dist/core/stdlib/series/statistics.d.ts +64 -0
- package/dist/core/stdlib/series/statistics.d.ts.map +1 -0
- package/dist/core/stdlib/series/statistics.js +148 -0
- package/dist/core/stdlib/series/statistics.js.map +1 -0
- package/dist/core/stdlib/series/totals.d.ts +68 -0
- package/dist/core/stdlib/series/totals.d.ts.map +1 -0
- package/dist/core/stdlib/series/totals.js +115 -0
- package/dist/core/stdlib/series/totals.js.map +1 -0
- package/dist/core/stdlib/trend/directional.d.ts +69 -0
- package/dist/core/stdlib/trend/directional.d.ts.map +1 -0
- package/dist/core/stdlib/trend/directional.js +151 -0
- package/dist/core/stdlib/trend/directional.js.map +1 -0
- package/dist/core/stdlib/trend/index.d.ts +4 -0
- package/dist/core/stdlib/trend/index.d.ts.map +1 -0
- package/dist/core/stdlib/trend/index.js +4 -0
- package/dist/core/stdlib/trend/index.js.map +1 -0
- package/dist/core/stdlib/trend/psar.d.ts +33 -0
- package/dist/core/stdlib/trend/psar.d.ts.map +1 -0
- package/dist/core/stdlib/trend/psar.js +86 -0
- package/dist/core/stdlib/trend/psar.js.map +1 -0
- package/dist/core/stdlib/trend/supertrend.d.ts +30 -0
- package/dist/core/stdlib/trend/supertrend.d.ts.map +1 -0
- package/dist/core/stdlib/trend/supertrend.js +65 -0
- package/dist/core/stdlib/trend/supertrend.js.map +1 -0
- package/dist/core/stdlib/values/bar.d.ts +39 -0
- package/dist/core/stdlib/values/bar.d.ts.map +1 -0
- package/dist/core/stdlib/values/bar.js +33 -0
- package/dist/core/stdlib/values/bar.js.map +1 -0
- package/dist/core/stdlib/values/index.d.ts +11 -0
- package/dist/core/stdlib/values/index.d.ts.map +1 -0
- package/dist/core/stdlib/values/index.js +6 -0
- package/dist/core/stdlib/values/index.js.map +1 -0
- package/dist/core/stdlib/values/lookback.d.ts +83 -0
- package/dist/core/stdlib/values/lookback.d.ts.map +1 -0
- package/dist/core/stdlib/values/lookback.js +134 -0
- package/dist/core/stdlib/values/lookback.js.map +1 -0
- package/dist/core/stdlib/values/region.d.ts +55 -0
- package/dist/core/stdlib/values/region.d.ts.map +1 -0
- package/dist/core/stdlib/values/region.js +73 -0
- package/dist/core/stdlib/values/region.js.map +1 -0
- package/dist/core/stdlib/values/tail.d.ts +44 -0
- package/dist/core/stdlib/values/tail.d.ts.map +1 -0
- package/dist/core/stdlib/values/tail.js +23 -0
- package/dist/core/stdlib/values/tail.js.map +1 -0
- package/dist/core/stdlib/values/value.d.ts +64 -0
- package/dist/core/stdlib/values/value.d.ts.map +1 -0
- package/dist/core/stdlib/values/value.js +61 -0
- package/dist/core/stdlib/values/value.js.map +1 -0
- package/dist/core/stdlib/volatility/bands.d.ts +50 -0
- package/dist/core/stdlib/volatility/bands.d.ts.map +1 -0
- package/dist/core/stdlib/volatility/bands.js +101 -0
- package/dist/core/stdlib/volatility/bands.js.map +1 -0
- package/dist/core/stdlib/volatility/deviation.d.ts +43 -0
- package/dist/core/stdlib/volatility/deviation.d.ts.map +1 -0
- package/dist/core/stdlib/volatility/deviation.js +75 -0
- package/dist/core/stdlib/volatility/deviation.js.map +1 -0
- package/dist/core/stdlib/volatility/index.d.ts +6 -0
- package/dist/core/stdlib/volatility/index.d.ts.map +1 -0
- package/dist/core/stdlib/volatility/index.js +5 -0
- package/dist/core/stdlib/volatility/index.js.map +1 -0
- package/dist/core/stdlib/volatility/measures.d.ts +48 -0
- package/dist/core/stdlib/volatility/measures.d.ts.map +1 -0
- package/dist/core/stdlib/volatility/measures.js +73 -0
- package/dist/core/stdlib/volatility/measures.js.map +1 -0
- package/dist/core/stdlib/volatility/range.d.ts +69 -0
- package/dist/core/stdlib/volatility/range.d.ts.map +1 -0
- package/dist/core/stdlib/volatility/range.js +86 -0
- package/dist/core/stdlib/volatility/range.js.map +1 -0
- package/dist/core/stdlib/volume/accumulation.d.ts +61 -0
- package/dist/core/stdlib/volume/accumulation.d.ts.map +1 -0
- package/dist/core/stdlib/volume/accumulation.js +127 -0
- package/dist/core/stdlib/volume/accumulation.js.map +1 -0
- package/dist/core/stdlib/volume/flow.d.ts +60 -0
- package/dist/core/stdlib/volume/flow.d.ts.map +1 -0
- package/dist/core/stdlib/volume/flow.js +125 -0
- package/dist/core/stdlib/volume/flow.js.map +1 -0
- package/dist/core/stdlib/volume/index.d.ts +5 -0
- package/dist/core/stdlib/volume/index.d.ts.map +1 -0
- package/dist/core/stdlib/volume/index.js +4 -0
- package/dist/core/stdlib/volume/index.js.map +1 -0
- package/dist/core/stdlib/volume/weighted.d.ts +52 -0
- package/dist/core/stdlib/volume/weighted.d.ts.map +1 -0
- package/dist/core/stdlib/volume/weighted.js +64 -0
- package/dist/core/stdlib/volume/weighted.js.map +1 -0
- package/dist/core/version/version.generated.d.ts +2 -2
- package/dist/core/version/version.generated.d.ts.map +1 -1
- package/dist/core/version/version.generated.js +2 -2
- package/dist/core/version/version.generated.js.map +1 -1
- package/package.json +38 -14
- package/spec/errors.json +382 -183
- package/src/adapters/charts/alerts.ts +116 -0
- package/src/adapters/charts/bars.ts +63 -0
- package/src/adapters/charts/candles.ts +137 -0
- package/src/adapters/charts/colours.ts +113 -0
- package/src/adapters/charts/columns.ts +99 -0
- package/src/adapters/charts/contract.ts +320 -0
- package/src/adapters/charts/descriptor.ts +199 -0
- package/src/adapters/charts/drawings.ts +213 -0
- package/src/adapters/charts/errors.ts +45 -0
- package/src/adapters/charts/fields.ts +74 -0
- package/src/adapters/charts/fills.ts +71 -0
- package/src/adapters/charts/index.ts +78 -0
- package/src/adapters/charts/levels.ts +92 -0
- package/src/adapters/charts/markers.ts +119 -0
- package/src/adapters/charts/paint.ts +101 -0
- package/src/adapters/charts/plots.ts +185 -0
- package/src/adapters/charts/produced.ts +68 -0
- package/src/adapters/charts/requests.ts +357 -0
- package/src/adapters/charts/run.ts +327 -0
- package/src/adapters/charts/settings.ts +273 -0
- package/src/adapters/charts/surfaces.ts +238 -0
- package/src/adapters/charts/tables.ts +155 -0
- package/src/core/catalogue/catalogue.generated.ts +17 -9
- package/src/core/catalogue/values.generated.ts +8 -0
- package/src/core/check/arguments.ts +126 -0
- package/src/core/check/call-sites.ts +385 -0
- package/src/core/check/call-warmup.ts +121 -0
- package/src/core/check/calls.ts +412 -0
- package/src/core/check/check.ts +183 -0
- package/src/core/check/checked.ts +228 -0
- package/src/core/check/checker.ts +393 -0
- package/src/core/check/conditional.ts +143 -0
- package/src/core/check/constant.ts +127 -0
- package/src/core/check/declaration.ts +230 -0
- package/src/core/check/expressions.ts +471 -0
- package/src/core/check/functions.ts +283 -0
- package/src/core/check/handles.ts +75 -0
- package/src/core/check/index.ts +67 -0
- package/src/core/check/library-bars.ts +194 -0
- package/src/core/check/library-orders.ts +290 -0
- package/src/core/check/library-output.ts +241 -0
- package/src/core/check/library-series.ts +457 -0
- package/src/core/check/library.ts +374 -0
- package/src/core/check/literals.ts +35 -0
- package/src/core/check/outputs.ts +152 -0
- package/src/core/check/statements.ts +465 -0
- package/src/core/check/suggest.ts +63 -0
- package/src/core/check/surface.ts +115 -0
- package/src/core/check/tags.ts +94 -0
- package/src/core/check/types.ts +260 -0
- package/src/core/check/warmup.ts +100 -0
- package/src/core/diagnostics/collector.ts +27 -1
- package/src/core/emit/calls.ts +415 -0
- package/src/core/emit/canonical.ts +81 -0
- package/src/core/emit/channels.ts +144 -0
- package/src/core/emit/code.ts +155 -0
- package/src/core/emit/colours.ts +75 -0
- package/src/core/emit/context.ts +461 -0
- package/src/core/emit/defaults.ts +150 -0
- package/src/core/emit/emit.ts +313 -0
- package/src/core/emit/events.ts +141 -0
- package/src/core/emit/expressions.ts +292 -0
- package/src/core/emit/functions.ts +195 -0
- package/src/core/emit/gaps.ts +44 -0
- package/src/core/emit/index.ts +74 -0
- package/src/core/emit/inputs.ts +179 -0
- package/src/core/emit/layout.ts +165 -0
- package/src/core/emit/meta.ts +104 -0
- package/src/core/emit/opcodes.ts +160 -0
- package/src/core/emit/outputs.ts +357 -0
- package/src/core/emit/pool.ts +102 -0
- package/src/core/emit/program.ts +385 -0
- package/src/core/emit/registers.ts +179 -0
- package/src/core/emit/request-scope.ts +52 -0
- package/src/core/emit/requests.ts +258 -0
- package/src/core/emit/requires.ts +91 -0
- package/src/core/emit/sha256.ts +119 -0
- package/src/core/emit/statements.ts +438 -0
- package/src/core/emit/values.ts +284 -0
- package/src/core/engine/alerts.ts +152 -0
- package/src/core/engine/arithmetic.ts +165 -0
- package/src/core/engine/bars.ts +224 -0
- package/src/core/engine/budget.ts +284 -0
- package/src/core/engine/channels.ts +171 -0
- package/src/core/engine/drawings.ts +127 -0
- package/src/core/engine/engine.ts +498 -0
- package/src/core/engine/errors.ts +100 -0
- package/src/core/engine/frames.ts +85 -0
- package/src/core/engine/grids.ts +98 -0
- package/src/core/engine/guard.ts +71 -0
- package/src/core/engine/host.ts +251 -0
- package/src/core/engine/index.ts +93 -0
- package/src/core/engine/inputs.ts +263 -0
- package/src/core/engine/ledger/call.ts +218 -0
- package/src/core/engine/ledger/closable.ts +269 -0
- package/src/core/engine/ledger/holdings.ts +354 -0
- package/src/core/engine/ledger/index.ts +28 -0
- package/src/core/engine/ledger/intent.ts +112 -0
- package/src/core/engine/ledger/ledger.ts +314 -0
- package/src/core/engine/ledger/place.ts +277 -0
- package/src/core/engine/ledger/positions.ts +123 -0
- package/src/core/engine/ledger/refuse.ts +378 -0
- package/src/core/engine/ledger/row.ts +318 -0
- package/src/core/engine/ledger/sizing.ts +292 -0
- package/src/core/engine/library/arrays.ts +316 -0
- package/src/core/engine/library/averages.ts +97 -0
- package/src/core/engine/library/binding.ts +325 -0
- package/src/core/engine/library/chart.ts +115 -0
- package/src/core/engine/library/colours.ts +111 -0
- package/src/core/engine/library/dates.ts +109 -0
- package/src/core/engine/library/index.ts +103 -0
- package/src/core/engine/library/maths.ts +134 -0
- package/src/core/engine/library/objects.ts +265 -0
- package/src/core/engine/library/oscillators.ts +124 -0
- package/src/core/engine/library/ranges.ts +51 -0
- package/src/core/engine/library/series.ts +236 -0
- package/src/core/engine/library/state.ts +47 -0
- package/src/core/engine/library/studies.ts +150 -0
- package/src/core/engine/library/text.ts +303 -0
- package/src/core/engine/library/trend.ts +79 -0
- package/src/core/engine/library/volume.ts +101 -0
- package/src/core/engine/load.ts +104 -0
- package/src/core/engine/machine.ts +446 -0
- package/src/core/engine/memory.ts +129 -0
- package/src/core/engine/operations.ts +171 -0
- package/src/core/engine/orders.ts +121 -0
- package/src/core/engine/registers.ts +104 -0
- package/src/core/engine/request-body.ts +328 -0
- package/src/core/engine/request-plan.ts +270 -0
- package/src/core/engine/requests.ts +382 -0
- package/src/core/engine/results.ts +41 -0
- package/src/core/engine/series.ts +82 -0
- package/src/core/engine/session/hours.ts +86 -0
- package/src/core/engine/session/index.ts +17 -0
- package/src/core/engine/session/record.ts +191 -0
- package/src/core/engine/session/spec.ts +45 -0
- package/src/core/engine/timeframe.ts +161 -0
- package/src/core/engine/types.ts +47 -0
- package/src/core/engine/values/heap.ts +295 -0
- package/src/core/engine/values/index.ts +34 -0
- package/src/core/engine/values/value.ts +158 -0
- package/src/core/engine/verify-budgets.ts +202 -0
- package/src/core/engine/verify-code.ts +332 -0
- package/src/core/engine/verify-requests.ts +255 -0
- package/src/core/engine/verify-shape.ts +164 -0
- package/src/core/engine/verify-tables.ts +176 -0
- package/src/core/engine/verify.ts +341 -0
- package/src/core/index.ts +128 -6
- package/src/core/parse/expressions.ts +1 -1
- package/src/core/parse/names.ts +29 -2
- package/src/core/stdlib/averages/exponential.ts +119 -0
- package/src/core/stdlib/averages/index.ts +45 -0
- package/src/core/stdlib/averages/select.ts +71 -0
- package/src/core/stdlib/averages/shaped.ts +161 -0
- package/src/core/stdlib/averages/simple.ts +139 -0
- package/src/core/stdlib/calendar/civil.ts +89 -0
- package/src/core/stdlib/calendar/fields.ts +124 -0
- package/src/core/stdlib/calendar/format.ts +71 -0
- package/src/core/stdlib/calendar/index.ts +15 -0
- package/src/core/stdlib/calendar/zone.ts +161 -0
- package/src/core/stdlib/index.ts +400 -0
- package/src/core/stdlib/maths/arithmetic.ts +74 -0
- package/src/core/stdlib/maths/elementary.ts +124 -0
- package/src/core/stdlib/maths/index.ts +43 -0
- package/src/core/stdlib/maths/rounding.ts +78 -0
- package/src/core/stdlib/momentum/convergence.ts +82 -0
- package/src/core/stdlib/momentum/index.ts +47 -0
- package/src/core/stdlib/momentum/pressure.ts +141 -0
- package/src/core/stdlib/momentum/rates.ts +188 -0
- package/src/core/stdlib/momentum/rsi.ts +49 -0
- package/src/core/stdlib/momentum/stochastic.ts +147 -0
- package/src/core/stdlib/series/changes.ts +177 -0
- package/src/core/stdlib/series/conditions.ts +74 -0
- package/src/core/stdlib/series/extremes.ts +92 -0
- package/src/core/stdlib/series/index.ts +83 -0
- package/src/core/stdlib/series/pivots.ts +63 -0
- package/src/core/stdlib/series/statistics.ts +207 -0
- package/src/core/stdlib/series/totals.ts +164 -0
- package/src/core/stdlib/trend/directional.ts +196 -0
- package/src/core/stdlib/trend/index.ts +13 -0
- package/src/core/stdlib/trend/psar.ts +131 -0
- package/src/core/stdlib/trend/supertrend.ts +100 -0
- package/src/core/stdlib/values/bar.ts +54 -0
- package/src/core/stdlib/values/index.ts +14 -0
- package/src/core/stdlib/values/lookback.ts +198 -0
- package/src/core/stdlib/values/region.ts +86 -0
- package/src/core/stdlib/values/tail.ts +58 -0
- package/src/core/stdlib/values/value.ts +82 -0
- package/src/core/stdlib/volatility/bands.ts +178 -0
- package/src/core/stdlib/volatility/deviation.ts +111 -0
- package/src/core/stdlib/volatility/index.ts +48 -0
- package/src/core/stdlib/volatility/measures.ts +96 -0
- package/src/core/stdlib/volatility/range.ts +143 -0
- package/src/core/stdlib/volume/accumulation.ts +152 -0
- package/src/core/stdlib/volume/flow.ts +173 -0
- package/src/core/stdlib/volume/index.ts +43 -0
- package/src/core/stdlib/volume/weighted.ts +101 -0
- package/src/core/version/version.generated.ts +2 -2
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { cssColour, cssOf } from './colours.js';
|
|
2
|
+
import { colourField, numberField, stringField } from './fields.js';
|
|
3
|
+
/** The language's four corners, in the chart's own words. */
|
|
4
|
+
const CORNERS = {
|
|
5
|
+
topLeft: 'top-left',
|
|
6
|
+
topRight: 'top-right',
|
|
7
|
+
bottomLeft: 'bottom-left',
|
|
8
|
+
bottomRight: 'bottom-right',
|
|
9
|
+
};
|
|
10
|
+
const ALIGNMENTS = ['left', 'center', 'right'];
|
|
11
|
+
/**
|
|
12
|
+
* The grid a chart draws, from the declaration and the engine's buffer.
|
|
13
|
+
*
|
|
14
|
+
* The buffer is paired with the declaration by the key both of them carry
|
|
15
|
+
* rather than by position. The engine reads its grids in declaration order, so
|
|
16
|
+
* the two agree today, and a pairing by position is one reordering away from
|
|
17
|
+
* drawing one grid's cells into another grid's shape, which would be a wrong
|
|
18
|
+
* table that looks like a right one.
|
|
19
|
+
*/
|
|
20
|
+
export function buildTable(program, lookup, written) {
|
|
21
|
+
const declared = program.outputs.tables[0];
|
|
22
|
+
if (declared === undefined)
|
|
23
|
+
return null;
|
|
24
|
+
return oneTable(declared, lookup, written.find((one) => one.key === declared.key));
|
|
25
|
+
}
|
|
26
|
+
function oneTable(declared, lookup, written) {
|
|
27
|
+
const position = stringField(declared.position, lookup, 'topRight');
|
|
28
|
+
const textColour = colourField(declared.options.textColor, lookup);
|
|
29
|
+
const bgColour = colourField(declared.options.bgColor, lookup);
|
|
30
|
+
const rows = whole(numberField(declared.rows, lookup, 0));
|
|
31
|
+
const cols = whole(numberField(declared.cols, lookup, 0));
|
|
32
|
+
const fallback = textColour === undefined ? undefined : cssColour(textColour);
|
|
33
|
+
const grid = [];
|
|
34
|
+
for (let row = 0; row < rows; row += 1) {
|
|
35
|
+
grid.push(new Array(cols).fill({ text: '' }));
|
|
36
|
+
}
|
|
37
|
+
for (const cell of written?.cells ?? []) {
|
|
38
|
+
const built = oneCell(cell, fallback);
|
|
39
|
+
const line = grid[cell.row];
|
|
40
|
+
if (built === undefined || line === undefined || cell.col >= cols)
|
|
41
|
+
continue;
|
|
42
|
+
line[cell.col] = built;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
rows: grid,
|
|
46
|
+
options: {
|
|
47
|
+
position: CORNERS[position] ?? 'top-right',
|
|
48
|
+
borderWidth: numberField(declared.options.borderWidth, lookup, 0),
|
|
49
|
+
...(bgColour === undefined ? {} : { background: cssColour(bgColour) }),
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* One written cell, or none.
|
|
55
|
+
*
|
|
56
|
+
* A cell whose text is absent is dropped rather than drawn, which leaves the
|
|
57
|
+
* blank cell that was already in its place: absence reaching a drawing surface
|
|
58
|
+
* is a gap, and a blank cell is what a grid draws where nothing was written
|
|
59
|
+
* (`language.md` 6.7).
|
|
60
|
+
*
|
|
61
|
+
* The grid's own text colour is written into each cell that named none, because
|
|
62
|
+
* the chart carries a text colour per cell and the language declares one for the
|
|
63
|
+
* whole grid as well.
|
|
64
|
+
*/
|
|
65
|
+
function oneCell(cell, fallback) {
|
|
66
|
+
if (typeof cell.text !== 'string')
|
|
67
|
+
return undefined;
|
|
68
|
+
const align = typeof cell.align === 'string' && ALIGNMENTS.includes(cell.align)
|
|
69
|
+
? cell.align
|
|
70
|
+
: 'left';
|
|
71
|
+
const textColour = cssOf(cell.textColor) ?? fallback;
|
|
72
|
+
const bgColour = cssOf(cell.bgColor);
|
|
73
|
+
return {
|
|
74
|
+
text: cell.text,
|
|
75
|
+
...(textColour === undefined ? {} : { textColor: textColour }),
|
|
76
|
+
...(bgColour === undefined ? {} : { bgColor: bgColour }),
|
|
77
|
+
align,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
/** A declared size, as a count of rows or columns a grid can be built with. */
|
|
81
|
+
function whole(size) {
|
|
82
|
+
return size > 0 ? Math.floor(size) : 0;
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=tables.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tables.js","sourceRoot":"","sources":["../../../src/adapters/charts/tables.ts"],"names":[],"mappings":"AAoDA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AASpE,6DAA6D;AAC7D,MAAM,OAAO,GAAiD;IAC5D,OAAO,EAAE,UAAU;IACnB,QAAQ,EAAE,WAAW;IACrB,UAAU,EAAE,aAAa;IACzB,WAAW,EAAE,cAAc;CAC5B,CAAC;AAEF,MAAM,UAAU,GAAsB,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AAElE;;;;;;;;GAQG;AACH,MAAM,UAAU,UAAU,CACxB,OAAwB,EACxB,MAAmB,EACnB,OAAwB;IAExB,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC3C,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACxC,OAAO,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;AACrF,CAAC;AAED,SAAS,QAAQ,CACf,QAAsB,EACtB,MAAmB,EACnB,OAAyB;IAEzB,MAAM,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;IACpE,MAAM,UAAU,GAAG,WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACnE,MAAM,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC/D,MAAM,IAAI,GAAG,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;IAC1D,MAAM,IAAI,GAAG,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;IAC1D,MAAM,QAAQ,GAAG,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAE9E,MAAM,IAAI,GAAkB,EAAE,CAAC;IAC/B,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;QACvC,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,CAAY,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IAC3D,CAAC;IACD,KAAK,MAAM,IAAI,IAAI,OAAO,EAAE,KAAK,IAAI,EAAE,EAAE,CAAC;QACxC,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACtC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC5B,IAAI,KAAK,KAAK,SAAS,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,GAAG,IAAI,IAAI;YAAE,SAAS;QAC5E,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IACzB,CAAC;IAED,OAAO;QACL,IAAI,EAAE,IAAI;QACV,OAAO,EAAE;YACP,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,IAAI,WAAW;YAC1C,WAAW,EAAE,WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,CAAC,CAAC;YACjE,GAAG,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC;SACvE;KACF,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;GAWG;AACH,SAAS,OAAO,CAAC,IAAc,EAAE,QAA4B;IAC3D,IAAI,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IACpD,MAAM,KAAK,GAAG,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,IAAI,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;QAC7E,CAAC,CAAE,IAAI,CAAC,KAAwB;QAChC,CAAC,CAAC,MAAM,CAAC;IACX,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,QAAQ,CAAC;IACrD,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrC,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,GAAG,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC;QAC9D,GAAG,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;QACxD,KAAK;KACN,CAAC;AACJ,CAAC;AAED,+EAA+E;AAC/E,SAAS,KAAK,CAAC,IAAY;IACzB,OAAO,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACzC,CAAC"}
|
|
@@ -360,7 +360,7 @@ export declare const ENTRIES: {
|
|
|
360
360
|
readonly since: 1;
|
|
361
361
|
readonly autofix: false;
|
|
362
362
|
readonly message: "{leftType} and {rightType} do not mix here.";
|
|
363
|
-
readonly fix: "Convert explicitly: text(x) for a string,
|
|
363
|
+
readonly 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.";
|
|
364
364
|
readonly placeholders: readonly ["leftType", "rightType"];
|
|
365
365
|
};
|
|
366
366
|
readonly OS2004: {
|
|
@@ -371,7 +371,7 @@ export declare const ENTRIES: {
|
|
|
371
371
|
readonly since: 1;
|
|
372
372
|
readonly autofix: false;
|
|
373
373
|
readonly message: "{expr} has no history, so [] cannot read a past value of it.";
|
|
374
|
-
readonly fix: "
|
|
374
|
+
readonly 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.";
|
|
375
375
|
readonly placeholders: readonly ["expr"];
|
|
376
376
|
};
|
|
377
377
|
readonly OS2005: {
|
|
@@ -459,7 +459,7 @@ export declare const ENTRIES: {
|
|
|
459
459
|
readonly since: 1;
|
|
460
460
|
readonly autofix: false;
|
|
461
461
|
readonly message: "The arms of this ? : are {leftType} and {rightType}.";
|
|
462
|
-
readonly fix: "Make both arms the same type with text() or
|
|
462
|
+
readonly fix: "Make both arms the same type with text() or toNumber(), or use none for the empty arm.";
|
|
463
463
|
readonly placeholders: readonly ["leftType", "rightType"];
|
|
464
464
|
};
|
|
465
465
|
readonly OS2013: {
|
|
@@ -539,6 +539,17 @@ export declare const ENTRIES: {
|
|
|
539
539
|
readonly fix: "Use an element type an array holds: number, string, bool, color, line, label, box, polyline or table. A plot cannot be kept anywhere, so declare each plot at the top level and give it its own name.";
|
|
540
540
|
readonly placeholders: readonly ["type"];
|
|
541
541
|
};
|
|
542
|
+
readonly OS2020: {
|
|
543
|
+
readonly code: "OS2020";
|
|
544
|
+
readonly title: "Name is planned, not implemented";
|
|
545
|
+
readonly severity: "error";
|
|
546
|
+
readonly stage: "check";
|
|
547
|
+
readonly since: 1;
|
|
548
|
+
readonly autofix: false;
|
|
549
|
+
readonly message: "{name} is planned and is not implemented in this version.";
|
|
550
|
+
readonly 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.";
|
|
551
|
+
readonly placeholders: readonly ["name"];
|
|
552
|
+
};
|
|
542
553
|
readonly OS3001: {
|
|
543
554
|
readonly code: "OS3001";
|
|
544
555
|
readonly title: "Wrong number of arguments";
|
|
@@ -657,7 +668,7 @@ export declare const ENTRIES: {
|
|
|
657
668
|
readonly since: 1;
|
|
658
669
|
readonly autofix: false;
|
|
659
670
|
readonly message: "{name}'s {argument} is {expected}; {found} was given.";
|
|
660
|
-
readonly fix: "Convert the value with text(),
|
|
671
|
+
readonly fix: "Convert the value with text(), toNumber() or toBool(), or pass an expression of type {expected}.";
|
|
661
672
|
readonly placeholders: readonly ["name", "argument", "expected", "found"];
|
|
662
673
|
};
|
|
663
674
|
readonly OS3012: {
|
|
@@ -759,6 +770,50 @@ export declare const ENTRIES: {
|
|
|
759
770
|
readonly fix: "Plot both edges at the top level, name each one, and pass the two names to fill().";
|
|
760
771
|
readonly placeholders: readonly ["argument", "found"];
|
|
761
772
|
};
|
|
773
|
+
readonly OS3021: {
|
|
774
|
+
readonly code: "OS3021";
|
|
775
|
+
readonly title: "An input written in place has no title";
|
|
776
|
+
readonly severity: "error";
|
|
777
|
+
readonly stage: "check";
|
|
778
|
+
readonly since: 1;
|
|
779
|
+
readonly autofix: false;
|
|
780
|
+
readonly message: "An input() assigned to no name is named by its title, and this one has no title written as a string literal.";
|
|
781
|
+
readonly fix: "Give it a title written as a string literal: input(2, \"Precision\").";
|
|
782
|
+
readonly placeholders: readonly [];
|
|
783
|
+
};
|
|
784
|
+
readonly OS3022: {
|
|
785
|
+
readonly code: "OS3022";
|
|
786
|
+
readonly title: "Two inputs share a settings key";
|
|
787
|
+
readonly severity: "error";
|
|
788
|
+
readonly stage: "check";
|
|
789
|
+
readonly since: 1;
|
|
790
|
+
readonly autofix: false;
|
|
791
|
+
readonly message: "This input is keyed by its title {name}, which is already the name of the input at line {line}.";
|
|
792
|
+
readonly fix: "Give this one a title of its own, or rename the input at line {line}.";
|
|
793
|
+
readonly placeholders: readonly ["name", "line"];
|
|
794
|
+
};
|
|
795
|
+
readonly OS3023: {
|
|
796
|
+
readonly code: "OS3023";
|
|
797
|
+
readonly title: "An order names a leg this file does not declare";
|
|
798
|
+
readonly severity: "error";
|
|
799
|
+
readonly stage: "check";
|
|
800
|
+
readonly since: 1;
|
|
801
|
+
readonly autofix: false;
|
|
802
|
+
readonly message: "{name} was given a {argument}, and this file declares none.";
|
|
803
|
+
readonly fix: "Leave {argument} out. A file that declares no leg has exactly one, and every order acts on it.";
|
|
804
|
+
readonly placeholders: readonly ["name", "argument"];
|
|
805
|
+
};
|
|
806
|
+
readonly OS3024: {
|
|
807
|
+
readonly code: "OS3024";
|
|
808
|
+
readonly title: "An input written in place has an empty title";
|
|
809
|
+
readonly severity: "error";
|
|
810
|
+
readonly stage: "check";
|
|
811
|
+
readonly since: 1;
|
|
812
|
+
readonly autofix: false;
|
|
813
|
+
readonly message: "An input() assigned to no name is named by its title, and this one's title is empty.";
|
|
814
|
+
readonly fix: "Give the title something to say: input(2, \"Precision\").";
|
|
815
|
+
readonly placeholders: readonly [];
|
|
816
|
+
};
|
|
762
817
|
readonly OS4001: {
|
|
763
818
|
readonly code: "OS4001";
|
|
764
819
|
readonly title: "History index is not usable";
|
|
@@ -939,7 +994,7 @@ export declare const ENTRIES: {
|
|
|
939
994
|
readonly code: "OS5004";
|
|
940
995
|
readonly title: "The program needs more state regions than the engine allows";
|
|
941
996
|
readonly severity: "error";
|
|
942
|
-
readonly stage: "
|
|
997
|
+
readonly stage: "host";
|
|
943
998
|
readonly since: 1;
|
|
944
999
|
readonly autofix: false;
|
|
945
1000
|
readonly message: "This program needs {found} state regions and the engine allows {max}; {first} calls {second} on several paths.";
|
|
@@ -994,13 +1049,24 @@ export declare const ENTRIES: {
|
|
|
994
1049
|
readonly code: "OS5009";
|
|
995
1050
|
readonly title: "The program is too large";
|
|
996
1051
|
readonly severity: "error";
|
|
997
|
-
readonly stage: "
|
|
1052
|
+
readonly stage: "host";
|
|
998
1053
|
readonly since: 1;
|
|
999
1054
|
readonly autofix: false;
|
|
1000
1055
|
readonly message: "This file compiles to {found} instructions and the ceiling is {max}.";
|
|
1001
1056
|
readonly fix: "Move the repeated block into a fn and call it, and delete branches the script no longer uses.";
|
|
1002
1057
|
readonly placeholders: readonly ["found", "max"];
|
|
1003
1058
|
};
|
|
1059
|
+
readonly OS5010: {
|
|
1060
|
+
readonly code: "OS5010";
|
|
1061
|
+
readonly title: "Too many drawing objects";
|
|
1062
|
+
readonly severity: "error";
|
|
1063
|
+
readonly stage: "runtime";
|
|
1064
|
+
readonly since: 1;
|
|
1065
|
+
readonly autofix: false;
|
|
1066
|
+
readonly message: "A script holds at most {max} drawing objects; this one would be number {found}.";
|
|
1067
|
+
readonly 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.";
|
|
1068
|
+
readonly placeholders: readonly ["max", "found"];
|
|
1069
|
+
};
|
|
1004
1070
|
readonly OS6001: {
|
|
1005
1071
|
readonly code: "OS6001";
|
|
1006
1072
|
readonly title: "Unknown timeframe";
|
|
@@ -1173,7 +1239,7 @@ export declare const ENTRIES: {
|
|
|
1173
1239
|
readonly stage: "host";
|
|
1174
1240
|
readonly since: 1;
|
|
1175
1241
|
readonly autofix: false;
|
|
1176
|
-
readonly message: "This program is in compiled format {found} and this engine implements
|
|
1242
|
+
readonly 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.";
|
|
1177
1243
|
readonly fix: "Run the program on an engine that implements format {found}, or recompile the source with a compiler that emits format {max}.";
|
|
1178
1244
|
readonly placeholders: readonly ["found", "max"];
|
|
1179
1245
|
};
|
|
@@ -1306,7 +1372,7 @@ export declare const ENTRIES: {
|
|
|
1306
1372
|
readonly since: 1;
|
|
1307
1373
|
readonly autofix: false;
|
|
1308
1374
|
readonly message: "There is no working order tagged {tag}.";
|
|
1309
|
-
readonly fix: "Use the tag the order was placed with,
|
|
1375
|
+
readonly fix: "Use the tag the order was placed with, or cancelAll() where the script means every order it has working.";
|
|
1310
1376
|
readonly placeholders: readonly ["tag"];
|
|
1311
1377
|
};
|
|
1312
1378
|
readonly OS7010: {
|
|
@@ -1375,6 +1441,28 @@ export declare const ENTRIES: {
|
|
|
1375
1441
|
readonly fix: "Connect a destination in the host, or run the file as a study(): replace buy() with signal(\"BUY\").";
|
|
1376
1442
|
readonly placeholders: readonly [];
|
|
1377
1443
|
};
|
|
1444
|
+
readonly OS7016: {
|
|
1445
|
+
readonly code: "OS7016";
|
|
1446
|
+
readonly title: "A close names a tag nothing places";
|
|
1447
|
+
readonly severity: "error";
|
|
1448
|
+
readonly stage: "check";
|
|
1449
|
+
readonly since: 1;
|
|
1450
|
+
readonly autofix: false;
|
|
1451
|
+
readonly message: "No order in this file is placed with the tag {tag}.";
|
|
1452
|
+
readonly fix: "Use the tag the entry was placed with, or leave the tag out to flatten the whole leg.";
|
|
1453
|
+
readonly placeholders: readonly ["tag"];
|
|
1454
|
+
};
|
|
1455
|
+
readonly OS7017: {
|
|
1456
|
+
readonly code: "OS7017";
|
|
1457
|
+
readonly title: "A close states more than it is closing";
|
|
1458
|
+
readonly severity: "error";
|
|
1459
|
+
readonly stage: "runtime";
|
|
1460
|
+
readonly since: 1;
|
|
1461
|
+
readonly autofix: false;
|
|
1462
|
+
readonly message: "close was given a quantity of {qty}, and {part} has {held} left to close.";
|
|
1463
|
+
readonly 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}.";
|
|
1464
|
+
readonly placeholders: readonly ["qty", "part", "held"];
|
|
1465
|
+
};
|
|
1378
1466
|
readonly OS8001: {
|
|
1379
1467
|
readonly code: "OS8001";
|
|
1380
1468
|
readonly title: "A stateful call inside a branch";
|
|
@@ -1454,12 +1542,12 @@ export declare const ENTRIES: {
|
|
|
1454
1542
|
};
|
|
1455
1543
|
readonly OS8008: {
|
|
1456
1544
|
readonly code: "OS8008";
|
|
1457
|
-
readonly title: "An alert with no id";
|
|
1545
|
+
readonly title: "An alert with no fixed id";
|
|
1458
1546
|
readonly severity: "warning";
|
|
1459
1547
|
readonly stage: "check";
|
|
1460
1548
|
readonly since: 1;
|
|
1461
1549
|
readonly autofix: false;
|
|
1462
|
-
readonly message: "This alert has no id, so its identity is derived from its position at line {line}.";
|
|
1550
|
+
readonly message: "This alert has no fixed id, so its identity is derived from its position at line {line}.";
|
|
1463
1551
|
readonly fix: "Give the alert a stable id of your own: alert(\"text\", id = \"emaCross\").";
|
|
1464
1552
|
readonly placeholders: readonly ["line"];
|
|
1465
1553
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalogue.generated.d.ts","sourceRoot":"","sources":["../../../src/core/catalogue/catalogue.generated.ts"],"names":[],"mappings":"AAQA,uEAAuE;AACvE,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C,oDAAoD;AACpD,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAE5C,+FAA+F;AAC/F,eAAO,MAAM,YAAY;;;;;;CAM2B,CAAC;AAErD,eAAO,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"catalogue.generated.d.ts","sourceRoot":"","sources":["../../../src/core/catalogue/catalogue.generated.ts"],"names":[],"mappings":"AAQA,uEAAuE;AACvE,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C,oDAAoD;AACpD,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAE5C,+FAA+F;AAC/F,eAAO,MAAM,YAAY;;;;;;CAM2B,CAAC;AAErD,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwJyC,CAAC;AAE9D,6EAA6E;AAC7E,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,OAAO,CAAC"}
|
|
@@ -46,8 +46,8 @@ export const ENTRIES = {
|
|
|
46
46
|
OS1029: { code: "OS1029", title: "A name written against a number", severity: "error", stage: "lex", since: 1, autofix: false, message: "{written} is neither a number nor a name: the number literal ends at {number}, and a name cannot begin with a digit.", fix: "Write the value in a form the language has: a decimal literal, or 0x and hexadecimal digits. There is no binary form and no octal form, and an underscore separates digit groups only where a digit follows it. Where a number and a name were meant as two things, put an operator between them.", placeholders: ["written", "number"] },
|
|
47
47
|
OS2001: { code: "OS2001", title: "Name is not defined here", severity: "error", stage: "check", since: 1, autofix: false, message: "{name} is not defined at this point in the file.", fix: "Assign {name} above this line, move this line below its assignment, or correct the spelling to {suggestion}.", placeholders: ["name", "suggestion"] },
|
|
48
48
|
OS2002: { code: "OS2002", title: "The name already exists in an enclosing scope", severity: "error", stage: "check", since: 1, autofix: false, message: "{name} is already declared at line {line}, so a second one cannot be declared here.", fix: "Rename this one, or drop the inner declaration and let the assignment update the {name} at line {line}.", placeholders: ["name", "line"] },
|
|
49
|
-
OS2003: { code: "OS2003", title: "Types do not match", severity: "error", stage: "check", since: 1, autofix: false, message: "{leftType} and {rightType} do not mix here.", fix: "Convert explicitly: text(x) for a string,
|
|
50
|
-
OS2004: { code: "OS2004", title: "This value has no history", severity: "error", stage: "check", since: 1, autofix: false, message: "{expr} has no history, so [] cannot read a past value of it.", fix: "
|
|
49
|
+
OS2003: { code: "OS2003", title: "Types do not match", severity: "error", stage: "check", since: 1, autofix: false, message: "{leftType} and {rightType} do not mix here.", 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.", placeholders: ["leftType", "rightType"] },
|
|
50
|
+
OS2004: { code: "OS2004", title: "This value has no history", severity: "error", stage: "check", since: 1, autofix: false, message: "{expr} has no history, so [] cannot read a past value of it.", 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.", placeholders: ["expr"] },
|
|
51
51
|
OS2005: { code: "OS2005", title: "Recursive call", severity: "error", stage: "check", since: 1, autofix: false, message: "{name} calls itself: {cycle}.", fix: "Rewrite it as a loop, or split the work into two functions that do not call each other.", placeholders: ["name", "cycle"] },
|
|
52
52
|
OS2006: { code: "OS2006", title: "Assignment to a loop variable", severity: "error", stage: "check", since: 1, autofix: false, message: "{name} is this loop's variable and cannot be assigned inside the body.", fix: "Use break to leave early, or keep a separate name for the value the body changes.", placeholders: ["name"] },
|
|
53
53
|
OS2007: { code: "OS2007", title: "The file has no declaration", severity: "error", stage: "check", since: 1, autofix: false, message: "A file needs one study() or strategy() declaration before any other statement.", fix: "Add study(\"Name\") as the first statement, or strategy(\"Name\") if the file places orders.", placeholders: [] },
|
|
@@ -55,7 +55,7 @@ export const ENTRIES = {
|
|
|
55
55
|
OS2009: { code: "OS2009", title: "Unknown member of a namespace", severity: "error", stage: "check", since: 1, autofix: false, message: "{namespace} has no member named {member}.", fix: "Use one of {namespace}'s members; {suggestion} is the closest match to what was written.", placeholders: ["namespace", "member", "suggestion"] },
|
|
56
56
|
OS2010: { code: "OS2010", title: "This name is not a function", severity: "error", stage: "check", since: 1, autofix: false, message: "{name} is {type}, not a function, so it cannot be called.", fix: "Remove the argument list to read the value, or call the function that was meant: {suggestion}.", placeholders: ["name", "type", "suggestion"] },
|
|
57
57
|
OS2011: { code: "OS2011", title: "A condition must be a bool", severity: "error", stage: "check", since: 1, autofix: false, message: "This condition is {type}; a condition must be bool or none.", fix: "Write the test out: {name} > 0 for a count, isNone({name}) for absence, {name} != \"\" for a string.", placeholders: ["type", "name"] },
|
|
58
|
-
OS2012: { code: "OS2012", title: "The two arms of the ternary have different types", severity: "error", stage: "check", since: 1, autofix: false, message: "The arms of this ? : are {leftType} and {rightType}.", fix: "Make both arms the same type with text() or
|
|
58
|
+
OS2012: { code: "OS2012", title: "The two arms of the ternary have different types", severity: "error", stage: "check", since: 1, autofix: false, message: "The arms of this ? : are {leftType} and {rightType}.", fix: "Make both arms the same type with text() or toNumber(), or use none for the empty arm.", placeholders: ["leftType", "rightType"] },
|
|
59
59
|
OS2013: { code: "OS2013", title: "An array literal mixes types", severity: "error", stage: "check", since: 1, autofix: false, message: "This array holds {firstType} at index 0 and {otherType} at index {index}.", fix: "Make every element {firstType}, or keep two arrays and index them together.", placeholders: ["firstType", "otherType", "index"] },
|
|
60
60
|
OS2014: { code: "OS2014", title: "A function cannot be used as a value", severity: "error", stage: "check", since: 1, autofix: false, message: "{name} is a function, and version 1 has no function values.", fix: "Call {name} with its arguments and use the value it returns.", placeholders: ["name"] },
|
|
61
61
|
OS2015: { code: "OS2015", title: "The element type of this empty array is unknown", severity: "error", stage: "check", since: 1, autofix: false, message: "An empty array literal needs its element type from an annotation or from a first use.", fix: "Annotate the declaration, var hits: array<number> = [], or put the first element in with push(), unshift(), insert() or set() and let the type be read from that call.", placeholders: [] },
|
|
@@ -63,6 +63,7 @@ export const ENTRIES = {
|
|
|
63
63
|
OS2017: { code: "OS2017", title: "A function with this name is already declared", severity: "error", stage: "check", since: 1, autofix: false, message: "{name} is already declared as a function at line {line}.", fix: "Rename one of them, or give the one function a default argument that covers both uses.", placeholders: ["name", "line"] },
|
|
64
64
|
OS2018: { code: "OS2018", title: "Duplicate parameter name", severity: "error", stage: "check", since: 1, autofix: false, message: "{name} appears twice in this parameter list.", fix: "Rename the second parameter, so every name in the list appears once.", placeholders: ["name"] },
|
|
65
65
|
OS2019: { code: "OS2019", title: "This type cannot be an array element", severity: "error", stage: "check", since: 1, autofix: false, message: "array<{type}> is not a type: {type} cannot be an array element.", fix: "Use an element type an array holds: number, string, bool, color, line, label, box, polyline or table. A plot cannot be kept anywhere, so declare each plot at the top level and give it its own name.", placeholders: ["type"] },
|
|
66
|
+
OS2020: { code: "OS2020", title: "Name is planned, not implemented", severity: "error", stage: "check", since: 1, autofix: false, message: "{name} is planned and is not implemented in this version.", 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.", placeholders: ["name"] },
|
|
66
67
|
OS3001: { code: "OS3001", title: "Wrong number of arguments", severity: "error", stage: "check", since: 1, autofix: false, message: "{name} takes {expected} arguments and {found} were given.", fix: "Pass the arguments the signature names: {signature}.", placeholders: ["name", "expected", "found", "signature"] },
|
|
67
68
|
OS3002: { code: "OS3002", title: "Unknown named argument", severity: "error", stage: "check", since: 1, autofix: false, message: "{name} has no argument called {argument}.", fix: "Use one of {names}; {suggestion} is the closest to what was written.", placeholders: ["name", "argument", "names", "suggestion"] },
|
|
68
69
|
OS3003: { code: "OS3003", title: "This option must be a constant", severity: "error", stage: "check", since: 1, autofix: false, message: "{option} is read once, before the first bar, so it cannot depend on bar data.", fix: "Use a literal, or make it tunable with an input(): {option} = input(2, \"{option}\").", placeholders: ["option"] },
|
|
@@ -73,7 +74,7 @@ export const ENTRIES = {
|
|
|
73
74
|
OS3008: { code: "OS3008", title: "The value is not valid for this parameter", severity: "error", stage: "check", since: 1, autofix: false, message: "{argument} accepts {values}; {found} is not one of them.", fix: "Use one of {values}; {suggestion} is the closest to what was written.", placeholders: ["argument", "values", "found", "suggestion"] },
|
|
74
75
|
OS3009: { code: "OS3009", title: "This option needs another option to be set", severity: "error", stage: "check", since: 1, autofix: false, message: "{option} = {value} requires {required}.", fix: "Set {required} in the declaration, or choose a value of {option} that stands on its own.", placeholders: ["option", "value", "required"] },
|
|
75
76
|
OS3010: { code: "OS3010", title: "Two arguments that cannot both be given", severity: "error", stage: "check", since: 1, autofix: false, message: "{first} and {second} set the same thing two ways.", fix: "Keep one of the two: an absolute price or a distance from the entry, one colour for the whole band or a colour for each side, and on a leg described as a future neither right nor strikeOffset.", placeholders: ["first", "second"] },
|
|
76
|
-
OS3011: { code: "OS3011", title: "Argument has the wrong type", severity: "error", stage: "check", since: 1, autofix: false, message: "{name}'s {argument} is {expected}; {found} was given.", fix: "Convert the value with text(),
|
|
77
|
+
OS3011: { code: "OS3011", title: "Argument has the wrong type", severity: "error", stage: "check", since: 1, autofix: false, message: "{name}'s {argument} is {expected}; {found} was given.", fix: "Convert the value with text(), toNumber() or toBool(), or pass an expression of type {expected}.", placeholders: ["name", "argument", "expected", "found"] },
|
|
77
78
|
OS3012: { code: "OS3012", title: "A required argument is missing", severity: "error", stage: "check", since: 1, autofix: false, message: "{name} requires {argument}, which has no default.", fix: "Pass {argument} at the call site, as the example shows: {example}.", placeholders: ["name", "argument", "example"] },
|
|
78
79
|
OS3013: { code: "OS3013", title: "Argument given twice", severity: "error", stage: "check", since: 1, autofix: false, message: "{argument} is given twice at this call site.", fix: "Delete one of the two, keeping the value that was meant.", placeholders: ["argument"] },
|
|
79
80
|
OS3014: { code: "OS3014", title: "limits() is in the wrong place", severity: "error", stage: "check", since: 1, autofix: false, message: "limits() appears at most once, immediately after the declaration; this one is at line {line}.", fix: "Move the limits() line directly under study(...) or strategy(...), and merge two calls into one.", placeholders: ["line"] },
|
|
@@ -83,6 +84,10 @@ export const ENTRIES = {
|
|
|
83
84
|
OS3018: { code: "OS3018", title: "The default is not in the options list", severity: "error", stage: "check", since: 1, autofix: false, message: "This input's default {default} is not one of options {values}.", fix: "Add {default} to options, or make the default one of the listed values.", placeholders: ["default", "values"] },
|
|
84
85
|
OS3019: { code: "OS3019", title: "A declaration handle in an object argument", severity: "error", stage: "check", since: 1, autofix: false, message: "{name}'s {argument} is {expected}; {found} is a declaration handle, which has no value at run time.", fix: "Pass an object the script created with draw.line(), draw.box() or draw.label(), and change a plot's own appearance through the arguments of the plot call instead.", placeholders: ["name", "argument", "expected", "found"] },
|
|
85
86
|
OS3020: { code: "OS3020", title: "fill needs two declared plots", severity: "error", stage: "check", since: 1, autofix: false, message: "fill's {argument} is {found}; it takes a plot declared by plot() or plotCandles().", fix: "Plot both edges at the top level, name each one, and pass the two names to fill().", placeholders: ["argument", "found"] },
|
|
87
|
+
OS3021: { code: "OS3021", title: "An input written in place has no title", severity: "error", stage: "check", since: 1, autofix: false, message: "An input() assigned to no name is named by its title, and this one has no title written as a string literal.", fix: "Give it a title written as a string literal: input(2, \"Precision\").", placeholders: [] },
|
|
88
|
+
OS3022: { code: "OS3022", title: "Two inputs share a settings key", severity: "error", stage: "check", since: 1, autofix: false, message: "This input is keyed by its title {name}, which is already the name of the input at line {line}.", fix: "Give this one a title of its own, or rename the input at line {line}.", placeholders: ["name", "line"] },
|
|
89
|
+
OS3023: { code: "OS3023", title: "An order names a leg this file does not declare", severity: "error", stage: "check", since: 1, autofix: false, message: "{name} was given a {argument}, and this file declares none.", fix: "Leave {argument} out. A file that declares no leg has exactly one, and every order acts on it.", placeholders: ["name", "argument"] },
|
|
90
|
+
OS3024: { code: "OS3024", title: "An input written in place has an empty title", severity: "error", stage: "check", since: 1, autofix: false, message: "An input() assigned to no name is named by its title, and this one's title is empty.", fix: "Give the title something to say: input(2, \"Precision\").", placeholders: [] },
|
|
86
91
|
OS4001: { code: "OS4001", title: "History index is not usable", severity: "error", stage: "runtime", since: 1, autofix: false, message: "[{index}] is not a whole number of bars at or above zero.", fix: "Wrap the index in floor() or round(), and clamp a computed index with max(0, n).", placeholders: ["index"] },
|
|
87
92
|
OS4002: { code: "OS4002", title: "History index is deeper than the retained depth", severity: "error", stage: "runtime", since: 1, autofix: false, message: "[{index}] reaches past the retained depth of {depth} bars.", fix: "Raise the depth in one place: limits(history = {suggested}).", placeholders: ["index", "depth", "suggested"] },
|
|
88
93
|
OS4003: { code: "OS4003", title: "A whole number was required here", severity: "error", stage: "runtime", since: 1, autofix: false, message: "{name}'s {argument} was {found} on this bar; a whole number was required.", fix: "Round the value before passing it: floor() towards zero, round() to nearest.", placeholders: ["name", "argument", "found"] },
|
|
@@ -99,12 +104,13 @@ export const ENTRIES = {
|
|
|
99
104
|
OS5001: { code: "OS5001", title: "Loop budget exhausted", severity: "error", stage: "runtime", since: 1, autofix: false, message: "This bar used its {budget} loop iterations, and the loop at line {line} was still running.", fix: "Fix the exit condition, or raise the budget in one line: limits(loops = {suggested}).", placeholders: ["budget", "line", "suggested"] },
|
|
100
105
|
OS5002: { code: "OS5002", title: "The array is too large", severity: "error", stage: "runtime", since: 1, autofix: false, message: "An array holds at most {max} elements; {name} reached {size}.", fix: "Drop the oldest element as you append: if size(arr) > 500, shift(arr).", placeholders: ["max", "name", "size"] },
|
|
101
106
|
OS5003: { code: "OS5003", title: "The host refused this limits() value", severity: "error", stage: "host", since: 1, autofix: false, message: "This host allows {option} up to {max}; the file asks for {found}.", fix: "Lower {option} to {max} or below, or run the file on a host that allows more.", placeholders: ["option", "max", "found"] },
|
|
102
|
-
OS5004: { code: "OS5004", title: "The program needs more state regions than the engine allows", severity: "error", stage: "
|
|
107
|
+
OS5004: { code: "OS5004", title: "The program needs more state regions than the engine allows", severity: "error", stage: "host", since: 1, autofix: false, message: "This program needs {found} state regions and the engine allows {max}; {first} calls {second} on several paths.", fix: "Call the inner function once at the top level, give its result a name, and pass that name down.", placeholders: ["found", "max", "first", "second"] },
|
|
103
108
|
OS5005: { code: "OS5005", title: "Nesting is too deep", severity: "error", stage: "parse", since: 1, autofix: false, message: "{construct} is nested {found} deep and the ceiling is {max}.", fix: "Flatten it: give the inner expression a name at the top level and use the name.", placeholders: ["construct", "found", "max"] },
|
|
104
109
|
OS5006: { code: "OS5006", title: "Too many outstanding data requests", severity: "error", stage: "host", since: 1, autofix: false, message: "This file makes {found} data requests and the host allows {max}.", fix: "Keep one request per symbol and timeframe, reuse the name it assigns, and delete the requests whose results are unused.", placeholders: ["found", "max"] },
|
|
105
110
|
OS5007: { code: "OS5007", title: "The bar took too long", severity: "error", stage: "host", since: 1, autofix: false, message: "Bar {bar} ran for {ms} ms and the host allows {max} ms.", fix: "Keep a running value in a var and update it per bar instead of recomputing over the whole history.", placeholders: ["bar", "ms", "max"] },
|
|
106
111
|
OS5008: { code: "OS5008", title: "The string is too long", severity: "error", stage: "runtime", since: 1, autofix: false, message: "A string holds at most {max} characters; this one reached {found}.", fix: "Keep the pieces in an array, trim it to the rows you display, and join only those.", placeholders: ["max", "found"] },
|
|
107
|
-
OS5009: { code: "OS5009", title: "The program is too large", severity: "error", stage: "
|
|
112
|
+
OS5009: { code: "OS5009", title: "The program is too large", severity: "error", stage: "host", since: 1, autofix: false, message: "This file compiles to {found} instructions and the ceiling is {max}.", fix: "Move the repeated block into a fn and call it, and delete branches the script no longer uses.", placeholders: ["found", "max"] },
|
|
113
|
+
OS5010: { code: "OS5010", title: "Too many drawing objects", severity: "error", stage: "runtime", since: 1, autofix: false, message: "A script holds at most {max} drawing objects; this one would be number {found}.", 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.", placeholders: ["max", "found"] },
|
|
108
114
|
OS6001: { code: "OS6001", title: "Unknown timeframe", severity: "error", stage: "check", since: 1, autofix: false, message: "{value} is not a timeframe.", fix: "Write a count and a unit, or a bare number of minutes: \"5m\", \"1h\", \"1D\", \"1W\", \"60\".", placeholders: ["value"] },
|
|
109
115
|
OS6002: { code: "OS6002", title: "The requested timeframe is lower than the chart's", severity: "error", stage: "host", since: 1, autofix: false, message: "The chart is {chart} and the request asks for {requested}.", fix: "Request {chart} or higher, or change the chart's interval to the lower one and fold upwards instead.", placeholders: ["chart", "requested"] },
|
|
110
116
|
OS6003: { code: "OS6003", title: "A per-bar name inside a request expression", severity: "error", stage: "check", since: 1, autofix: false, message: "{name} is computed on this chart's bars, so it has no meaning on the requested ones.", fix: "Move the calculation inside the request expression, or pass a constant: a literal or an input().", placeholders: ["name"] },
|
|
@@ -120,7 +126,7 @@ export const ENTRIES = {
|
|
|
120
126
|
OS6013: { code: "OS6013", title: "The request changed after the first bar", severity: "error", stage: "runtime", since: 1, autofix: false, message: "This request asked for {first} on bar 0 and for {found} on bar {bar}.", fix: "Compute the symbol and the timeframe from literals or inputs, not from bar data.", placeholders: ["first", "found", "bar"] },
|
|
121
127
|
OS6014: { code: "OS6014", title: "The feed does not offer this timeframe", severity: "error", stage: "host", since: 1, autofix: false, message: "The host has no {timeframe} data for {symbol}; it offers {available}.", fix: "Request one of {available}, or derive the interval you want from a lower one the host does serve.", placeholders: ["timeframe", "symbol", "available"] },
|
|
122
128
|
OS6015: { code: "OS6015", title: "The requested timeframe does not fold into the chart's", severity: "error", stage: "host", since: 1, autofix: false, message: "{requested} is not a whole multiple of {chart}.", fix: "Request a multiple of {chart}, for example {suggestion}.", placeholders: ["requested", "chart", "suggestion"] },
|
|
123
|
-
OS6016: { code: "OS6016", title: "The compiled format version is not one this engine implements", severity: "error", stage: "host", since: 1, autofix: false, message: "This program is in compiled format {found} and this engine implements
|
|
129
|
+
OS6016: { code: "OS6016", title: "The compiled format version is not one this engine implements", severity: "error", stage: "host", since: 1, autofix: false, 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.", fix: "Run the program on an engine that implements format {found}, or recompile the source with a compiler that emits format {max}.", placeholders: ["found", "max"] },
|
|
124
130
|
OS6017: { code: "OS6017", title: "The program's language version is not one this engine implements", severity: "error", stage: "host", since: 1, autofix: false, message: "This program was compiled from language version {found}, and this engine implements {versions}.", fix: "Upgrade the engine to one that implements language version {found}, or recompile the source against a version it has.", placeholders: ["found", "versions"] },
|
|
125
131
|
OS6018: { code: "OS6018", title: "The compiled program is malformed", severity: "error", stage: "host", since: 1, autofix: false, message: "The program failed verification at {location}: {reason}.", 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.", placeholders: ["location", "reason"] },
|
|
126
132
|
OS6019: { code: "OS6019", title: "A host setting fails the input's validation", severity: "error", stage: "host", since: 1, autofix: false, message: "The host supplied {value} for {key}, and {validation}.", fix: "Correct the value in the settings dialog, or widen the input's own min, max or options so the value is allowed.", placeholders: ["value", "key", "validation"] },
|
|
@@ -132,13 +138,15 @@ export const ENTRIES = {
|
|
|
132
138
|
OS7006: { code: "OS7006", title: "Price is not on a tick", severity: "error", stage: "runtime", since: 1, autofix: false, message: "{symbol} ticks at {tick}, and {price} does not fall on one.", fix: "Round to the tick before passing the price: round(price / chart.tickSize) * chart.tickSize.", placeholders: ["symbol", "tick", "price"] },
|
|
133
139
|
OS7007: { code: "OS7007", title: "A resting order has no price", severity: "error", stage: "runtime", since: 1, autofix: false, message: "A {type} order needs {argument}, and none was given.", fix: "Pass {argument}, or leave the type as market and let the order fill at the next price.", placeholders: ["type", "argument"] },
|
|
134
140
|
OS7008: { code: "OS7008", title: "The entry was refused by pyramiding", severity: "error", stage: "runtime", since: 1, autofix: false, message: "This strategy allows {max} entries in one direction and already holds {found}.", fix: "Raise pyramiding in the declaration, or test pos.size before entering again.", placeholders: ["max", "found"] },
|
|
135
|
-
OS7009: { code: "OS7009", title: "Unknown order tag", severity: "error", stage: "runtime", since: 1, autofix: false, message: "There is no working order tagged {tag}.", fix: "Use the tag the order was placed with,
|
|
141
|
+
OS7009: { code: "OS7009", title: "Unknown order tag", severity: "error", stage: "runtime", since: 1, autofix: false, message: "There is no working order tagged {tag}.", fix: "Use the tag the order was placed with, or cancelAll() where the script means every order it has working.", placeholders: ["tag"] },
|
|
136
142
|
OS7010: { code: "OS7010", title: "A bracket price is on the wrong side of the entry", severity: "error", stage: "runtime", since: 1, autofix: false, message: "A {side} entry at {entry} cannot take a {leg} at {price}.", fix: "Put the stop below a long entry and the limit above it, and swap the two for a short.", placeholders: ["side", "entry", "leg", "price"] },
|
|
137
143
|
OS7011: { code: "OS7011", title: "The order needs more capital than the strategy has", severity: "error", stage: "runtime", since: 1, autofix: false, message: "This order needs {required} and the strategy has {available}.", fix: "Size from equity with qtyType = \"equityPercent\", or test pos.equity before entering.", placeholders: ["required", "available"] },
|
|
138
144
|
OS7012: { code: "OS7012", title: "The instrument is outside its session", severity: "error", stage: "runtime", since: 1, autofix: false, message: "{symbol} is outside its trading session at {time}.", fix: "Guard entries with session.isOpen, and set closeOnSessionEnd = true to flatten at the close.", placeholders: ["symbol", "time"] },
|
|
139
145
|
OS7013: { code: "OS7013", title: "Two opposite orders on one bar", severity: "error", stage: "runtime", since: 1, autofix: false, message: "{first} and {second} were both placed on bar {bar}.", fix: "Make the conditions exclusive with else if, or place the exit on this bar and the entry on the next.", placeholders: ["first", "second", "bar"] },
|
|
140
146
|
OS7014: { code: "OS7014", title: "The destination rejected the order", severity: "error", stage: "host", since: 1, autofix: false, message: "The order destination rejected {name}: {reason}.", fix: "Act on {reason}: it comes from the destination, not from the script, and the same order will be rejected again until the account or the order changes.", placeholders: ["name", "reason"] },
|
|
141
147
|
OS7015: { code: "OS7015", title: "The strategy has no order destination", severity: "error", stage: "host", since: 1, autofix: false, message: "This strategy placed an order and the host supplied no destination.", fix: "Connect a destination in the host, or run the file as a study(): replace buy() with signal(\"BUY\").", placeholders: [] },
|
|
148
|
+
OS7016: { code: "OS7016", title: "A close names a tag nothing places", severity: "error", stage: "check", since: 1, autofix: false, message: "No order in this file is placed with the tag {tag}.", fix: "Use the tag the entry was placed with, or leave the tag out to flatten the whole leg.", placeholders: ["tag"] },
|
|
149
|
+
OS7017: { code: "OS7017", title: "A close states more than it is closing", severity: "error", stage: "runtime", since: 1, autofix: false, message: "close was given a quantity of {qty}, and {part} has {held} left to close.", 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}.", placeholders: ["qty", "part", "held"] },
|
|
142
150
|
OS8001: { code: "OS8001", title: "A stateful call inside a branch", severity: "warning", stage: "check", since: 1, autofix: false, message: "{name} advances only on the bars where this branch runs, and is absent on the rest.", fix: "Compute it unconditionally at the top level and use the result inside the branch.", placeholders: ["name"] },
|
|
143
151
|
OS8002: { code: "OS8002", title: "A higher timeframe read with onUnconfirmed", severity: "warning", stage: "check", since: 1, autofix: false, message: "This file sets onUnconfirmed = true and reads {timeframe}; together they repaint.", fix: "Drop onUnconfirmed = true, or guard every use of the read with bar.isConfirmed.", placeholders: ["timeframe"] },
|
|
144
152
|
OS8003: { code: "OS8003", title: "No version declaration", severity: "warning", stage: "check", since: 1, autofix: true, message: "This file declares no language version; it was compiled as version {version}.", fix: "Add version {version} as the first line of the file.", placeholders: ["version"] },
|
|
@@ -146,7 +154,7 @@ export const ENTRIES = {
|
|
|
146
154
|
OS8005: { code: "OS8005", title: "A lookahead read", severity: "warning", stage: "check", since: 1, autofix: false, message: "This read uses {mode}, so the study shows values the bar it is drawn on could not have known.", fix: "Drop the mode to take the default, which never repaints, unless the study is deliberately a study of what the higher bar went on to do.", placeholders: ["mode"] },
|
|
147
155
|
OS8006: { code: "OS8006", title: "A session average on a session-length bar", severity: "warning", stage: "check", since: 1, autofix: false, message: "A session anchored average resets each session, and each bar of {interval} is a whole session, so it equals its source.", fix: "Use an intraday interval for a session anchored average, or plot the source directly and delete the call.", placeholders: ["interval"] },
|
|
148
156
|
OS8007: { code: "OS8007", title: "A plot sets the price pane's own formatting", severity: "warning", stage: "check", since: 1, autofix: false, message: "{title} sets {option} while drawing over the price pane, which reformats the instrument's own axis.", fix: "Set precision and format in the declaration, for the whole study, or drop them from a plot drawn over the price pane.", placeholders: ["title", "option"] },
|
|
149
|
-
OS8008: { code: "OS8008", title: "An alert with no id", severity: "warning", stage: "check", since: 1, autofix: false, message: "This alert has no id, so its identity is derived from its position at line {line}.", fix: "Give the alert a stable id of your own: alert(\"text\", id = \"emaCross\").", placeholders: ["line"] },
|
|
157
|
+
OS8008: { code: "OS8008", title: "An alert with no fixed id", severity: "warning", stage: "check", since: 1, autofix: false, message: "This alert has no fixed id, so its identity is derived from its position at line {line}.", fix: "Give the alert a stable id of your own: alert(\"text\", id = \"emaCross\").", placeholders: ["line"] },
|
|
150
158
|
OS8009: { code: "OS8009", title: "This plot can never draw", severity: "warning", stage: "check", since: 1, autofix: false, message: "{title} plots a value that is absent on every bar.", fix: "Plot the value that was meant, or delete the plot and its settings row.", placeholders: ["title"] },
|
|
151
159
|
OS8010: { code: "OS8010", title: "A name is never read", severity: "warning", stage: "check", since: 1, autofix: false, message: "{name} is assigned at line {line} and never read.", fix: "Use the value, or delete the line.", placeholders: ["name", "line"] },
|
|
152
160
|
OS8011: { code: "OS8011", title: "live var makes live and backtest differ", severity: "warning", stage: "check", since: 1, autofix: false, message: "{name} is a live var, so it keeps its value across the updates of the moving bar.", fix: "Use var unless counting intrabar updates is the actual intent; keep live var only for that.", placeholders: ["name"] },
|