oakscriptjs 0.8.2 → 0.9.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/LICENSE +1 -1
- package/README.md +31 -9
- package/dist/cjs/array/index.d.ts +701 -0
- package/dist/cjs/array/index.d.ts.map +1 -0
- package/dist/cjs/array/index.js +392 -0
- package/dist/cjs/array/index.js.map +7 -0
- package/dist/cjs/box/index.d.ts +444 -0
- package/dist/cjs/box/index.d.ts.map +1 -0
- package/dist/cjs/box/index.js +246 -0
- package/dist/cjs/box/index.js.map +7 -0
- package/dist/cjs/callsite/index.d.ts +61 -0
- package/dist/cjs/callsite/index.d.ts.map +1 -0
- package/dist/cjs/callsite/index.js +65 -0
- package/dist/cjs/callsite/index.js.map +7 -0
- package/dist/cjs/chartpoint/index.d.ts +90 -0
- package/dist/cjs/chartpoint/index.d.ts.map +1 -0
- package/dist/cjs/chartpoint/index.js +56 -0
- package/dist/cjs/chartpoint/index.js.map +7 -0
- package/dist/cjs/color/index.d.ts +285 -0
- package/dist/cjs/color/index.d.ts.map +1 -0
- package/dist/cjs/color/index.js +143 -0
- package/dist/cjs/color/index.js.map +7 -0
- package/dist/cjs/compare/index.d.ts +26 -0
- package/dist/cjs/compare/index.d.ts.map +1 -0
- package/dist/cjs/compare/index.js +50 -0
- package/dist/cjs/compare/index.js.map +7 -0
- package/dist/cjs/drawing/registry.d.ts +42 -0
- package/dist/cjs/drawing/registry.d.ts.map +1 -0
- package/dist/cjs/drawing/registry.js +87 -0
- package/dist/cjs/drawing/registry.js.map +7 -0
- package/dist/cjs/index.d.ts +85 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +184 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/indicator.d.ts +117 -0
- package/dist/cjs/indicator.d.ts.map +1 -0
- package/dist/cjs/indicator.js +74 -0
- package/dist/cjs/indicator.js.map +7 -0
- package/dist/cjs/input.d.ts +196 -0
- package/dist/cjs/input.d.ts.map +1 -0
- package/dist/cjs/input.js +197 -0
- package/dist/cjs/input.js.map +7 -0
- package/dist/cjs/label/index.d.ts +303 -0
- package/dist/cjs/label/index.d.ts.map +1 -0
- package/dist/cjs/label/index.js +190 -0
- package/dist/cjs/label/index.js.map +7 -0
- package/dist/cjs/lib/index.d.ts +8 -0
- package/dist/cjs/lib/index.d.ts.map +1 -0
- package/dist/cjs/lib/index.js +19 -0
- package/dist/cjs/lib/index.js.map +7 -0
- package/dist/{lib → cjs/lib}/zigzag/index.d.ts +4 -1
- package/dist/cjs/lib/zigzag/index.d.ts.map +1 -0
- package/dist/cjs/lib/zigzag/index.js +27 -0
- package/dist/cjs/lib/zigzag/index.js.map +7 -0
- package/dist/cjs/lib/zigzag/zigzag.d.ts +100 -0
- package/dist/cjs/lib/zigzag/zigzag.d.ts.map +1 -0
- package/dist/cjs/lib/zigzag/zigzag.js +207 -0
- package/dist/cjs/lib/zigzag/zigzag.js.map +7 -0
- package/dist/cjs/line/index.d.ts +342 -0
- package/dist/cjs/line/index.d.ts.map +1 -0
- package/dist/cjs/line/index.js +193 -0
- package/dist/cjs/line/index.js.map +7 -0
- package/dist/cjs/linefill/index.d.ts +124 -0
- package/dist/cjs/linefill/index.d.ts.map +1 -0
- package/dist/cjs/linefill/index.js +56 -0
- package/dist/cjs/linefill/index.js.map +7 -0
- package/dist/cjs/map/index.d.ts +69 -0
- package/dist/cjs/map/index.d.ts.map +1 -0
- package/dist/cjs/map/index.js +80 -0
- package/dist/cjs/map/index.js.map +7 -0
- package/dist/cjs/math/index.d.ts +560 -0
- package/dist/cjs/math/index.d.ts.map +1 -0
- package/dist/cjs/math/index.js +441 -0
- package/dist/cjs/math/index.js.map +7 -0
- package/dist/cjs/matrix/index.d.ts +1231 -0
- package/dist/cjs/matrix/index.d.ts.map +1 -0
- package/dist/cjs/matrix/index.js +1200 -0
- package/dist/cjs/matrix/index.js.map +7 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/plot.d.ts +76 -0
- package/dist/cjs/plot.d.ts.map +1 -0
- package/dist/cjs/plot.js +51 -0
- package/dist/cjs/plot.js.map +7 -0
- package/dist/cjs/polyline/index.d.ts +115 -0
- package/dist/cjs/polyline/index.d.ts.map +1 -0
- package/dist/cjs/polyline/index.js +76 -0
- package/dist/cjs/polyline/index.js.map +7 -0
- package/dist/cjs/runtime/adapters/LightweightChartsAdapter.d.ts +86 -0
- package/dist/cjs/runtime/adapters/LightweightChartsAdapter.d.ts.map +1 -0
- package/dist/cjs/runtime/adapters/LightweightChartsAdapter.js +141 -0
- package/dist/cjs/runtime/adapters/LightweightChartsAdapter.js.map +7 -0
- package/dist/cjs/runtime/adapters/SimpleInputAdapter.d.ts +59 -0
- package/dist/cjs/runtime/adapters/SimpleInputAdapter.d.ts.map +1 -0
- package/dist/cjs/runtime/adapters/SimpleInputAdapter.js +117 -0
- package/dist/cjs/runtime/adapters/SimpleInputAdapter.js.map +7 -0
- package/dist/{runtime → cjs/runtime}/index.d.ts +12 -5
- package/dist/cjs/runtime/index.d.ts.map +1 -0
- package/dist/cjs/runtime/index.js +49 -0
- package/dist/cjs/runtime/index.js.map +7 -0
- package/dist/cjs/runtime/inputs.d.ts +91 -0
- package/dist/cjs/runtime/inputs.d.ts.map +1 -0
- package/dist/cjs/runtime/inputs.js +262 -0
- package/dist/cjs/runtime/inputs.js.map +7 -0
- package/dist/cjs/runtime/runtime.d.ts +70 -0
- package/dist/cjs/runtime/runtime.d.ts.map +1 -0
- package/dist/cjs/runtime/runtime.js +148 -0
- package/dist/cjs/runtime/runtime.js.map +7 -0
- package/dist/cjs/runtime/series.d.ts +362 -0
- package/dist/cjs/runtime/series.d.ts.map +1 -0
- package/dist/cjs/runtime/series.js +560 -0
- package/dist/cjs/runtime/series.js.map +7 -0
- package/dist/cjs/runtime/types.d.ts +282 -0
- package/dist/cjs/runtime/types.d.ts.map +1 -0
- package/dist/cjs/runtime/types.js +17 -0
- package/dist/cjs/runtime/types.js.map +7 -0
- package/dist/cjs/script/index.d.ts +987 -0
- package/dist/cjs/script/index.d.ts.map +1 -0
- package/dist/cjs/script/index.js +1169 -0
- package/dist/cjs/script/index.js.map +7 -0
- package/dist/cjs/security/resample.d.ts +63 -0
- package/dist/cjs/security/resample.d.ts.map +1 -0
- package/dist/cjs/security/resample.js +84 -0
- package/dist/cjs/security/resample.js.map +7 -0
- package/dist/cjs/session/bars.d.ts +80 -0
- package/dist/cjs/session/bars.d.ts.map +1 -0
- package/dist/cjs/session/bars.js +219 -0
- package/dist/cjs/session/bars.js.map +7 -0
- package/dist/cjs/session/calendar.d.ts +70 -0
- package/dist/cjs/session/calendar.d.ts.map +1 -0
- package/dist/cjs/session/calendar.js +164 -0
- package/dist/cjs/session/calendar.js.map +7 -0
- package/dist/cjs/str/dateformat.d.ts +15 -0
- package/dist/cjs/str/dateformat.d.ts.map +1 -0
- package/dist/cjs/str/dateformat.js +149 -0
- package/dist/cjs/str/dateformat.js.map +7 -0
- package/dist/cjs/str/index.d.ts +459 -0
- package/dist/cjs/str/index.d.ts.map +1 -0
- package/dist/cjs/str/index.js +143 -0
- package/dist/cjs/str/index.js.map +7 -0
- package/dist/cjs/str/messageformat.d.ts +14 -0
- package/dist/cjs/str/messageformat.d.ts.map +1 -0
- package/dist/cjs/str/messageformat.js +114 -0
- package/dist/cjs/str/messageformat.js.map +7 -0
- package/dist/cjs/str/numberformat.d.ts +19 -0
- package/dist/cjs/str/numberformat.d.ts.map +1 -0
- package/dist/cjs/str/numberformat.js +170 -0
- package/dist/cjs/str/numberformat.js.map +7 -0
- package/dist/{strategy → cjs/strategy}/index.d.ts +50 -0
- package/dist/cjs/strategy/index.d.ts.map +1 -0
- package/dist/cjs/strategy/index.js +92 -0
- package/dist/cjs/strategy/index.js.map +7 -0
- package/dist/cjs/ta/index.d.ts +1397 -0
- package/dist/cjs/ta/index.d.ts.map +1 -0
- package/dist/cjs/ta/index.js +1715 -0
- package/dist/cjs/ta/index.js.map +7 -0
- package/dist/cjs/ta/running-sum.d.ts +30 -0
- package/dist/cjs/ta/running-sum.d.ts.map +1 -0
- package/dist/cjs/ta/running-sum.js +99 -0
- package/dist/cjs/ta/running-sum.js.map +7 -0
- package/dist/cjs/ta-series.d.ts +558 -0
- package/dist/cjs/ta-series.d.ts.map +1 -0
- package/dist/cjs/ta-series.js +606 -0
- package/dist/cjs/ta-series.js.map +7 -0
- package/dist/cjs/text/index.d.ts +14 -0
- package/dist/cjs/text/index.d.ts.map +1 -0
- package/dist/cjs/text/index.js +29 -0
- package/dist/cjs/text/index.js.map +7 -0
- package/dist/cjs/time/datestring.d.ts +23 -0
- package/dist/cjs/time/datestring.d.ts.map +1 -0
- package/dist/cjs/time/datestring.js +106 -0
- package/dist/cjs/time/datestring.js.map +7 -0
- package/dist/cjs/time/index.d.ts +89 -0
- package/dist/cjs/time/index.d.ts.map +1 -0
- package/dist/cjs/time/index.js +85 -0
- package/dist/cjs/time/index.js.map +7 -0
- package/dist/cjs/time/session.d.ts +17 -0
- package/dist/cjs/time/session.d.ts.map +1 -0
- package/dist/cjs/time/session.js +65 -0
- package/dist/cjs/time/session.js.map +7 -0
- package/dist/cjs/time/timezone.d.ts +40 -0
- package/dist/cjs/time/timezone.d.ts.map +1 -0
- package/dist/cjs/time/timezone.js +125 -0
- package/dist/cjs/time/timezone.js.map +7 -0
- package/dist/cjs/timeframe/index.d.ts +73 -0
- package/dist/cjs/timeframe/index.d.ts.map +1 -0
- package/dist/cjs/timeframe/index.js +85 -0
- package/dist/cjs/timeframe/index.js.map +7 -0
- package/dist/cjs/types/index.d.ts +343 -0
- package/dist/cjs/types/index.d.ts.map +1 -0
- package/dist/cjs/types/index.js +32 -0
- package/dist/cjs/types/index.js.map +7 -0
- package/dist/cjs/types/metadata.d.ts +300 -0
- package/dist/cjs/types/metadata.d.ts.map +1 -0
- package/dist/cjs/types/metadata.js +17 -0
- package/dist/cjs/types/metadata.js.map +7 -0
- package/dist/cjs/utils/index.d.ts +167 -0
- package/dist/cjs/utils/index.d.ts.map +1 -0
- package/dist/cjs/utils/index.js +209 -0
- package/dist/cjs/utils/index.js.map +7 -0
- package/dist/esm/array/index.d.ts +701 -0
- package/dist/esm/array/index.d.ts.map +1 -0
- package/dist/esm/array/index.js +983 -0
- package/dist/esm/array/index.js.map +1 -0
- package/dist/esm/box/index.d.ts +444 -0
- package/dist/esm/box/index.d.ts.map +1 -0
- package/dist/esm/box/index.js +602 -0
- package/dist/esm/box/index.js.map +1 -0
- package/dist/esm/callsite/index.d.ts +61 -0
- package/dist/esm/callsite/index.d.ts.map +1 -0
- package/dist/esm/callsite/index.js +97 -0
- package/dist/esm/callsite/index.js.map +1 -0
- package/dist/esm/chartpoint/index.d.ts +90 -0
- package/dist/esm/chartpoint/index.d.ts.map +1 -0
- package/dist/esm/chartpoint/index.js +113 -0
- package/dist/esm/chartpoint/index.js.map +1 -0
- package/dist/esm/color/index.d.ts +285 -0
- package/dist/esm/color/index.d.ts.map +1 -0
- package/dist/esm/color/index.js +373 -0
- package/dist/esm/color/index.js.map +1 -0
- package/dist/esm/compare/index.d.ts +26 -0
- package/dist/esm/compare/index.d.ts.map +1 -0
- package/dist/esm/compare/index.js +39 -0
- package/dist/esm/compare/index.js.map +1 -0
- package/dist/esm/drawing/registry.d.ts +42 -0
- package/dist/esm/drawing/registry.d.ts.map +1 -0
- package/dist/esm/drawing/registry.js +89 -0
- package/dist/esm/drawing/registry.js.map +1 -0
- package/dist/esm/index.d.ts +85 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +96 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/indicator.d.ts +117 -0
- package/dist/esm/indicator.d.ts.map +1 -0
- package/dist/esm/indicator.js +84 -0
- package/dist/esm/indicator.js.map +1 -0
- package/dist/esm/input.d.ts +196 -0
- package/dist/esm/input.d.ts.map +1 -0
- package/dist/esm/input.js +183 -0
- package/dist/esm/input.js.map +1 -0
- package/dist/esm/label/index.d.ts +303 -0
- package/dist/esm/label/index.d.ts.map +1 -0
- package/dist/esm/label/index.js +417 -0
- package/dist/esm/label/index.js.map +1 -0
- package/dist/esm/lib/index.d.ts +8 -0
- package/dist/esm/lib/index.d.ts.map +1 -0
- package/dist/esm/lib/index.js +8 -0
- package/dist/esm/lib/index.js.map +1 -0
- package/dist/esm/lib/zigzag/index.d.ts +5 -0
- package/dist/esm/lib/zigzag/index.d.ts.map +1 -0
- package/dist/esm/lib/zigzag/index.js +5 -0
- package/dist/esm/lib/zigzag/index.js.map +1 -0
- package/dist/esm/lib/zigzag/zigzag.d.ts +100 -0
- package/dist/esm/lib/zigzag/zigzag.d.ts.map +1 -0
- package/dist/esm/lib/zigzag/zigzag.js +229 -0
- package/dist/esm/lib/zigzag/zigzag.js.map +1 -0
- package/dist/esm/line/index.d.ts +342 -0
- package/dist/esm/line/index.d.ts.map +1 -0
- package/dist/esm/line/index.js +470 -0
- package/dist/esm/line/index.js.map +1 -0
- package/dist/esm/linefill/index.d.ts +124 -0
- package/dist/esm/linefill/index.d.ts.map +1 -0
- package/dist/esm/linefill/index.js +144 -0
- package/dist/esm/linefill/index.js.map +1 -0
- package/dist/esm/map/index.d.ts +69 -0
- package/dist/esm/map/index.d.ts.map +1 -0
- package/dist/esm/map/index.js +106 -0
- package/dist/esm/map/index.js.map +1 -0
- package/dist/esm/math/index.d.ts +560 -0
- package/dist/esm/math/index.d.ts.map +1 -0
- package/dist/esm/math/index.js +495 -0
- package/dist/esm/math/index.js.map +1 -0
- package/dist/esm/matrix/index.d.ts +1231 -0
- package/dist/esm/matrix/index.d.ts.map +1 -0
- package/dist/esm/matrix/index.js +2450 -0
- package/dist/esm/matrix/index.js.map +1 -0
- package/dist/esm/plot.d.ts +76 -0
- package/dist/esm/plot.d.ts.map +1 -0
- package/dist/esm/plot.js +63 -0
- package/dist/esm/plot.js.map +1 -0
- package/dist/esm/polyline/index.d.ts +115 -0
- package/dist/esm/polyline/index.d.ts.map +1 -0
- package/dist/esm/polyline/index.js +157 -0
- package/dist/esm/polyline/index.js.map +1 -0
- package/dist/esm/runtime/adapters/LightweightChartsAdapter.d.ts +86 -0
- package/dist/esm/runtime/adapters/LightweightChartsAdapter.d.ts.map +1 -0
- package/dist/esm/runtime/adapters/LightweightChartsAdapter.js +140 -0
- package/dist/esm/runtime/adapters/LightweightChartsAdapter.js.map +1 -0
- package/dist/esm/runtime/adapters/SimpleInputAdapter.d.ts +59 -0
- package/dist/esm/runtime/adapters/SimpleInputAdapter.d.ts.map +1 -0
- package/dist/esm/runtime/adapters/SimpleInputAdapter.js +115 -0
- package/dist/esm/runtime/adapters/SimpleInputAdapter.js.map +1 -0
- package/dist/esm/runtime/index.d.ts +13 -0
- package/dist/esm/runtime/index.d.ts.map +1 -0
- package/dist/esm/runtime/index.js +14 -0
- package/dist/esm/runtime/index.js.map +1 -0
- package/dist/esm/runtime/inputs.d.ts +91 -0
- package/dist/esm/runtime/inputs.d.ts.map +1 -0
- package/dist/esm/runtime/inputs.js +334 -0
- package/dist/esm/runtime/inputs.js.map +1 -0
- package/dist/esm/runtime/runtime.d.ts +70 -0
- package/dist/esm/runtime/runtime.d.ts.map +1 -0
- package/dist/esm/runtime/runtime.js +193 -0
- package/dist/esm/runtime/runtime.js.map +1 -0
- package/dist/esm/runtime/series.d.ts +362 -0
- package/dist/esm/runtime/series.d.ts.map +1 -0
- package/dist/esm/runtime/series.js +583 -0
- package/dist/esm/runtime/series.js.map +1 -0
- package/dist/esm/runtime/types.d.ts +282 -0
- package/dist/esm/runtime/types.d.ts.map +1 -0
- package/dist/esm/runtime/types.js +7 -0
- package/dist/esm/runtime/types.js.map +1 -0
- package/dist/esm/script/index.d.ts +987 -0
- package/dist/esm/script/index.d.ts.map +1 -0
- package/dist/esm/script/index.js +1289 -0
- package/dist/esm/script/index.js.map +1 -0
- package/dist/esm/security/resample.d.ts +63 -0
- package/dist/esm/security/resample.d.ts.map +1 -0
- package/dist/esm/security/resample.js +110 -0
- package/dist/esm/security/resample.js.map +1 -0
- package/dist/esm/session/bars.d.ts +80 -0
- package/dist/esm/session/bars.d.ts.map +1 -0
- package/dist/esm/session/bars.js +232 -0
- package/dist/esm/session/bars.js.map +1 -0
- package/dist/esm/session/calendar.d.ts +70 -0
- package/dist/esm/session/calendar.d.ts.map +1 -0
- package/dist/esm/session/calendar.js +172 -0
- package/dist/esm/session/calendar.js.map +1 -0
- package/dist/esm/str/dateformat.d.ts +15 -0
- package/dist/esm/str/dateformat.d.ts.map +1 -0
- package/dist/esm/str/dateformat.js +136 -0
- package/dist/esm/str/dateformat.js.map +1 -0
- package/dist/esm/str/index.d.ts +459 -0
- package/dist/esm/str/index.d.ts.map +1 -0
- package/dist/esm/str/index.js +540 -0
- package/dist/esm/str/index.js.map +1 -0
- package/dist/esm/str/messageformat.d.ts +14 -0
- package/dist/esm/str/messageformat.d.ts.map +1 -0
- package/dist/esm/str/messageformat.js +111 -0
- package/dist/esm/str/messageformat.js.map +1 -0
- package/dist/esm/str/numberformat.d.ts +19 -0
- package/dist/esm/str/numberformat.d.ts.map +1 -0
- package/dist/esm/str/numberformat.js +189 -0
- package/dist/esm/str/numberformat.js.map +1 -0
- package/dist/esm/strategy/index.d.ts +245 -0
- package/dist/esm/strategy/index.d.ts.map +1 -0
- package/dist/esm/strategy/index.js +84 -0
- package/dist/esm/strategy/index.js.map +1 -0
- package/dist/esm/ta/index.d.ts +1397 -0
- package/dist/esm/ta/index.d.ts.map +1 -0
- package/dist/esm/ta/index.js +3227 -0
- package/dist/esm/ta/index.js.map +1 -0
- package/dist/esm/ta/running-sum.d.ts +30 -0
- package/dist/esm/ta/running-sum.d.ts.map +1 -0
- package/dist/esm/ta/running-sum.js +113 -0
- package/dist/esm/ta/running-sum.js.map +1 -0
- package/dist/esm/ta-series.d.ts +558 -0
- package/dist/esm/ta-series.d.ts.map +1 -0
- package/dist/esm/ta-series.js +910 -0
- package/dist/esm/ta-series.js.map +1 -0
- package/dist/esm/text/index.d.ts +14 -0
- package/dist/esm/text/index.d.ts.map +1 -0
- package/dist/esm/text/index.js +14 -0
- package/dist/esm/text/index.js.map +1 -0
- package/dist/esm/time/datestring.d.ts +23 -0
- package/dist/esm/time/datestring.d.ts.map +1 -0
- package/dist/esm/time/datestring.js +94 -0
- package/dist/esm/time/datestring.js.map +1 -0
- package/dist/esm/time/index.d.ts +89 -0
- package/dist/esm/time/index.d.ts.map +1 -0
- package/dist/esm/time/index.js +108 -0
- package/dist/esm/time/index.js.map +1 -0
- package/dist/esm/time/session.d.ts +17 -0
- package/dist/esm/time/session.d.ts.map +1 -0
- package/dist/esm/time/session.js +69 -0
- package/dist/esm/time/session.js.map +1 -0
- package/dist/esm/time/timezone.d.ts +40 -0
- package/dist/esm/time/timezone.d.ts.map +1 -0
- package/dist/esm/time/timezone.js +144 -0
- package/dist/esm/time/timezone.js.map +1 -0
- package/dist/esm/timeframe/index.d.ts +73 -0
- package/dist/esm/timeframe/index.d.ts.map +1 -0
- package/dist/esm/timeframe/index.js +131 -0
- package/dist/esm/timeframe/index.js.map +1 -0
- package/dist/esm/types/index.d.ts +343 -0
- package/dist/esm/types/index.d.ts.map +1 -0
- package/dist/esm/types/index.js +17 -0
- package/dist/esm/types/index.js.map +1 -0
- package/dist/esm/types/metadata.d.ts +300 -0
- package/dist/esm/types/metadata.d.ts.map +1 -0
- package/dist/esm/types/metadata.js +7 -0
- package/dist/esm/types/metadata.js.map +1 -0
- package/dist/esm/utils/index.d.ts +167 -0
- package/dist/esm/utils/index.d.ts.map +1 -0
- package/dist/esm/utils/index.js +295 -0
- package/dist/esm/utils/index.js.map +1 -0
- package/package.json +53 -23
- package/src/array/index.ts +1056 -0
- package/src/box/index.ts +680 -0
- package/src/callsite/index.ts +104 -0
- package/src/chartpoint/index.ts +126 -0
- package/src/color/index.ts +411 -0
- package/src/compare/index.ts +46 -0
- package/src/drawing/registry.ts +106 -0
- package/src/index.ts +201 -0
- package/src/indicator.ts +185 -0
- package/src/input.ts +280 -0
- package/src/label/index.ts +490 -0
- package/src/lib/index.ts +8 -0
- package/src/lib/zigzag/index.ts +13 -0
- package/src/lib/zigzag/zigzag.ts +318 -0
- package/src/line/index.ts +530 -0
- package/src/linefill/index.ts +152 -0
- package/src/map/index.ts +115 -0
- package/src/math/index.ts +1071 -0
- package/src/matrix/index.ts +2697 -0
- package/src/plot.ts +121 -0
- package/src/polyline/index.ts +184 -0
- package/src/runtime/adapters/LightweightChartsAdapter.ts +201 -0
- package/src/runtime/adapters/SimpleInputAdapter.ts +132 -0
- package/src/runtime/index.ts +52 -0
- package/src/runtime/inputs.ts +377 -0
- package/src/runtime/runtime.ts +241 -0
- package/src/runtime/series.ts +644 -0
- package/src/runtime/types.ts +292 -0
- package/src/script/index.ts +1865 -0
- package/src/security/resample.ts +119 -0
- package/src/session/bars.ts +262 -0
- package/src/session/calendar.ts +199 -0
- package/src/str/dateformat.ts +104 -0
- package/src/str/index.ts +557 -0
- package/src/str/messageformat.ts +109 -0
- package/src/str/numberformat.ts +197 -0
- package/src/strategy/index.ts +281 -0
- package/src/ta/index.ts +3580 -0
- package/src/ta/running-sum.ts +117 -0
- package/src/ta-series.ts +1036 -0
- package/src/text/index.ts +14 -0
- package/src/time/datestring.ts +96 -0
- package/src/time/index.ts +161 -0
- package/src/time/session.ts +79 -0
- package/src/time/timezone.ts +180 -0
- package/src/timeframe/index.ts +144 -0
- package/src/types/index.ts +398 -0
- package/src/types/metadata.ts +334 -0
- package/src/utils/index.ts +334 -0
- package/dist/array/index.d.ts +0 -57
- package/dist/array/index.d.ts.map +0 -1
- package/dist/box/index.d.ts +0 -37
- package/dist/box/index.d.ts.map +0 -1
- package/dist/callsite/index.d.ts +0 -7
- package/dist/callsite/index.d.ts.map +0 -1
- package/dist/chartpoint/index.d.ts +0 -8
- package/dist/chartpoint/index.d.ts.map +0 -1
- package/dist/color/index.d.ts +0 -28
- package/dist/color/index.d.ts.map +0 -1
- package/dist/compare/index.d.ts +0 -8
- package/dist/compare/index.d.ts.map +0 -1
- package/dist/drawing/registry.d.ts +0 -19
- package/dist/drawing/registry.d.ts.map +0 -1
- package/dist/index.cjs +0 -7981
- package/dist/index.d.ts +0 -64
- package/dist/index.d.ts.map +0 -1
- package/dist/index.mjs +0 -7964
- package/dist/indicator.d.ts +0 -42
- package/dist/indicator.d.ts.map +0 -1
- package/dist/input.d.ts +0 -47
- package/dist/input.d.ts.map +0 -1
- package/dist/label/index.d.ts +0 -30
- package/dist/label/index.d.ts.map +0 -1
- package/dist/lib/index.d.ts +0 -2
- package/dist/lib/index.d.ts.map +0 -1
- package/dist/lib/zigzag/index.d.ts.map +0 -1
- package/dist/lib/zigzag/zigzag.d.ts +0 -47
- package/dist/lib/zigzag/zigzag.d.ts.map +0 -1
- package/dist/line/index.d.ts +0 -30
- package/dist/line/index.d.ts.map +0 -1
- package/dist/linefill/index.d.ts +0 -10
- package/dist/linefill/index.d.ts.map +0 -1
- package/dist/map/index.d.ts +0 -14
- package/dist/map/index.d.ts.map +0 -1
- package/dist/math/index.d.ts +0 -53
- package/dist/math/index.d.ts.map +0 -1
- package/dist/matrix/index.d.ts +0 -52
- package/dist/matrix/index.d.ts.map +0 -1
- package/dist/plot.d.ts +0 -20
- package/dist/plot.d.ts.map +0 -1
- package/dist/polyline/index.d.ts +0 -11
- package/dist/polyline/index.d.ts.map +0 -1
- package/dist/runtime/adapters/LightweightChartsAdapter.d.ts +0 -15
- package/dist/runtime/adapters/LightweightChartsAdapter.d.ts.map +0 -1
- package/dist/runtime/adapters/SimpleInputAdapter.d.ts +0 -16
- package/dist/runtime/adapters/SimpleInputAdapter.d.ts.map +0 -1
- package/dist/runtime/index.cjs +0 -600
- package/dist/runtime/index.d.ts.map +0 -1
- package/dist/runtime/index.mjs +0 -577
- package/dist/runtime/inputs.d.ts +0 -13
- package/dist/runtime/inputs.d.ts.map +0 -1
- package/dist/runtime/runtime.d.ts +0 -16
- package/dist/runtime/runtime.d.ts.map +0 -1
- package/dist/runtime/series.d.ts +0 -60
- package/dist/runtime/series.d.ts.map +0 -1
- package/dist/runtime/types.d.ts +0 -126
- package/dist/runtime/types.d.ts.map +0 -1
- package/dist/script/index.cjs +0 -6377
- package/dist/script/index.d.ts +0 -713
- package/dist/script/index.d.ts.map +0 -1
- package/dist/script/index.mjs +0 -6360
- package/dist/security/resample.d.ts +0 -13
- package/dist/security/resample.d.ts.map +0 -1
- package/dist/session/bars.d.ts +0 -34
- package/dist/session/bars.d.ts.map +0 -1
- package/dist/session/calendar.d.ts +0 -31
- package/dist/session/calendar.d.ts.map +0 -1
- package/dist/str/dateformat.d.ts +0 -2
- package/dist/str/dateformat.d.ts.map +0 -1
- package/dist/str/index.d.ts +0 -24
- package/dist/str/index.d.ts.map +0 -1
- package/dist/str/messageformat.d.ts +0 -2
- package/dist/str/messageformat.d.ts.map +0 -1
- package/dist/str/numberformat.d.ts +0 -3
- package/dist/str/numberformat.d.ts.map +0 -1
- package/dist/strategy/index.d.ts.map +0 -1
- package/dist/ta/index.d.ts +0 -72
- package/dist/ta/index.d.ts.map +0 -1
- package/dist/ta/running-sum.d.ts +0 -3
- package/dist/ta/running-sum.d.ts.map +0 -1
- package/dist/ta-series.d.ts +0 -143
- package/dist/ta-series.d.ts.map +0 -1
- package/dist/text/index.d.ts +0 -4
- package/dist/text/index.d.ts.map +0 -1
- package/dist/time/datestring.d.ts +0 -2
- package/dist/time/datestring.d.ts.map +0 -1
- package/dist/time/index.d.ts +0 -15
- package/dist/time/index.d.ts.map +0 -1
- package/dist/time/session.d.ts +0 -2
- package/dist/time/session.d.ts.map +0 -1
- package/dist/time/timezone.d.ts +0 -13
- package/dist/time/timezone.d.ts.map +0 -1
- package/dist/timeframe/index.d.ts +0 -17
- package/dist/timeframe/index.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -181
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/metadata.d.ts +0 -132
- package/dist/types/metadata.d.ts.map +0 -1
- package/dist/utils/index.d.ts +0 -26
- package/dist/utils/index.d.ts.map +0 -1
package/dist/script/index.d.ts
DELETED
|
@@ -1,713 +0,0 @@
|
|
|
1
|
-
import type { Bar } from '../types';
|
|
2
|
-
import type { ArrowData, BarColorData, IndicatorResult, MarkerData, MarkerLocation, MarkerSize, ShapeStyle, TimeValue } from '../types/metadata';
|
|
3
|
-
import type { ArrowConfig, BarColorConfig, FillConfig, HLineConfig, InputConfig, PlotConfig, ShapeConfig } from '../runtime/types';
|
|
4
|
-
import { BarData, Series } from '../runtime/series';
|
|
5
|
-
import * as taSeries from '../ta-series';
|
|
6
|
-
import * as colorCore from '../color';
|
|
7
|
-
import { isNA, nz } from '../utils';
|
|
8
|
-
import * as lineCore from '../line';
|
|
9
|
-
import * as labelCore from '../label';
|
|
10
|
-
import * as boxCore from '../box';
|
|
11
|
-
import * as linefillCore from '../linefill';
|
|
12
|
-
import * as polylineCore from '../polyline';
|
|
13
|
-
import * as chartPointCore from '../chartpoint';
|
|
14
|
-
import * as mathCore from '../math';
|
|
15
|
-
import * as timeframeCore from '../timeframe';
|
|
16
|
-
import { type SessionSpec } from '../session/calendar';
|
|
17
|
-
import type { ChartPoint } from '../types';
|
|
18
|
-
import { STRATEGY_CONSTANTS, type StrategyCloseAllOptions, type StrategyCloseOptions, type StrategyDirection, type StrategyEngine, type StrategyEntryOptions, type StrategyExitOptions, type StrategyNumberVariable, type StrategyOptions, type StrategyProperties, type StrategyRiskDirection, type StrategyRiskValueType, type StrategyTextVariable, type StrategyTrade } from '../strategy';
|
|
19
|
-
export interface ScriptRunResult {
|
|
20
|
-
metadata: {
|
|
21
|
-
title: string;
|
|
22
|
-
shortTitle?: string;
|
|
23
|
-
overlay: boolean;
|
|
24
|
-
precision?: number;
|
|
25
|
-
format?: string;
|
|
26
|
-
};
|
|
27
|
-
inputConfig: InputConfig[];
|
|
28
|
-
plotConfig: PlotConfig[];
|
|
29
|
-
hlineConfig: HLineConfig[];
|
|
30
|
-
fillConfig: FillConfig[];
|
|
31
|
-
shapeConfig: ShapeConfig[];
|
|
32
|
-
arrowConfig: ArrowConfig[];
|
|
33
|
-
barColorConfig: BarColorConfig[];
|
|
34
|
-
defaultInputs: Record<string, unknown>;
|
|
35
|
-
alertConfig: AlertConditionConfig[];
|
|
36
|
-
strategyConfig?: StrategyProperties;
|
|
37
|
-
result: IndicatorResult & {
|
|
38
|
-
alerts?: AlertState[];
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
export interface AlertConditionConfig {
|
|
42
|
-
id: string;
|
|
43
|
-
title: string;
|
|
44
|
-
message?: string;
|
|
45
|
-
}
|
|
46
|
-
export interface AlertState {
|
|
47
|
-
id: string;
|
|
48
|
-
title: string;
|
|
49
|
-
message?: string;
|
|
50
|
-
triggered: boolean;
|
|
51
|
-
}
|
|
52
|
-
export interface PlotHandle {
|
|
53
|
-
id: string;
|
|
54
|
-
kind: 'plot' | 'hline';
|
|
55
|
-
}
|
|
56
|
-
export interface StrategySetup {
|
|
57
|
-
properties: StrategyProperties;
|
|
58
|
-
bars: readonly Bar[];
|
|
59
|
-
chart: Readonly<ChartContext>;
|
|
60
|
-
}
|
|
61
|
-
export interface ScriptOptions {
|
|
62
|
-
strategyEngine?: (setup: StrategySetup) => StrategyEngine;
|
|
63
|
-
}
|
|
64
|
-
export declare function executeScript(body: () => void, barsInput: Bar[], inputs?: Record<string, unknown>, chart?: ChartContext, options?: ScriptOptions): ScriptRunResult;
|
|
65
|
-
export interface IndicatorOptions {
|
|
66
|
-
shorttitle?: string;
|
|
67
|
-
overlay?: boolean;
|
|
68
|
-
precision?: number;
|
|
69
|
-
format?: string;
|
|
70
|
-
max_lines_count?: number;
|
|
71
|
-
max_labels_count?: number;
|
|
72
|
-
max_boxes_count?: number;
|
|
73
|
-
max_polylines_count?: number;
|
|
74
|
-
}
|
|
75
|
-
export declare function indicator(title: string, options?: IndicatorOptions): void;
|
|
76
|
-
export interface InputOptions {
|
|
77
|
-
group?: string;
|
|
78
|
-
inline?: string;
|
|
79
|
-
tooltip?: string;
|
|
80
|
-
confirm?: boolean;
|
|
81
|
-
display?: InputConfig['display'];
|
|
82
|
-
}
|
|
83
|
-
export interface NumericInputOptions extends InputOptions {
|
|
84
|
-
minval?: number;
|
|
85
|
-
maxval?: number;
|
|
86
|
-
step?: number;
|
|
87
|
-
}
|
|
88
|
-
export interface StringInputOptions extends InputOptions {
|
|
89
|
-
options?: string[];
|
|
90
|
-
}
|
|
91
|
-
export declare const input: {
|
|
92
|
-
int(defval: number, title?: string, opts?: NumericInputOptions): number;
|
|
93
|
-
float(defval: number, title?: string, opts?: NumericInputOptions): number;
|
|
94
|
-
bool(defval: boolean, title?: string, opts?: InputOptions): boolean;
|
|
95
|
-
string(defval: string, title?: string, opts?: StringInputOptions): string;
|
|
96
|
-
color(defval: string, title?: string, opts?: InputOptions): string;
|
|
97
|
-
source(defval?: string, title?: string, opts?: InputOptions): Series;
|
|
98
|
-
timeframe(defval: string, title?: string, opts?: StringInputOptions): string;
|
|
99
|
-
session(defval: string, title?: string, opts?: StringInputOptions): string;
|
|
100
|
-
time(defval: number, title?: string, opts?: InputOptions): number;
|
|
101
|
-
};
|
|
102
|
-
export declare const open: Series;
|
|
103
|
-
export declare const high: Series;
|
|
104
|
-
export declare const low: Series;
|
|
105
|
-
export declare const close: Series;
|
|
106
|
-
export declare const volume: Series;
|
|
107
|
-
export declare const hl2: Series;
|
|
108
|
-
export declare const hlc3: Series;
|
|
109
|
-
export declare const ohlc4: Series;
|
|
110
|
-
export declare const hlcc4: Series;
|
|
111
|
-
export declare const ta: {
|
|
112
|
-
tr: (handleNa?: boolean) => Series;
|
|
113
|
-
atr: (length: number) => Series;
|
|
114
|
-
sar: (start?: number, inc?: number, max?: number) => Series;
|
|
115
|
-
wpr: (length?: number) => Series;
|
|
116
|
-
supertrend: (factor: number, atrLength: number) => [Series, Series];
|
|
117
|
-
dmi: (diLength: number, adxSmoothing: number) => [Series, Series, Series];
|
|
118
|
-
kc: (source: Series, length: number, mult: number, useTrueRange?: boolean) => [Series, Series, Series];
|
|
119
|
-
kcw: (source: Series, length?: number, mult?: number, useTrueRange?: boolean) => Series;
|
|
120
|
-
ichimoku: (conversionPeriods: number, basePeriods: number, laggingSpan2Periods: number, displacement: number) => [Series, Series, Series, Series, Series];
|
|
121
|
-
highest: (sourceOrLength: Series | number, length?: number) => Series;
|
|
122
|
-
lowest: (sourceOrLength: Series | number, length?: number) => Series;
|
|
123
|
-
highestbars: (sourceOrLength: Series | number, length?: number) => Series;
|
|
124
|
-
lowestbars: (sourceOrLength: Series | number, length?: number) => Series;
|
|
125
|
-
vwap: {
|
|
126
|
-
(source: Series, anchor?: Series): Series;
|
|
127
|
-
(source: Series, anchor: Series | undefined, stdev_mult: number): [Series, Series, Series];
|
|
128
|
-
};
|
|
129
|
-
mfi: (source: Series, length: number) => Series;
|
|
130
|
-
pivothigh: (sourceOrLeft: Series | number, leftOrRight: number, rightbars?: number) => Series;
|
|
131
|
-
pivotlow: (sourceOrLeft: Series | number, leftOrRight: number, rightbars?: number) => Series;
|
|
132
|
-
obv: Series;
|
|
133
|
-
pvt: Series;
|
|
134
|
-
accdist: Series;
|
|
135
|
-
nvi: Series;
|
|
136
|
-
pvi: Series;
|
|
137
|
-
iii: Series;
|
|
138
|
-
wad: Series;
|
|
139
|
-
wvad: Series;
|
|
140
|
-
sma(source: Series, length: number): Series;
|
|
141
|
-
ema(source: Series, length: number): Series;
|
|
142
|
-
wma(source: Series, length: number): Series;
|
|
143
|
-
rma(source: Series, length: number): Series;
|
|
144
|
-
rsi(source: Series, length: number): Series;
|
|
145
|
-
macd(source: Series, fastLength: number, slowLength: number, signalLength: number): [Series, Series, Series];
|
|
146
|
-
bb(source: Series, length: number, mult: number): [Series, Series, Series];
|
|
147
|
-
stdev(source: Series, length: number, biased?: boolean): Series;
|
|
148
|
-
stoch(source: Series, high: Series, low: Series, length: number): Series;
|
|
149
|
-
crossover(source1: Series, source2: Series | number): Series;
|
|
150
|
-
crossunder(source1: Series, source2: Series | number): Series;
|
|
151
|
-
cross(source1: Series, source2: Series | number): Series;
|
|
152
|
-
change(source: Series, length?: number): Series;
|
|
153
|
-
mom(source: Series, length: number): Series;
|
|
154
|
-
roc(source: Series, length: number): Series;
|
|
155
|
-
rising(source: Series, length: number): Series;
|
|
156
|
-
falling(source: Series, length: number): Series;
|
|
157
|
-
cum(source: Series): Series;
|
|
158
|
-
vwapBands(source: Series, volume: Series, anchor: Series | undefined, stdev_mult: number): [Series, Series, Series];
|
|
159
|
-
vwma(source: Series, length: number, volume: Series): Series;
|
|
160
|
-
linreg(source: Series, length: number, offset?: number): Series;
|
|
161
|
-
alma(source: Series, length?: number, offset?: number, sigma?: number, floor?: boolean): Series;
|
|
162
|
-
zigzag(bars: Bar[], deviation?: number, depth?: number, backstep?: number): [Series, Series, Series];
|
|
163
|
-
cci(source: Series, length: number): Series;
|
|
164
|
-
dev(source: Series, length: number): Series;
|
|
165
|
-
variance(source: Series, length: number, biased?: boolean): Series;
|
|
166
|
-
median(source: Series, length: number): Series;
|
|
167
|
-
swma(source: Series): Series;
|
|
168
|
-
correlation(source1: Series, source2: Series, length: number): Series;
|
|
169
|
-
percentrank(source: Series, length: number): Series;
|
|
170
|
-
hma(source: Series, length: number): Series;
|
|
171
|
-
barssince(condition: Series): Series;
|
|
172
|
-
valuewhen(condition: Series, source: Series, occurrence: number): Series;
|
|
173
|
-
tsi(source: Series, shortLength: number, longLength: number): Series;
|
|
174
|
-
cmo(source: Series, length: number): Series;
|
|
175
|
-
bbw(source: Series, length: number, mult: number): Series;
|
|
176
|
-
range(source: Series, length: number): Series;
|
|
177
|
-
max(source: Series): Series;
|
|
178
|
-
min(source: Series): Series;
|
|
179
|
-
cog(source: Series, length?: number): Series;
|
|
180
|
-
mode(source: Series, length: number): Series;
|
|
181
|
-
percentile_linear_interpolation(source: Series, length: number, percentage: number): Series;
|
|
182
|
-
percentile_nearest_rank(source: Series, length: number, percentage: number): Series;
|
|
183
|
-
rci(source: Series, length: number): Series;
|
|
184
|
-
ta: {
|
|
185
|
-
sma: typeof taSeries.sma;
|
|
186
|
-
ema: typeof taSeries.ema;
|
|
187
|
-
wma: typeof taSeries.wma;
|
|
188
|
-
vwma: typeof taSeries.vwma;
|
|
189
|
-
rma: typeof taSeries.rma;
|
|
190
|
-
rsi: typeof taSeries.rsi;
|
|
191
|
-
macd: typeof taSeries.macd;
|
|
192
|
-
bb: typeof taSeries.bb;
|
|
193
|
-
stdev: typeof taSeries.stdev;
|
|
194
|
-
atr: typeof taSeries.atr;
|
|
195
|
-
tr: typeof taSeries.tr;
|
|
196
|
-
stoch: typeof taSeries.stoch;
|
|
197
|
-
crossover: typeof taSeries.crossover;
|
|
198
|
-
crossunder: typeof taSeries.crossunder;
|
|
199
|
-
cross: typeof taSeries.cross;
|
|
200
|
-
change: typeof taSeries.change;
|
|
201
|
-
mom: typeof taSeries.mom;
|
|
202
|
-
roc: typeof taSeries.roc;
|
|
203
|
-
highest: typeof taSeries.highest;
|
|
204
|
-
lowest: typeof taSeries.lowest;
|
|
205
|
-
rising: typeof taSeries.rising;
|
|
206
|
-
falling: typeof taSeries.falling;
|
|
207
|
-
cum: typeof taSeries.cum;
|
|
208
|
-
supertrend: typeof taSeries.supertrend;
|
|
209
|
-
vwap: typeof taSeries.vwap;
|
|
210
|
-
ichimoku: typeof taSeries.ichimoku;
|
|
211
|
-
linreg: typeof taSeries.linreg;
|
|
212
|
-
alma: typeof taSeries.alma;
|
|
213
|
-
zigzag: typeof taSeries.zigzag;
|
|
214
|
-
cci: typeof taSeries.cci;
|
|
215
|
-
sar: typeof taSeries.sar;
|
|
216
|
-
dev: typeof taSeries.dev;
|
|
217
|
-
variance: typeof taSeries.variance;
|
|
218
|
-
median: typeof taSeries.median;
|
|
219
|
-
swma: typeof taSeries.swma;
|
|
220
|
-
correlation: typeof taSeries.correlation;
|
|
221
|
-
percentrank: typeof taSeries.percentrank;
|
|
222
|
-
mfi: typeof taSeries.mfi;
|
|
223
|
-
hma: typeof taSeries.hma;
|
|
224
|
-
pivothigh: typeof taSeries.pivothigh;
|
|
225
|
-
pivotlow: typeof taSeries.pivotlow;
|
|
226
|
-
barssince: typeof taSeries.barssince;
|
|
227
|
-
valuewhen: typeof taSeries.valuewhen;
|
|
228
|
-
dmi: typeof taSeries.dmi;
|
|
229
|
-
tsi: typeof taSeries.tsi;
|
|
230
|
-
cmo: typeof taSeries.cmo;
|
|
231
|
-
kc: typeof taSeries.kc;
|
|
232
|
-
bbw: typeof taSeries.bbw;
|
|
233
|
-
wpr: typeof taSeries.wpr;
|
|
234
|
-
kcw: typeof taSeries.kcw;
|
|
235
|
-
range: typeof taSeries.range;
|
|
236
|
-
highestbars: typeof taSeries.highestbars;
|
|
237
|
-
lowestbars: typeof taSeries.lowestbars;
|
|
238
|
-
max: typeof taSeries.max;
|
|
239
|
-
min: typeof taSeries.min;
|
|
240
|
-
vwapBands: typeof taSeries.vwapBands;
|
|
241
|
-
obv: typeof taSeries.obv;
|
|
242
|
-
pvt: typeof taSeries.pvt;
|
|
243
|
-
accdist: typeof taSeries.accdist;
|
|
244
|
-
nvi: typeof taSeries.nvi;
|
|
245
|
-
pvi: typeof taSeries.pvi;
|
|
246
|
-
iii: typeof taSeries.iii;
|
|
247
|
-
wad: typeof taSeries.wad;
|
|
248
|
-
wvad: typeof taSeries.wvad;
|
|
249
|
-
cog: typeof taSeries.cog;
|
|
250
|
-
mode: typeof taSeries.mode;
|
|
251
|
-
percentile_linear_interpolation: typeof taSeries.percentile_linear_interpolation;
|
|
252
|
-
percentile_nearest_rank: typeof taSeries.percentile_nearest_rank;
|
|
253
|
-
rci: typeof taSeries.rci;
|
|
254
|
-
};
|
|
255
|
-
};
|
|
256
|
-
export declare function fixnan(source: Series): Series;
|
|
257
|
-
export declare function fixnan(source: Array<string | undefined>): Array<string | undefined>;
|
|
258
|
-
declare function colorWhen(cond: Series, colorTrue: string, colorFalse: string): string[];
|
|
259
|
-
declare function colorWhen(cond: Series, colorTrue: string, colorFalse?: string): Array<string | undefined>;
|
|
260
|
-
export declare const color: {
|
|
261
|
-
new: typeof colorCore.new_color;
|
|
262
|
-
when: typeof colorWhen;
|
|
263
|
-
rgb(red: import("..").simple_int, green: import("..").simple_int, blue: import("..").simple_int, transp?: import("..").simple_float): string;
|
|
264
|
-
from_hex(hex: string, transp?: import("..").simple_float): string;
|
|
265
|
-
new_color(baseColor: import("../types").color, transp: import("..").simple_float): string;
|
|
266
|
-
r(clr: import("../types").color): import("..").int;
|
|
267
|
-
g(clr: import("../types").color): import("..").int;
|
|
268
|
-
b(clr: import("../types").color): import("..").int;
|
|
269
|
-
t(clr: import("../types").color): import("..").float;
|
|
270
|
-
from_gradient(value: import("..").float, bottom_value: import("..").float, top_value: import("..").float, bottom_color: import("../types").color, top_color: import("../types").color): string;
|
|
271
|
-
aqua: "#00BCD4";
|
|
272
|
-
black: "#363A45";
|
|
273
|
-
blue: "#2962FF";
|
|
274
|
-
fuchsia: "#E040FB";
|
|
275
|
-
gray: "#787B86";
|
|
276
|
-
green: "#4CAF50";
|
|
277
|
-
lime: "#00E676";
|
|
278
|
-
maroon: "#880E4F";
|
|
279
|
-
navy: "#311B92";
|
|
280
|
-
olive: "#808000";
|
|
281
|
-
orange: "#FF9800";
|
|
282
|
-
purple: "#9C27B0";
|
|
283
|
-
red: "#F23645";
|
|
284
|
-
silver: "#B2B5BE";
|
|
285
|
-
teal: "#089981";
|
|
286
|
-
white: "#FFFFFF";
|
|
287
|
-
yellow: "#FDD835";
|
|
288
|
-
};
|
|
289
|
-
export interface ScriptPlotOptions {
|
|
290
|
-
color?: string | string[];
|
|
291
|
-
linewidth?: number;
|
|
292
|
-
style?: PlotConfig['style'];
|
|
293
|
-
linestyle?: PlotConfig['linestyle'];
|
|
294
|
-
display?: PlotConfig['display'];
|
|
295
|
-
histbase?: number;
|
|
296
|
-
force_overlay?: boolean;
|
|
297
|
-
}
|
|
298
|
-
declare function plotImpl(series: Series, title?: string, options?: ScriptPlotOptions): PlotHandle;
|
|
299
|
-
export declare const plot: typeof plotImpl & {
|
|
300
|
-
readonly style_line: "line";
|
|
301
|
-
readonly style_linebr: "linebr";
|
|
302
|
-
readonly style_stepline: "stepline";
|
|
303
|
-
readonly style_steplinebr: "steplinebr";
|
|
304
|
-
readonly style_stepline_diamond: "stepline_diamond";
|
|
305
|
-
readonly style_histogram: "histogram";
|
|
306
|
-
readonly style_columns: "columns";
|
|
307
|
-
readonly style_area: "area";
|
|
308
|
-
readonly style_areabr: "areabr";
|
|
309
|
-
readonly style_circles: "circles";
|
|
310
|
-
readonly style_cross: "cross";
|
|
311
|
-
readonly linestyle_solid: "solid";
|
|
312
|
-
readonly linestyle_dotted: "dotted";
|
|
313
|
-
readonly linestyle_dashed: "dashed";
|
|
314
|
-
};
|
|
315
|
-
export interface ScriptHLineOptions {
|
|
316
|
-
color?: string;
|
|
317
|
-
linestyle?: HLineConfig['linestyle'];
|
|
318
|
-
linewidth?: number;
|
|
319
|
-
}
|
|
320
|
-
declare function hlineImpl(price: number, title?: string, options?: ScriptHLineOptions): PlotHandle;
|
|
321
|
-
export declare const hline: typeof hlineImpl & {
|
|
322
|
-
readonly style_solid: "solid";
|
|
323
|
-
readonly style_dotted: "dotted";
|
|
324
|
-
readonly style_dashed: "dashed";
|
|
325
|
-
};
|
|
326
|
-
export interface ScriptFillOptions {
|
|
327
|
-
color?: string | string[];
|
|
328
|
-
title?: string;
|
|
329
|
-
}
|
|
330
|
-
export type ScriptFillColor = string | null | undefined | Array<string | null | undefined>;
|
|
331
|
-
export type ScriptFillValue = number | Series;
|
|
332
|
-
export declare function fill(a: PlotHandle, b: PlotHandle, options?: ScriptFillOptions): void;
|
|
333
|
-
export declare function fill(a: PlotHandle, b: PlotHandle, color: ScriptFillColor, title?: string, ...rest: unknown[]): void;
|
|
334
|
-
export declare function fill(a: PlotHandle, b: PlotHandle, top_value: ScriptFillValue, bottom_value: ScriptFillValue, top_color: ScriptFillColor, bottom_color: ScriptFillColor, title?: string, ...rest: unknown[]): void;
|
|
335
|
-
export interface PlotShapeOptions {
|
|
336
|
-
style?: ShapeStyle;
|
|
337
|
-
location?: MarkerLocation;
|
|
338
|
-
color?: string;
|
|
339
|
-
text?: string;
|
|
340
|
-
textcolor?: string;
|
|
341
|
-
size?: MarkerSize;
|
|
342
|
-
offset?: number;
|
|
343
|
-
tooltip?: string;
|
|
344
|
-
force_overlay?: boolean;
|
|
345
|
-
}
|
|
346
|
-
export interface PlotCharOptions extends Omit<PlotShapeOptions, 'style'> {
|
|
347
|
-
char?: string;
|
|
348
|
-
}
|
|
349
|
-
export declare function plotshape(condition: Series, title?: string, options?: PlotShapeOptions): void;
|
|
350
|
-
export declare function plotchar(condition: Series, title?: string, options?: PlotCharOptions): void;
|
|
351
|
-
export interface PlotArrowOptions {
|
|
352
|
-
colorup?: string | Array<string | undefined>;
|
|
353
|
-
colordown?: string | Array<string | undefined>;
|
|
354
|
-
offset?: number;
|
|
355
|
-
minheight?: number;
|
|
356
|
-
maxheight?: number;
|
|
357
|
-
display?: ArrowConfig['display'];
|
|
358
|
-
force_overlay?: boolean;
|
|
359
|
-
}
|
|
360
|
-
export declare function plotarrow(series: Series, title?: string, options?: PlotArrowOptions): void;
|
|
361
|
-
export declare function bgcolor(colors: string | Array<string | undefined>, options?: {
|
|
362
|
-
offset?: number;
|
|
363
|
-
title?: string;
|
|
364
|
-
force_overlay?: boolean;
|
|
365
|
-
}): void;
|
|
366
|
-
export declare function barcolor(colors: string | Array<string | undefined>, options?: {
|
|
367
|
-
title?: string;
|
|
368
|
-
}): void;
|
|
369
|
-
export interface BarContext {
|
|
370
|
-
readonly i: number;
|
|
371
|
-
readonly n: number;
|
|
372
|
-
readonly time: number;
|
|
373
|
-
readonly open: number;
|
|
374
|
-
readonly high: number;
|
|
375
|
-
readonly low: number;
|
|
376
|
-
readonly close: number;
|
|
377
|
-
readonly volume: number;
|
|
378
|
-
get(src: Series, offset?: number): number;
|
|
379
|
-
prev(offset?: number): number;
|
|
380
|
-
}
|
|
381
|
-
export declare function eachBar(fn: (c: BarContext) => number | boolean | void): Series;
|
|
382
|
-
declare function strategyEachBar(fn: (c: BarContext) => number | boolean | void): Series;
|
|
383
|
-
export type StrategyNumberVariables = {
|
|
384
|
-
readonly [K in StrategyNumberVariable]: number;
|
|
385
|
-
};
|
|
386
|
-
export type StrategyTextVariables = {
|
|
387
|
-
readonly [K in StrategyTextVariable]: string;
|
|
388
|
-
};
|
|
389
|
-
export type StrategyApi = ((title: string, options?: StrategyOptions) => void) & typeof STRATEGY_CONSTANTS & StrategyNumberVariables & StrategyTextVariables & {
|
|
390
|
-
eachBar: typeof strategyEachBar;
|
|
391
|
-
entry(id: string, direction: StrategyDirection, options?: StrategyEntryOptions): void;
|
|
392
|
-
order(id: string, direction: StrategyDirection, options?: StrategyEntryOptions): void;
|
|
393
|
-
exit(id: string, options?: StrategyExitOptions): void;
|
|
394
|
-
close(id: string, options?: StrategyCloseOptions): void;
|
|
395
|
-
close_all(options?: StrategyCloseAllOptions): void;
|
|
396
|
-
cancel(id: string): void;
|
|
397
|
-
cancel_all(): void;
|
|
398
|
-
opentrade(index: number): StrategyTrade | undefined;
|
|
399
|
-
closedtrade(index: number): StrategyTrade | undefined;
|
|
400
|
-
default_entry_qty(fill_price: number): number;
|
|
401
|
-
risk: {
|
|
402
|
-
allow_entry_in(direction: StrategyRiskDirection): void;
|
|
403
|
-
max_cons_loss_days(count: number, alert_message?: string): void;
|
|
404
|
-
max_drawdown(value: number, type: StrategyRiskValueType, alert_message?: string): void;
|
|
405
|
-
max_intraday_filled_orders(count: number, alert_message?: string): void;
|
|
406
|
-
max_intraday_loss(value: number, type: StrategyRiskValueType, alert_message?: string): void;
|
|
407
|
-
max_position_size(contracts: number): void;
|
|
408
|
-
};
|
|
409
|
-
};
|
|
410
|
-
export declare const strategy: StrategyApi;
|
|
411
|
-
export interface ChartContext {
|
|
412
|
-
timeframe?: string;
|
|
413
|
-
timezone?: string;
|
|
414
|
-
sessionType?: 'regular' | 'extended';
|
|
415
|
-
session?: SessionSpec | string;
|
|
416
|
-
regularSession?: SessionSpec | string;
|
|
417
|
-
tickerid?: string;
|
|
418
|
-
timeUnit?: 's' | 'ms';
|
|
419
|
-
mintick?: number;
|
|
420
|
-
pointvalue?: number;
|
|
421
|
-
mincontract?: number;
|
|
422
|
-
lastBarConfirmed?: boolean;
|
|
423
|
-
realtime?: boolean;
|
|
424
|
-
lastBarNew?: boolean;
|
|
425
|
-
}
|
|
426
|
-
export declare const timeframe: {
|
|
427
|
-
period: string;
|
|
428
|
-
main_period: string;
|
|
429
|
-
multiplier: number;
|
|
430
|
-
isintraday: boolean;
|
|
431
|
-
isdaily: boolean;
|
|
432
|
-
isweekly: boolean;
|
|
433
|
-
ismonthly: boolean;
|
|
434
|
-
isminutes: boolean;
|
|
435
|
-
isseconds: boolean;
|
|
436
|
-
isticks: boolean;
|
|
437
|
-
isdwm: boolean;
|
|
438
|
-
change(tf: string): Series;
|
|
439
|
-
in_seconds(tf?: string): number;
|
|
440
|
-
from_seconds(seconds: import("..").int): import("..").simple_string;
|
|
441
|
-
info(timeframe: import("..").simple_string): timeframeCore.TimeframeInfo;
|
|
442
|
-
};
|
|
443
|
-
export declare const syminfo: {
|
|
444
|
-
readonly mintick: number;
|
|
445
|
-
readonly pointvalue: number;
|
|
446
|
-
readonly mincontract: number;
|
|
447
|
-
readonly timezone: string;
|
|
448
|
-
readonly tickerid: string;
|
|
449
|
-
readonly session: string;
|
|
450
|
-
};
|
|
451
|
-
interface CalendarFunction {
|
|
452
|
-
(time: number, timezone?: string): number;
|
|
453
|
-
(time: Series, timezone?: string): Series;
|
|
454
|
-
}
|
|
455
|
-
export declare const year: CalendarFunction;
|
|
456
|
-
export declare const month: CalendarFunction;
|
|
457
|
-
export declare const weekofyear: CalendarFunction;
|
|
458
|
-
export declare const dayofmonth: CalendarFunction;
|
|
459
|
-
export declare const dayofweek: CalendarFunction;
|
|
460
|
-
export declare const hour: CalendarFunction;
|
|
461
|
-
export declare const minute: CalendarFunction;
|
|
462
|
-
export declare const second: CalendarFunction;
|
|
463
|
-
export declare function timestamp(dateString: string): number;
|
|
464
|
-
export declare function timestamp(timezone: string, year: number, month: number, day: number, hour?: number, minute?: number, second?: number): number;
|
|
465
|
-
export declare function timestamp(year: number, month: number, day: number, hour?: number, minute?: number, second?: number): number;
|
|
466
|
-
export declare function inSession(time: number, session: string, timezone?: string): boolean;
|
|
467
|
-
export declare const str: {
|
|
468
|
-
format_time(time: number, format?: string, timezone?: string): string;
|
|
469
|
-
format(pattern: string, ...args: unknown[]): string;
|
|
470
|
-
length(str: import("..").simple_string): import("..").int;
|
|
471
|
-
tostring(value: any, format?: import("..").simple_string): string;
|
|
472
|
-
tonumber(str: import("..").simple_string): import("..").float | null;
|
|
473
|
-
substring(str: import("..").simple_string, begin: import("..").simple_int, end?: import("..").simple_int): string;
|
|
474
|
-
upper(str: import("..").simple_string): string;
|
|
475
|
-
lower(str: import("..").simple_string): string;
|
|
476
|
-
contains(source: import("..").simple_string, str: import("..").simple_string): import("..").bool;
|
|
477
|
-
pos(source: import("..").simple_string, str: import("..").simple_string): import("..").int;
|
|
478
|
-
replace(source: import("..").simple_string, target: import("..").simple_string, replacement: import("..").simple_string, occurrence?: import("..").simple_int): string;
|
|
479
|
-
replace_all(source: import("..").simple_string, target: import("..").simple_string, replacement: import("..").simple_string): string;
|
|
480
|
-
split(str: import("..").simple_string, separator: import("..").simple_string): string[];
|
|
481
|
-
concat(...strings: import("..").simple_string[]): string;
|
|
482
|
-
startswith(source: import("..").simple_string, str: import("..").simple_string): import("..").bool;
|
|
483
|
-
endswith(source: import("..").simple_string, str: import("..").simple_string): import("..").bool;
|
|
484
|
-
charAt(str: import("..").simple_string, pos: import("..").simple_int): string;
|
|
485
|
-
trim(str: import("..").simple_string): string;
|
|
486
|
-
trimLeft(str: import("..").simple_string): string;
|
|
487
|
-
trimRight(str: import("..").simple_string): string;
|
|
488
|
-
match(source: import("..").simple_string, regex: import("..").simple_string): import("..").bool;
|
|
489
|
-
repeat(source: import("..").simple_string, count: import("..").simple_int, separator?: import("..").simple_string): string | null;
|
|
490
|
-
};
|
|
491
|
-
declare function timeFunction(tf?: string, session?: string, timezone?: string): Series;
|
|
492
|
-
declare function timeCloseFunction(tf?: string, session?: string, timezone?: string): Series;
|
|
493
|
-
export declare const time: Series & typeof timeFunction;
|
|
494
|
-
export declare const time_close: Series & typeof timeCloseFunction;
|
|
495
|
-
export declare const time_tradingday: Series;
|
|
496
|
-
export declare const barstate: {
|
|
497
|
-
readonly isfirst: Series;
|
|
498
|
-
readonly islast: Series;
|
|
499
|
-
readonly isconfirmed: Series;
|
|
500
|
-
readonly isrealtime: Series;
|
|
501
|
-
readonly ishistory: Series;
|
|
502
|
-
readonly isnew: Series;
|
|
503
|
-
readonly islastconfirmedhistory: Series;
|
|
504
|
-
};
|
|
505
|
-
export declare const session: {
|
|
506
|
-
regular: string;
|
|
507
|
-
extended: string;
|
|
508
|
-
readonly isfirstbar: Series;
|
|
509
|
-
readonly islastbar: Series;
|
|
510
|
-
readonly ismarket: Series;
|
|
511
|
-
readonly ispremarket: Series;
|
|
512
|
-
readonly ispostmarket: Series;
|
|
513
|
-
readonly isfirstbar_regular: Series;
|
|
514
|
-
readonly islastbar_regular: Series;
|
|
515
|
-
};
|
|
516
|
-
export declare const barmerge: {
|
|
517
|
-
readonly gaps_on: "gaps_on";
|
|
518
|
-
readonly gaps_off: "gaps_off";
|
|
519
|
-
readonly lookahead_on: "lookahead_on";
|
|
520
|
-
readonly lookahead_off: "lookahead_off";
|
|
521
|
-
};
|
|
522
|
-
export declare const ticker: {
|
|
523
|
-
heikinashi(symbol: string): string;
|
|
524
|
-
standard(symbol: string): string;
|
|
525
|
-
};
|
|
526
|
-
export type SecurityValue = Series | number | boolean | Array<Series | number | boolean>;
|
|
527
|
-
declare function security<T extends SecurityValue>(symbol: string, timeframe: string, expression: () => T, gaps?: string, lookahead?: string): T extends unknown[] ? Series[] : Series;
|
|
528
|
-
export declare const request: {
|
|
529
|
-
security: typeof security;
|
|
530
|
-
};
|
|
531
|
-
export declare const line: {
|
|
532
|
-
all: import("..").Line[];
|
|
533
|
-
new_line(first_point: ChartPoint, second_point: ChartPoint, xloc?: "bar_index" | "bar_time", extend?: "none" | "left" | "right" | "both", lineColor?: import("../types").color, style?: "solid" | "dotted" | "dashed" | "arrow_left" | "arrow_right" | "arrow_both", width?: number, force_overlay?: boolean): import("..").Line;
|
|
534
|
-
new_line(x1: number, y1: number, x2: number, y2: number, xloc?: "bar_index" | "bar_time", extend?: "none" | "left" | "right" | "both", lineColor?: import("../types").color, style?: "solid" | "dotted" | "dashed" | "arrow_left" | "arrow_right" | "arrow_both", width?: number, force_overlay?: boolean): import("..").Line;
|
|
535
|
-
get_price(id: import("..").Line, x: number): number;
|
|
536
|
-
get_x1(id: import("..").Line): number;
|
|
537
|
-
get_x2(id: import("..").Line): number;
|
|
538
|
-
get_y1(id: import("..").Line): number;
|
|
539
|
-
get_y2(id: import("..").Line): number;
|
|
540
|
-
copy(id: import("..").Line): import("..").Line;
|
|
541
|
-
set_x1(id: import("..").Line, x: number): import("..").Line;
|
|
542
|
-
set_x2(id: import("..").Line, x: number): import("..").Line;
|
|
543
|
-
set_y1(id: import("..").Line, y: number): import("..").Line;
|
|
544
|
-
set_y2(id: import("..").Line, y: number): import("..").Line;
|
|
545
|
-
set_xy1(id: import("..").Line, x: number, y: number): import("..").Line;
|
|
546
|
-
set_xy2(id: import("..").Line, x: number, y: number): import("..").Line;
|
|
547
|
-
set_xloc(id: import("..").Line, x1: number, x2: number, xloc: "bar_index" | "bar_time"): import("..").Line;
|
|
548
|
-
set_extend(id: import("..").Line, extend: "none" | "left" | "right" | "both"): import("..").Line;
|
|
549
|
-
set_color(id: import("..").Line, lineColor: import("../types").color): import("..").Line;
|
|
550
|
-
set_style(id: import("..").Line, style: "solid" | "dotted" | "dashed" | "arrow_left" | "arrow_right" | "arrow_both"): import("..").Line;
|
|
551
|
-
set_width(id: import("..").Line, width: number): import("..").Line;
|
|
552
|
-
delete_line(id: import("..").Line): void;
|
|
553
|
-
set_first_point(id: import("..").Line, point: ChartPoint): import("..").Line;
|
|
554
|
-
set_second_point(id: import("..").Line, point: ChartPoint): import("..").Line;
|
|
555
|
-
new: typeof lineCore.new_line;
|
|
556
|
-
delete: typeof lineCore.delete_line;
|
|
557
|
-
};
|
|
558
|
-
export declare const label: {
|
|
559
|
-
all: import("..").Label[];
|
|
560
|
-
new_label(point: ChartPoint, text?: string, xloc?: "bar_index" | "bar_time", yloc?: "price" | "abovebar" | "belowbar", labelColor?: import("../types").color, style?: "none" | "xcross" | "cross" | "triangleup" | "triangledown" | "flag" | "circle" | "arrowup" | "arrowdown" | "label_up" | "label_down" | "label_left" | "label_right" | "label_lower_left" | "label_lower_right" | "label_upper_left" | "label_upper_right" | "label_center" | "square" | "diamond" | "text_outline", textcolor?: import("../types").color, size?: string | number, textalign?: "left" | "center" | "right", tooltip?: string, text_font_family?: "default" | "monospace", force_overlay?: boolean, text_formatting?: number): import("..").Label;
|
|
561
|
-
new_label(x: number, y: number, text?: string, xloc?: "bar_index" | "bar_time", yloc?: "price" | "abovebar" | "belowbar", labelColor?: import("../types").color, style?: "none" | "xcross" | "cross" | "triangleup" | "triangledown" | "flag" | "circle" | "arrowup" | "arrowdown" | "label_up" | "label_down" | "label_left" | "label_right" | "label_lower_left" | "label_lower_right" | "label_upper_left" | "label_upper_right" | "label_center" | "square" | "diamond" | "text_outline", textcolor?: import("../types").color, size?: string | number, textalign?: "left" | "center" | "right", tooltip?: string, text_font_family?: "default" | "monospace", force_overlay?: boolean, text_formatting?: number): import("..").Label;
|
|
562
|
-
get_x(id: import("..").Label): number;
|
|
563
|
-
get_y(id: import("..").Label): number;
|
|
564
|
-
get_text(id: import("..").Label): string | undefined;
|
|
565
|
-
copy(id: import("..").Label): import("..").Label;
|
|
566
|
-
set_x(id: import("..").Label, x: number): import("..").Label;
|
|
567
|
-
set_y(id: import("..").Label, y: number): import("..").Label;
|
|
568
|
-
set_xy(id: import("..").Label, x: number, y: number): import("..").Label;
|
|
569
|
-
set_xloc(id: import("..").Label, x: number, xloc: "bar_index" | "bar_time"): import("..").Label;
|
|
570
|
-
set_yloc(id: import("..").Label, yloc: "price" | "abovebar" | "belowbar"): import("..").Label;
|
|
571
|
-
set_text(id: import("..").Label, text: string): import("..").Label;
|
|
572
|
-
set_tooltip(id: import("..").Label, tooltip: string): import("..").Label;
|
|
573
|
-
set_color(id: import("..").Label, labelColor: import("../types").color): import("..").Label;
|
|
574
|
-
set_textcolor(id: import("..").Label, textColor: import("../types").color): import("..").Label;
|
|
575
|
-
set_style(id: import("..").Label, style: "none" | "xcross" | "cross" | "triangleup" | "triangledown" | "flag" | "circle" | "arrowup" | "arrowdown" | "label_up" | "label_down" | "label_left" | "label_right" | "label_lower_left" | "label_lower_right" | "label_upper_left" | "label_upper_right" | "label_center" | "square" | "diamond" | "text_outline"): import("..").Label;
|
|
576
|
-
set_size(id: import("..").Label, size: string | number): import("..").Label;
|
|
577
|
-
set_textalign(id: import("..").Label, align: "left" | "center" | "right"): import("..").Label;
|
|
578
|
-
set_text_font_family(id: import("..").Label, font: "default" | "monospace"): import("..").Label;
|
|
579
|
-
delete_label(id: import("..").Label): void;
|
|
580
|
-
set_point(id: import("..").Label, point: ChartPoint): import("..").Label;
|
|
581
|
-
set_text_formatting(id: import("..").Label, formatting: number): import("..").Label;
|
|
582
|
-
new: typeof labelCore.new_label;
|
|
583
|
-
delete: typeof labelCore.delete_label;
|
|
584
|
-
};
|
|
585
|
-
export declare const box: {
|
|
586
|
-
all: import("..").Box[];
|
|
587
|
-
new_box(top_left: ChartPoint, bottom_right: ChartPoint, border_color?: import("../types").color, border_width?: number, border_style?: "solid" | "dotted" | "dashed", extend?: "none" | "left" | "right" | "both", xloc?: "bar_index" | "bar_time", bgcolor?: import("../types").color, text?: string, text_size?: string | number, text_color?: import("../types").color, text_halign?: "left" | "center" | "right", text_valign?: "top" | "center" | "bottom", text_wrap?: "none" | "auto", text_font_family?: "default" | "monospace", force_overlay?: boolean, text_formatting?: number): import("..").Box;
|
|
588
|
-
new_box(left: number, top: number, right: number, bottom: number, border_color?: import("../types").color, border_width?: number, border_style?: "solid" | "dotted" | "dashed", extend?: "none" | "left" | "right" | "both", xloc?: "bar_index" | "bar_time", bgcolor?: import("../types").color, text?: string, text_size?: string | number, text_color?: import("../types").color, text_halign?: "left" | "center" | "right", text_valign?: "top" | "center" | "bottom", text_wrap?: "none" | "auto", text_font_family?: "default" | "monospace", force_overlay?: boolean, text_formatting?: number): import("..").Box;
|
|
589
|
-
get_left(id: import("..").Box): number;
|
|
590
|
-
get_right(id: import("..").Box): number;
|
|
591
|
-
get_top(id: import("..").Box): number;
|
|
592
|
-
get_bottom(id: import("..").Box): number;
|
|
593
|
-
copy(id: import("..").Box): import("..").Box;
|
|
594
|
-
set_left(id: import("..").Box, left: number): import("..").Box;
|
|
595
|
-
set_right(id: import("..").Box, right: number): import("..").Box;
|
|
596
|
-
set_top(id: import("..").Box, top: number): import("..").Box;
|
|
597
|
-
set_bottom(id: import("..").Box, bottom: number): import("..").Box;
|
|
598
|
-
set_lefttop(id: import("..").Box, left: number, top: number): import("..").Box;
|
|
599
|
-
set_rightbottom(id: import("..").Box, right: number, bottom: number): import("..").Box;
|
|
600
|
-
set_xloc(id: import("..").Box, left: number, right: number, xloc: "bar_index" | "bar_time"): import("..").Box;
|
|
601
|
-
set_extend(id: import("..").Box, extend: "none" | "left" | "right" | "both"): import("..").Box;
|
|
602
|
-
set_border_color(id: import("..").Box, borderColor: import("../types").color): import("..").Box;
|
|
603
|
-
set_border_width(id: import("..").Box, width: number): import("..").Box;
|
|
604
|
-
set_border_style(id: import("..").Box, style: "solid" | "dotted" | "dashed"): import("..").Box;
|
|
605
|
-
set_bgcolor(id: import("..").Box, bgColor: import("../types").color): import("..").Box;
|
|
606
|
-
set_text(id: import("..").Box, text: string): import("..").Box;
|
|
607
|
-
set_text_color(id: import("..").Box, textColor: import("../types").color): import("..").Box;
|
|
608
|
-
set_text_size(id: import("..").Box, size: string | number): import("..").Box;
|
|
609
|
-
set_text_halign(id: import("..").Box, align: "left" | "center" | "right"): import("..").Box;
|
|
610
|
-
set_text_valign(id: import("..").Box, align: "top" | "center" | "bottom"): import("..").Box;
|
|
611
|
-
set_text_wrap(id: import("..").Box, wrap: "none" | "auto"): import("..").Box;
|
|
612
|
-
set_text_font_family(id: import("..").Box, font: "default" | "monospace"): import("..").Box;
|
|
613
|
-
delete_box(id: import("..").Box): void;
|
|
614
|
-
set_top_left_point(id: import("..").Box, point: ChartPoint): import("..").Box;
|
|
615
|
-
set_bottom_right_point(id: import("..").Box, point: ChartPoint): import("..").Box;
|
|
616
|
-
set_text_formatting(id: import("..").Box, formatting: number): import("..").Box;
|
|
617
|
-
new: typeof boxCore.new_box;
|
|
618
|
-
delete: typeof boxCore.delete_box;
|
|
619
|
-
};
|
|
620
|
-
export declare const linefill: {
|
|
621
|
-
all: import("..").Linefill[];
|
|
622
|
-
new_linefill(line1: import("..").Line, line2: import("..").Line, fillColor?: import("../types").color): import("..").Linefill;
|
|
623
|
-
get_line1(id: import("..").Linefill): import("..").Line;
|
|
624
|
-
get_line2(id: import("..").Linefill): import("..").Line;
|
|
625
|
-
set_color(id: import("..").Linefill, fillColor: import("../types").color): import("..").Linefill;
|
|
626
|
-
delete_linefill(id: import("..").Linefill): void;
|
|
627
|
-
new: typeof linefillCore.new_linefill;
|
|
628
|
-
delete: typeof linefillCore.delete_linefill;
|
|
629
|
-
};
|
|
630
|
-
export declare const polyline: {
|
|
631
|
-
all: polylineCore.Polyline[];
|
|
632
|
-
new_polyline(points: ChartPoint[], curved?: boolean, closed?: boolean, xloc?: "bar_index" | "bar_time", line_color?: import("../types").color, fill_color?: import("../types").color | null, line_style?: "solid" | "dotted" | "dashed", line_width?: number, force_overlay?: boolean): polylineCore.Polyline;
|
|
633
|
-
delete_polyline(id: polylineCore.Polyline): void;
|
|
634
|
-
get_all(): readonly polylineCore.Polyline[];
|
|
635
|
-
clear_all(): void;
|
|
636
|
-
reset_id_counter(): void;
|
|
637
|
-
new: typeof polylineCore.new_polyline;
|
|
638
|
-
delete: typeof polylineCore.delete_polyline;
|
|
639
|
-
};
|
|
640
|
-
export declare const text: {
|
|
641
|
-
format_none: 0;
|
|
642
|
-
format_bold: 1;
|
|
643
|
-
format_italic: 2;
|
|
644
|
-
};
|
|
645
|
-
export declare const chart: {
|
|
646
|
-
point: {
|
|
647
|
-
now(price?: number): ChartPoint;
|
|
648
|
-
new_point(time: number | null, index: number | null, price: number): ChartPoint;
|
|
649
|
-
from_time(time: number, price: number): ChartPoint;
|
|
650
|
-
from_index(index: number, price: number): ChartPoint;
|
|
651
|
-
copy(point: ChartPoint): ChartPoint;
|
|
652
|
-
new: typeof chartPointCore.new_point;
|
|
653
|
-
};
|
|
654
|
-
};
|
|
655
|
-
export declare function seriesOf(values: number[]): Series;
|
|
656
|
-
export declare function alertcondition(condition: Series, title: string, message?: string): void;
|
|
657
|
-
export { Series, BarData, isNA as na, nz };
|
|
658
|
-
export { STRATEGY_DEFAULTS } from '../strategy';
|
|
659
|
-
export type { StrategyCloseAllOptions, StrategyCloseOptions, StrategyCommissionType, StrategyDirection, StrategyEngine, StrategyEntryOptions, StrategyExitOptions, StrategyNumberVariable, StrategyOcaType, StrategyOptions, StrategyProperties, StrategyQtyType, StrategyRiskDirection, StrategyRiskRule, StrategyRiskValueType, StrategyTextVariable, StrategyTrade, StrategyVariable, } from '../strategy';
|
|
660
|
-
export declare const math: {
|
|
661
|
-
round_to_mintick: typeof mathCore.round_to_mintick;
|
|
662
|
-
abs(value: Series): Series;
|
|
663
|
-
abs(value: import("..").float): import("..").float;
|
|
664
|
-
ceil(value: Series): Series;
|
|
665
|
-
ceil(value: import("..").float): import("..").int;
|
|
666
|
-
floor(value: Series): Series;
|
|
667
|
-
floor(value: import("..").float): import("..").int;
|
|
668
|
-
round(value: Series, precision?: import("..").int): Series;
|
|
669
|
-
round(value: import("..").float, precision?: import("..").int): import("..").float;
|
|
670
|
-
max(...values: (import("..").float | Series)[]): import("..").float | Series;
|
|
671
|
-
min(...values: (import("..").float | Series)[]): import("..").float | Series;
|
|
672
|
-
avg(...values: (import("..").float | Series)[]): import("..").float | Series;
|
|
673
|
-
sum(source: Series, length: import("..").simple_int): Series;
|
|
674
|
-
sum(source: import("..").series_float, length: import("..").simple_int): import("..").series_float;
|
|
675
|
-
sqrt(value: Series): Series;
|
|
676
|
-
sqrt(value: import("..").float): import("..").float;
|
|
677
|
-
pow(base: Series, exponent: import("..").float): Series;
|
|
678
|
-
pow(base: import("..").float, exponent: Series): Series;
|
|
679
|
-
pow(base: Series, exponent: Series): Series;
|
|
680
|
-
pow(base: import("..").float, exponent: import("..").float): import("..").float;
|
|
681
|
-
exp(value: Series): Series;
|
|
682
|
-
exp(value: import("..").float): import("..").float;
|
|
683
|
-
log(value: Series): Series;
|
|
684
|
-
log(value: import("..").float): import("..").float;
|
|
685
|
-
log10(value: Series): Series;
|
|
686
|
-
log10(value: import("..").float): import("..").float;
|
|
687
|
-
sin(value: Series): Series;
|
|
688
|
-
sin(value: import("..").float): import("..").float;
|
|
689
|
-
cos(value: Series): Series;
|
|
690
|
-
cos(value: import("..").float): import("..").float;
|
|
691
|
-
tan(value: Series): Series;
|
|
692
|
-
tan(value: import("..").float): import("..").float;
|
|
693
|
-
asin(value: Series): Series;
|
|
694
|
-
asin(value: import("..").float): import("..").float;
|
|
695
|
-
acos(value: Series): Series;
|
|
696
|
-
acos(value: import("..").float): import("..").float;
|
|
697
|
-
atan(value: Series): Series;
|
|
698
|
-
atan(value: import("..").float): import("..").float;
|
|
699
|
-
toradians(degrees: Series): Series;
|
|
700
|
-
toradians(degrees: import("..").float): import("..").float;
|
|
701
|
-
todegrees(radians: Series): Series;
|
|
702
|
-
todegrees(radians: import("..").float): import("..").float;
|
|
703
|
-
random(min?: import("..").float, max?: import("..").float, _seed?: import("..").int): import("..").float;
|
|
704
|
-
sign(value: Series): Series;
|
|
705
|
-
sign(value: import("..").float): import("..").int;
|
|
706
|
-
pi: number;
|
|
707
|
-
e: number;
|
|
708
|
-
phi: 1.618033988749895;
|
|
709
|
-
rphi: 0.618033988749895;
|
|
710
|
-
};
|
|
711
|
-
export * as compare from '../compare';
|
|
712
|
-
export type { Bar, IndicatorResult, TimeValue, InputConfig, PlotConfig, HLineConfig, FillConfig, ShapeConfig, ArrowConfig, BarColorConfig, MarkerData, ArrowData, BarColorData, MarkerLocation, MarkerSize, ShapeStyle, };
|
|
713
|
-
//# sourceMappingURL=index.d.ts.map
|