oakscriptjs 0.1.7 → 0.2.1
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/README.md +0 -29
- package/dist/index.d.ts +1 -1
- package/dist/index.js +302 -58
- package/dist/index.mjs +302 -58
- package/dist/str/index.d.ts +1 -0
- package/dist/str/index.d.ts.map +1 -1
- package/dist/ta/index.d.ts.map +1 -1
- package/dist/ta-series.d.ts +58 -0
- package/dist/ta-series.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -30,32 +30,3 @@ console.log(sma.toArray());
|
|
|
30
30
|
|
|
31
31
|
- [Guide](./docs/guide.md) — Getting started and core concepts
|
|
32
32
|
- [Function Inventory](./docs/inventory.md) — All available TA functions
|
|
33
|
-
|
|
34
|
-
## Development
|
|
35
|
-
|
|
36
|
-
### Prerequisites
|
|
37
|
-
|
|
38
|
-
- Node.js >= 18.0.0
|
|
39
|
-
|
|
40
|
-
### Setup
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
npm install # Install dependencies
|
|
44
|
-
npm run build # Build
|
|
45
|
-
npm test # Run tests
|
|
46
|
-
npm run typecheck # Type check
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## Project Structure
|
|
50
|
-
|
|
51
|
-
```
|
|
52
|
-
oakscriptJS/
|
|
53
|
-
├── src/ # Source code
|
|
54
|
-
├── tests/ # Test suite
|
|
55
|
-
├── dist/ # Build output
|
|
56
|
-
└── docs/ # Documentation
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
---
|
|
60
|
-
|
|
61
|
-
Maintained by [DeepEntropy](https://github.com/deepentropy)
|
package/dist/index.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export { input_int, input_float, input_bool, input_string, input_source, } from
|
|
|
33
33
|
export type { OakScriptContext, ChartAdapter, InputAdapter, SeriesHandle, SeriesOptions, InputConfig, InputOptions, OhlcvData, PlotConfig, HLineConfig, FillConfig, } from './runtime/types';
|
|
34
34
|
export { LightweightChartsAdapter } from './runtime/adapters/LightweightChartsAdapter';
|
|
35
35
|
export { SimpleInputAdapter } from './runtime/adapters/SimpleInputAdapter';
|
|
36
|
-
export declare const VERSION = "0.
|
|
36
|
+
export declare const VERSION = "0.2.1";
|
|
37
37
|
export declare const info: {
|
|
38
38
|
name: string;
|
|
39
39
|
version: string;
|
package/dist/index.js
CHANGED
|
@@ -197,18 +197,33 @@ function ema(source, length2) {
|
|
|
197
197
|
const result = [];
|
|
198
198
|
const len = Math.floor(length2);
|
|
199
199
|
const multiplier = 2 / (len + 1);
|
|
200
|
-
let
|
|
201
|
-
|
|
202
|
-
|
|
200
|
+
let firstValidIndex = -1;
|
|
201
|
+
let validCount = 0;
|
|
202
|
+
let initSum = 0;
|
|
203
|
+
for (let i = 0; i < source.length; i++) {
|
|
204
|
+
const val = source[i];
|
|
205
|
+
if (val !== void 0 && !isNaN(val)) {
|
|
206
|
+
initSum += val;
|
|
207
|
+
validCount++;
|
|
208
|
+
if (validCount === len) {
|
|
209
|
+
firstValidIndex = i;
|
|
210
|
+
break;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
203
213
|
}
|
|
204
|
-
|
|
214
|
+
let emaValue = validCount > 0 ? initSum / validCount : NaN;
|
|
215
|
+
let emaInitialized = firstValidIndex >= 0;
|
|
205
216
|
for (let i = 0; i < source.length; i++) {
|
|
206
|
-
if (i
|
|
207
|
-
result.push(
|
|
208
|
-
|
|
217
|
+
if (!emaInitialized || i < firstValidIndex) {
|
|
218
|
+
result.push(NaN);
|
|
219
|
+
} else if (i === firstValidIndex) {
|
|
220
|
+
result.push(emaValue);
|
|
209
221
|
} else {
|
|
210
|
-
|
|
211
|
-
|
|
222
|
+
const val = source[i];
|
|
223
|
+
if (val !== void 0 && !isNaN(val)) {
|
|
224
|
+
emaValue = (val - emaValue) * multiplier + emaValue;
|
|
225
|
+
}
|
|
226
|
+
result.push(emaValue);
|
|
212
227
|
}
|
|
213
228
|
}
|
|
214
229
|
return result;
|
|
@@ -250,12 +265,12 @@ function macd(source, fastLength, slowLength, signalLength) {
|
|
|
250
265
|
}
|
|
251
266
|
function bb(series, length2, mult2) {
|
|
252
267
|
const basis = sma(series, length2);
|
|
253
|
-
const
|
|
268
|
+
const dev3 = stdev(series, length2);
|
|
254
269
|
const upper2 = [];
|
|
255
270
|
const lower2 = [];
|
|
256
271
|
for (let i = 0; i < series.length; i++) {
|
|
257
|
-
upper2.push(basis[i] + mult2 *
|
|
258
|
-
lower2.push(basis[i] - mult2 *
|
|
272
|
+
upper2.push(basis[i] + mult2 * dev3[i]);
|
|
273
|
+
lower2.push(basis[i] - mult2 * dev3[i]);
|
|
259
274
|
}
|
|
260
275
|
return [basis, upper2, lower2];
|
|
261
276
|
}
|
|
@@ -459,13 +474,13 @@ function highest(source, length2) {
|
|
|
459
474
|
if (i < length2 - 1) {
|
|
460
475
|
result.push(NaN);
|
|
461
476
|
} else {
|
|
462
|
-
let
|
|
477
|
+
let max6 = -Infinity;
|
|
463
478
|
for (let j = 0; j < length2; j++) {
|
|
464
479
|
if (!isNaN(source[i - j])) {
|
|
465
|
-
|
|
480
|
+
max6 = Math.max(max6, source[i - j]);
|
|
466
481
|
}
|
|
467
482
|
}
|
|
468
|
-
result.push(
|
|
483
|
+
result.push(max6 === -Infinity ? NaN : max6);
|
|
469
484
|
}
|
|
470
485
|
}
|
|
471
486
|
return result;
|
|
@@ -476,13 +491,13 @@ function lowest(source, length2) {
|
|
|
476
491
|
if (i < length2 - 1) {
|
|
477
492
|
result.push(NaN);
|
|
478
493
|
} else {
|
|
479
|
-
let
|
|
494
|
+
let min6 = Infinity;
|
|
480
495
|
for (let j = 0; j < length2; j++) {
|
|
481
496
|
if (!isNaN(source[i - j])) {
|
|
482
|
-
|
|
497
|
+
min6 = Math.min(min6, source[i - j]);
|
|
483
498
|
}
|
|
484
499
|
}
|
|
485
|
-
result.push(
|
|
500
|
+
result.push(min6 === Infinity ? NaN : min6);
|
|
486
501
|
}
|
|
487
502
|
}
|
|
488
503
|
return result;
|
|
@@ -748,10 +763,10 @@ function correlation(source1, source2, length2) {
|
|
|
748
763
|
let sum2Sq = 0;
|
|
749
764
|
for (const [v1, v2] of pairs) {
|
|
750
765
|
const dev1 = v1 - mean1;
|
|
751
|
-
const
|
|
752
|
-
numerator += dev1 *
|
|
766
|
+
const dev22 = v2 - mean2;
|
|
767
|
+
numerator += dev1 * dev22;
|
|
753
768
|
sum1Sq += dev1 * dev1;
|
|
754
|
-
sum2Sq +=
|
|
769
|
+
sum2Sq += dev22 * dev22;
|
|
755
770
|
}
|
|
756
771
|
const denominator = Math.sqrt(sum1Sq * sum2Sq);
|
|
757
772
|
if (denominator === 0) {
|
|
@@ -816,11 +831,11 @@ function stoch(source, high, low, length2) {
|
|
|
816
831
|
if (isNaN(lowestValues[i]) || isNaN(highestValues[i])) {
|
|
817
832
|
result.push(NaN);
|
|
818
833
|
} else {
|
|
819
|
-
const
|
|
820
|
-
if (
|
|
834
|
+
const range4 = highestValues[i] - lowestValues[i];
|
|
835
|
+
if (range4 === 0) {
|
|
821
836
|
result.push(NaN);
|
|
822
837
|
} else {
|
|
823
|
-
const stochValue = 100 * (source[i] - lowestValues[i]) /
|
|
838
|
+
const stochValue = 100 * (source[i] - lowestValues[i]) / range4;
|
|
824
839
|
result.push(stochValue);
|
|
825
840
|
}
|
|
826
841
|
}
|
|
@@ -887,7 +902,7 @@ function hma(source, length2) {
|
|
|
887
902
|
}
|
|
888
903
|
return wma(diff2, sqrtLength);
|
|
889
904
|
}
|
|
890
|
-
function sar(start, inc,
|
|
905
|
+
function sar(start, inc, max6, high, low, close) {
|
|
891
906
|
if (!high || !low || !close) {
|
|
892
907
|
throw new Error(
|
|
893
908
|
"ta.sar() requires high, low, and close series. Either pass them explicitly or use createContext({ chart: { high, low, close } }) for implicit data."
|
|
@@ -939,12 +954,12 @@ function sar(start, inc, max5, high, low, close) {
|
|
|
939
954
|
if (isUpTrend) {
|
|
940
955
|
if (high[i] > extremePoint) {
|
|
941
956
|
extremePoint = high[i];
|
|
942
|
-
acceleration = Math.min(acceleration + inc,
|
|
957
|
+
acceleration = Math.min(acceleration + inc, max6);
|
|
943
958
|
}
|
|
944
959
|
} else {
|
|
945
960
|
if (low[i] < extremePoint) {
|
|
946
961
|
extremePoint = low[i];
|
|
947
|
-
acceleration = Math.min(acceleration + inc,
|
|
962
|
+
acceleration = Math.min(acceleration + inc, max6);
|
|
948
963
|
}
|
|
949
964
|
}
|
|
950
965
|
}
|
|
@@ -1180,22 +1195,22 @@ function cmo(source, length2) {
|
|
|
1180
1195
|
}
|
|
1181
1196
|
function kc(source, length2, mult2, useTrueRange = true, high, low, close) {
|
|
1182
1197
|
const middle = ema(source, length2);
|
|
1183
|
-
let
|
|
1198
|
+
let range4;
|
|
1184
1199
|
if (useTrueRange) {
|
|
1185
1200
|
if (!high || !low || !close) {
|
|
1186
1201
|
throw new Error("ta.kc() with useTrueRange=true requires high, low, and close data");
|
|
1187
1202
|
}
|
|
1188
|
-
|
|
1203
|
+
range4 = tr(false, high, low, close);
|
|
1189
1204
|
} else {
|
|
1190
1205
|
if (!high || !low) {
|
|
1191
1206
|
throw new Error("ta.kc() requires high and low data");
|
|
1192
1207
|
}
|
|
1193
|
-
|
|
1208
|
+
range4 = [];
|
|
1194
1209
|
for (let i = 0; i < high.length; i++) {
|
|
1195
|
-
|
|
1210
|
+
range4.push(high[i] - low[i]);
|
|
1196
1211
|
}
|
|
1197
1212
|
}
|
|
1198
|
-
const rangeEma = ema(
|
|
1213
|
+
const rangeEma = ema(range4, length2);
|
|
1199
1214
|
const upper2 = [];
|
|
1200
1215
|
const lower2 = [];
|
|
1201
1216
|
for (let i = 0; i < middle.length; i++) {
|
|
@@ -1232,11 +1247,11 @@ function wpr(high, low, close, length2 = 14) {
|
|
|
1232
1247
|
if (low[j] < lowestLow)
|
|
1233
1248
|
lowestLow = low[j];
|
|
1234
1249
|
}
|
|
1235
|
-
const
|
|
1236
|
-
if (
|
|
1250
|
+
const range4 = highestHigh - lowestLow;
|
|
1251
|
+
if (range4 === 0) {
|
|
1237
1252
|
result.push(NaN);
|
|
1238
1253
|
} else {
|
|
1239
|
-
const wprValue = (highestHigh - close[i]) /
|
|
1254
|
+
const wprValue = (highestHigh - close[i]) / range4 * -100;
|
|
1240
1255
|
result.push(wprValue);
|
|
1241
1256
|
}
|
|
1242
1257
|
}
|
|
@@ -1402,8 +1417,8 @@ function cog(source, length2 = 10) {
|
|
|
1402
1417
|
if (denominator === 0) {
|
|
1403
1418
|
result.push(NaN);
|
|
1404
1419
|
} else {
|
|
1405
|
-
const
|
|
1406
|
-
result.push(
|
|
1420
|
+
const cog3 = -1 * (numerator / denominator) + (length2 + 1) / 2;
|
|
1421
|
+
result.push(cog3);
|
|
1407
1422
|
}
|
|
1408
1423
|
}
|
|
1409
1424
|
return result;
|
|
@@ -1665,15 +1680,15 @@ function calculatePivotLevels(type, h, l, c, o) {
|
|
|
1665
1680
|
levels[2] = x / 2 - h;
|
|
1666
1681
|
break;
|
|
1667
1682
|
case "Camarilla":
|
|
1668
|
-
const
|
|
1669
|
-
levels[1] = c +
|
|
1670
|
-
levels[2] = c -
|
|
1671
|
-
levels[3] = c +
|
|
1672
|
-
levels[4] = c -
|
|
1673
|
-
levels[5] = c +
|
|
1674
|
-
levels[6] = c -
|
|
1675
|
-
levels[7] = c +
|
|
1676
|
-
levels[8] = c -
|
|
1683
|
+
const range4 = h - l;
|
|
1684
|
+
levels[1] = c + range4 * 1.1 / 12;
|
|
1685
|
+
levels[2] = c - range4 * 1.1 / 12;
|
|
1686
|
+
levels[3] = c + range4 * 1.1 / 6;
|
|
1687
|
+
levels[4] = c - range4 * 1.1 / 6;
|
|
1688
|
+
levels[5] = c + range4 * 1.1 / 4;
|
|
1689
|
+
levels[6] = c - range4 * 1.1 / 4;
|
|
1690
|
+
levels[7] = c + range4 * 1.1 / 2;
|
|
1691
|
+
levels[8] = c - range4 * 1.1 / 2;
|
|
1677
1692
|
levels[9] = h;
|
|
1678
1693
|
levels[10] = l;
|
|
1679
1694
|
break;
|
|
@@ -2757,10 +2772,10 @@ function todegrees(radians) {
|
|
|
2757
2772
|
}
|
|
2758
2773
|
return radians * (180 / Math.PI);
|
|
2759
2774
|
}
|
|
2760
|
-
function random(
|
|
2775
|
+
function random(min6, max6, _seed) {
|
|
2761
2776
|
const rand = Math.random();
|
|
2762
|
-
if (
|
|
2763
|
-
return
|
|
2777
|
+
if (min6 !== void 0 && max6 !== void 0) {
|
|
2778
|
+
return min6 + rand * (max6 - min6);
|
|
2764
2779
|
}
|
|
2765
2780
|
return rand;
|
|
2766
2781
|
}
|
|
@@ -2972,16 +2987,16 @@ function median2(id) {
|
|
|
2972
2987
|
function mode2(id) {
|
|
2973
2988
|
const frequency = /* @__PURE__ */ new Map();
|
|
2974
2989
|
let maxFreq = 0;
|
|
2975
|
-
let
|
|
2990
|
+
let mode5 = id[0];
|
|
2976
2991
|
for (const val of id) {
|
|
2977
2992
|
const freq = (frequency.get(val) || 0) + 1;
|
|
2978
2993
|
frequency.set(val, freq);
|
|
2979
2994
|
if (freq > maxFreq) {
|
|
2980
2995
|
maxFreq = freq;
|
|
2981
|
-
|
|
2996
|
+
mode5 = val;
|
|
2982
2997
|
}
|
|
2983
2998
|
}
|
|
2984
|
-
return
|
|
2999
|
+
return mode5;
|
|
2985
3000
|
}
|
|
2986
3001
|
function stdev2(id) {
|
|
2987
3002
|
const mean = avg2(id);
|
|
@@ -3197,6 +3212,7 @@ __export(str_exports, {
|
|
|
3197
3212
|
lower: () => lower,
|
|
3198
3213
|
match: () => match,
|
|
3199
3214
|
pos: () => pos,
|
|
3215
|
+
repeat: () => repeat,
|
|
3200
3216
|
replace: () => replace,
|
|
3201
3217
|
replace_all: () => replace_all,
|
|
3202
3218
|
split: () => split,
|
|
@@ -3282,6 +3298,13 @@ function trimRight(str) {
|
|
|
3282
3298
|
function match(source, regex) {
|
|
3283
3299
|
return new RegExp(regex).test(source);
|
|
3284
3300
|
}
|
|
3301
|
+
function repeat(source, count, separator = "") {
|
|
3302
|
+
if (source == null)
|
|
3303
|
+
return null;
|
|
3304
|
+
if (count <= 0)
|
|
3305
|
+
return "";
|
|
3306
|
+
return Array(count).fill(source).join(separator);
|
|
3307
|
+
}
|
|
3285
3308
|
function format_time(time, format2) {
|
|
3286
3309
|
const date = new Date(time);
|
|
3287
3310
|
const monthNames = [
|
|
@@ -5224,21 +5247,45 @@ var ta_series_exports = {};
|
|
|
5224
5247
|
__export(ta_series_exports, {
|
|
5225
5248
|
alma: () => alma2,
|
|
5226
5249
|
atr: () => atr2,
|
|
5250
|
+
barssince: () => barssince2,
|
|
5227
5251
|
bb: () => bb2,
|
|
5252
|
+
bbw: () => bbw2,
|
|
5228
5253
|
cci: () => cci2,
|
|
5229
5254
|
change: () => change2,
|
|
5255
|
+
cmo: () => cmo2,
|
|
5256
|
+
cog: () => cog2,
|
|
5257
|
+
correlation: () => correlation2,
|
|
5230
5258
|
cross: () => cross2,
|
|
5231
5259
|
crossover: () => crossover2,
|
|
5232
5260
|
crossunder: () => crossunder2,
|
|
5233
5261
|
cum: () => cum2,
|
|
5262
|
+
dev: () => dev2,
|
|
5263
|
+
dmi: () => dmi2,
|
|
5234
5264
|
ema: () => ema2,
|
|
5235
5265
|
falling: () => falling2,
|
|
5236
5266
|
highest: () => highest2,
|
|
5267
|
+
highestbars: () => highestbars2,
|
|
5268
|
+
hma: () => hma2,
|
|
5237
5269
|
ichimoku: () => ichimoku2,
|
|
5270
|
+
kc: () => kc2,
|
|
5271
|
+
kcw: () => kcw2,
|
|
5238
5272
|
linreg: () => linreg2,
|
|
5239
5273
|
lowest: () => lowest2,
|
|
5274
|
+
lowestbars: () => lowestbars2,
|
|
5240
5275
|
macd: () => macd2,
|
|
5276
|
+
max: () => max5,
|
|
5277
|
+
median: () => median4,
|
|
5278
|
+
mfi: () => mfi2,
|
|
5279
|
+
min: () => min5,
|
|
5280
|
+
mode: () => mode4,
|
|
5241
5281
|
mom: () => mom2,
|
|
5282
|
+
percentile_linear_interpolation: () => percentile_linear_interpolation3,
|
|
5283
|
+
percentile_nearest_rank: () => percentile_nearest_rank3,
|
|
5284
|
+
percentrank: () => percentrank3,
|
|
5285
|
+
pivothigh: () => pivothigh2,
|
|
5286
|
+
pivotlow: () => pivotlow2,
|
|
5287
|
+
range: () => range3,
|
|
5288
|
+
rci: () => rci2,
|
|
5242
5289
|
rising: () => rising2,
|
|
5243
5290
|
rma: () => rma2,
|
|
5244
5291
|
roc: () => roc2,
|
|
@@ -5248,11 +5295,16 @@ __export(ta_series_exports, {
|
|
|
5248
5295
|
stdev: () => stdev3,
|
|
5249
5296
|
stoch: () => stoch2,
|
|
5250
5297
|
supertrend: () => supertrend2,
|
|
5298
|
+
swma: () => swma2,
|
|
5251
5299
|
ta: () => ta,
|
|
5252
5300
|
tr: () => tr2,
|
|
5301
|
+
tsi: () => tsi2,
|
|
5302
|
+
valuewhen: () => valuewhen2,
|
|
5303
|
+
variance: () => variance3,
|
|
5253
5304
|
vwap: () => vwap2,
|
|
5254
5305
|
vwma: () => vwma2,
|
|
5255
5306
|
wma: () => wma2,
|
|
5307
|
+
wpr: () => wpr2,
|
|
5256
5308
|
zigzag: () => zigzag2
|
|
5257
5309
|
});
|
|
5258
5310
|
function sma2(source, length2) {
|
|
@@ -5484,11 +5536,174 @@ function cci2(source, length2) {
|
|
|
5484
5536
|
const result = cci(sourceValues, length2);
|
|
5485
5537
|
return Series.fromArray(bars, result);
|
|
5486
5538
|
}
|
|
5487
|
-
function sar2(bars, start = 0.02, inc = 0.02,
|
|
5539
|
+
function sar2(bars, start = 0.02, inc = 0.02, max6 = 0.2) {
|
|
5540
|
+
const high = bars.map((b2) => b2.high);
|
|
5541
|
+
const low = bars.map((b2) => b2.low);
|
|
5542
|
+
const close = bars.map((b2) => b2.close);
|
|
5543
|
+
const result = sar(start, inc, max6, high, low, close);
|
|
5544
|
+
return Series.fromArray(bars, result);
|
|
5545
|
+
}
|
|
5546
|
+
function dev2(source, length2) {
|
|
5547
|
+
const bars = source.bars;
|
|
5548
|
+
const result = dev(source.toArray(), length2);
|
|
5549
|
+
return Series.fromArray(bars, result);
|
|
5550
|
+
}
|
|
5551
|
+
function variance3(source, length2, biased = true) {
|
|
5552
|
+
const bars = source.bars;
|
|
5553
|
+
const result = variance(source.toArray(), length2, biased);
|
|
5554
|
+
return Series.fromArray(bars, result);
|
|
5555
|
+
}
|
|
5556
|
+
function median4(source, length2) {
|
|
5557
|
+
const bars = source.bars;
|
|
5558
|
+
const result = median(source.toArray(), length2);
|
|
5559
|
+
return Series.fromArray(bars, result);
|
|
5560
|
+
}
|
|
5561
|
+
function swma2(source) {
|
|
5562
|
+
const bars = source.bars;
|
|
5563
|
+
const result = swma(source.toArray());
|
|
5564
|
+
return Series.fromArray(bars, result);
|
|
5565
|
+
}
|
|
5566
|
+
function correlation2(source1, source2, length2) {
|
|
5567
|
+
const bars = source1.bars;
|
|
5568
|
+
const result = correlation(source1.toArray(), source2.toArray(), length2);
|
|
5569
|
+
return Series.fromArray(bars, result);
|
|
5570
|
+
}
|
|
5571
|
+
function percentrank3(source, length2) {
|
|
5572
|
+
const bars = source.bars;
|
|
5573
|
+
const result = percentrank(source.toArray(), length2);
|
|
5574
|
+
return Series.fromArray(bars, result);
|
|
5575
|
+
}
|
|
5576
|
+
function mfi2(source, length2, volume) {
|
|
5577
|
+
const bars = source.bars;
|
|
5578
|
+
const result = mfi(source.toArray(), length2, volume.toArray());
|
|
5579
|
+
return Series.fromArray(bars, result);
|
|
5580
|
+
}
|
|
5581
|
+
function hma2(source, length2) {
|
|
5582
|
+
const bars = source.bars;
|
|
5583
|
+
const result = hma(source.toArray(), length2);
|
|
5584
|
+
return Series.fromArray(bars, result);
|
|
5585
|
+
}
|
|
5586
|
+
function pivothigh2(source, leftbars, rightbars) {
|
|
5587
|
+
const bars = source.bars;
|
|
5588
|
+
const result = pivothigh(source.toArray(), leftbars, rightbars);
|
|
5589
|
+
return Series.fromArray(bars, result);
|
|
5590
|
+
}
|
|
5591
|
+
function pivotlow2(source, leftbars, rightbars) {
|
|
5592
|
+
const bars = source.bars;
|
|
5593
|
+
const result = pivotlow(source.toArray(), leftbars, rightbars);
|
|
5594
|
+
return Series.fromArray(bars, result);
|
|
5595
|
+
}
|
|
5596
|
+
function barssince2(condition) {
|
|
5597
|
+
const bars = condition.bars;
|
|
5598
|
+
const boolValues = condition.toArray().map((v) => v === 1);
|
|
5599
|
+
const result = barssince(boolValues);
|
|
5600
|
+
return Series.fromArray(bars, result);
|
|
5601
|
+
}
|
|
5602
|
+
function valuewhen2(condition, source, occurrence) {
|
|
5603
|
+
const bars = condition.bars;
|
|
5604
|
+
const boolValues = condition.toArray().map((v) => v === 1);
|
|
5605
|
+
const result = valuewhen(boolValues, source.toArray(), occurrence);
|
|
5606
|
+
return Series.fromArray(bars, result);
|
|
5607
|
+
}
|
|
5608
|
+
function dmi2(bars, diLength, adxSmoothing) {
|
|
5488
5609
|
const high = bars.map((b2) => b2.high);
|
|
5489
5610
|
const low = bars.map((b2) => b2.low);
|
|
5490
5611
|
const close = bars.map((b2) => b2.close);
|
|
5491
|
-
const
|
|
5612
|
+
const [plusDI, minusDI, adx] = dmi(diLength, adxSmoothing, high, low, close);
|
|
5613
|
+
return [
|
|
5614
|
+
Series.fromArray(bars, plusDI),
|
|
5615
|
+
Series.fromArray(bars, minusDI),
|
|
5616
|
+
Series.fromArray(bars, adx)
|
|
5617
|
+
];
|
|
5618
|
+
}
|
|
5619
|
+
function tsi2(source, shortLength, longLength) {
|
|
5620
|
+
const bars = source.bars;
|
|
5621
|
+
const result = tsi(source.toArray(), shortLength, longLength);
|
|
5622
|
+
return Series.fromArray(bars, result);
|
|
5623
|
+
}
|
|
5624
|
+
function cmo2(source, length2) {
|
|
5625
|
+
const bars = source.bars;
|
|
5626
|
+
const result = cmo(source.toArray(), length2);
|
|
5627
|
+
return Series.fromArray(bars, result);
|
|
5628
|
+
}
|
|
5629
|
+
function kc2(bars, source, length2, mult2, useTrueRange = true) {
|
|
5630
|
+
const high = bars.map((b2) => b2.high);
|
|
5631
|
+
const low = bars.map((b2) => b2.low);
|
|
5632
|
+
const close = bars.map((b2) => b2.close);
|
|
5633
|
+
const [middle, upper2, lower2] = kc(source.toArray(), length2, mult2, useTrueRange, high, low, close);
|
|
5634
|
+
return [
|
|
5635
|
+
Series.fromArray(bars, middle),
|
|
5636
|
+
Series.fromArray(bars, upper2),
|
|
5637
|
+
Series.fromArray(bars, lower2)
|
|
5638
|
+
];
|
|
5639
|
+
}
|
|
5640
|
+
function bbw2(source, length2, mult2) {
|
|
5641
|
+
const bars = source.bars;
|
|
5642
|
+
const result = bbw(source.toArray(), length2, mult2);
|
|
5643
|
+
return Series.fromArray(bars, result);
|
|
5644
|
+
}
|
|
5645
|
+
function wpr2(bars, length2 = 14) {
|
|
5646
|
+
const high = bars.map((b2) => b2.high);
|
|
5647
|
+
const low = bars.map((b2) => b2.low);
|
|
5648
|
+
const close = bars.map((b2) => b2.close);
|
|
5649
|
+
const result = wpr(high, low, close, length2);
|
|
5650
|
+
return Series.fromArray(bars, result);
|
|
5651
|
+
}
|
|
5652
|
+
function kcw2(bars, source, length2 = 20, mult2 = 2, useTrueRange = true) {
|
|
5653
|
+
const high = bars.map((b2) => b2.high);
|
|
5654
|
+
const low = bars.map((b2) => b2.low);
|
|
5655
|
+
const close = bars.map((b2) => b2.close);
|
|
5656
|
+
const result = kcw(source.toArray(), length2, mult2, useTrueRange, high, low, close);
|
|
5657
|
+
return Series.fromArray(bars, result);
|
|
5658
|
+
}
|
|
5659
|
+
function range3(high, low) {
|
|
5660
|
+
const bars = high.bars;
|
|
5661
|
+
const result = range(high.toArray(), low.toArray());
|
|
5662
|
+
return Series.fromArray(bars, result);
|
|
5663
|
+
}
|
|
5664
|
+
function highestbars2(source, length2) {
|
|
5665
|
+
const bars = source.bars;
|
|
5666
|
+
const result = highestbars(source.toArray(), length2);
|
|
5667
|
+
return Series.fromArray(bars, result);
|
|
5668
|
+
}
|
|
5669
|
+
function lowestbars2(source, length2) {
|
|
5670
|
+
const bars = source.bars;
|
|
5671
|
+
const result = lowestbars(source.toArray(), length2);
|
|
5672
|
+
return Series.fromArray(bars, result);
|
|
5673
|
+
}
|
|
5674
|
+
function max5(source1, source2) {
|
|
5675
|
+
const bars = source1.bars;
|
|
5676
|
+
const result = max(source1.toArray(), source2.toArray());
|
|
5677
|
+
return Series.fromArray(bars, result);
|
|
5678
|
+
}
|
|
5679
|
+
function min5(source1, source2) {
|
|
5680
|
+
const bars = source1.bars;
|
|
5681
|
+
const result = min(source1.toArray(), source2.toArray());
|
|
5682
|
+
return Series.fromArray(bars, result);
|
|
5683
|
+
}
|
|
5684
|
+
function cog2(source, length2 = 10) {
|
|
5685
|
+
const bars = source.bars;
|
|
5686
|
+
const result = cog(source.toArray(), length2);
|
|
5687
|
+
return Series.fromArray(bars, result);
|
|
5688
|
+
}
|
|
5689
|
+
function mode4(source, length2) {
|
|
5690
|
+
const bars = source.bars;
|
|
5691
|
+
const result = mode(source.toArray(), length2);
|
|
5692
|
+
return Series.fromArray(bars, result);
|
|
5693
|
+
}
|
|
5694
|
+
function percentile_linear_interpolation3(source, length2, percentage) {
|
|
5695
|
+
const bars = source.bars;
|
|
5696
|
+
const result = percentile_linear_interpolation(source.toArray(), length2, percentage);
|
|
5697
|
+
return Series.fromArray(bars, result);
|
|
5698
|
+
}
|
|
5699
|
+
function percentile_nearest_rank3(source, length2, percentage) {
|
|
5700
|
+
const bars = source.bars;
|
|
5701
|
+
const result = percentile_nearest_rank(source.toArray(), length2, percentage);
|
|
5702
|
+
return Series.fromArray(bars, result);
|
|
5703
|
+
}
|
|
5704
|
+
function rci2(source, length2) {
|
|
5705
|
+
const bars = source.bars;
|
|
5706
|
+
const result = rci(source.toArray(), length2);
|
|
5492
5707
|
return Series.fromArray(bars, result);
|
|
5493
5708
|
}
|
|
5494
5709
|
var ta = {
|
|
@@ -5522,7 +5737,36 @@ var ta = {
|
|
|
5522
5737
|
alma: alma2,
|
|
5523
5738
|
zigzag: zigzag2,
|
|
5524
5739
|
cci: cci2,
|
|
5525
|
-
sar: sar2
|
|
5740
|
+
sar: sar2,
|
|
5741
|
+
dev: dev2,
|
|
5742
|
+
variance: variance3,
|
|
5743
|
+
median: median4,
|
|
5744
|
+
swma: swma2,
|
|
5745
|
+
correlation: correlation2,
|
|
5746
|
+
percentrank: percentrank3,
|
|
5747
|
+
mfi: mfi2,
|
|
5748
|
+
hma: hma2,
|
|
5749
|
+
pivothigh: pivothigh2,
|
|
5750
|
+
pivotlow: pivotlow2,
|
|
5751
|
+
barssince: barssince2,
|
|
5752
|
+
valuewhen: valuewhen2,
|
|
5753
|
+
dmi: dmi2,
|
|
5754
|
+
tsi: tsi2,
|
|
5755
|
+
cmo: cmo2,
|
|
5756
|
+
kc: kc2,
|
|
5757
|
+
bbw: bbw2,
|
|
5758
|
+
wpr: wpr2,
|
|
5759
|
+
kcw: kcw2,
|
|
5760
|
+
range: range3,
|
|
5761
|
+
highestbars: highestbars2,
|
|
5762
|
+
lowestbars: lowestbars2,
|
|
5763
|
+
max: max5,
|
|
5764
|
+
min: min5,
|
|
5765
|
+
cog: cog2,
|
|
5766
|
+
mode: mode4,
|
|
5767
|
+
percentile_linear_interpolation: percentile_linear_interpolation3,
|
|
5768
|
+
percentile_nearest_rank: percentile_nearest_rank3,
|
|
5769
|
+
rci: rci2
|
|
5526
5770
|
};
|
|
5527
5771
|
|
|
5528
5772
|
// src/utils/index.ts
|
|
@@ -5737,9 +5981,9 @@ var ZigZag = class {
|
|
|
5737
5981
|
return true;
|
|
5738
5982
|
}
|
|
5739
5983
|
} else {
|
|
5740
|
-
const
|
|
5984
|
+
const dev3 = this.calcDev(last2.end.price, point.price);
|
|
5741
5985
|
const threshold = this.settings.devThreshold;
|
|
5742
|
-
const meetsThreshold = last2.isHigh ?
|
|
5986
|
+
const meetsThreshold = last2.isHigh ? dev3 <= -threshold : dev3 >= threshold;
|
|
5743
5987
|
if (meetsThreshold) {
|
|
5744
5988
|
this.pivots.push({
|
|
5745
5989
|
isHigh,
|
|
@@ -6470,7 +6714,7 @@ var SimpleInputAdapter = class {
|
|
|
6470
6714
|
};
|
|
6471
6715
|
|
|
6472
6716
|
// src/index.ts
|
|
6473
|
-
var VERSION = "0.
|
|
6717
|
+
var VERSION = "0.2.1";
|
|
6474
6718
|
var info = {
|
|
6475
6719
|
name: "OakScriptJS",
|
|
6476
6720
|
version: VERSION,
|
package/dist/index.mjs
CHANGED
|
@@ -97,18 +97,33 @@ function ema(source, length2) {
|
|
|
97
97
|
const result = [];
|
|
98
98
|
const len = Math.floor(length2);
|
|
99
99
|
const multiplier = 2 / (len + 1);
|
|
100
|
-
let
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
let firstValidIndex = -1;
|
|
101
|
+
let validCount = 0;
|
|
102
|
+
let initSum = 0;
|
|
103
|
+
for (let i = 0; i < source.length; i++) {
|
|
104
|
+
const val = source[i];
|
|
105
|
+
if (val !== void 0 && !isNaN(val)) {
|
|
106
|
+
initSum += val;
|
|
107
|
+
validCount++;
|
|
108
|
+
if (validCount === len) {
|
|
109
|
+
firstValidIndex = i;
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
103
113
|
}
|
|
104
|
-
|
|
114
|
+
let emaValue = validCount > 0 ? initSum / validCount : NaN;
|
|
115
|
+
let emaInitialized = firstValidIndex >= 0;
|
|
105
116
|
for (let i = 0; i < source.length; i++) {
|
|
106
|
-
if (i
|
|
107
|
-
result.push(
|
|
108
|
-
|
|
117
|
+
if (!emaInitialized || i < firstValidIndex) {
|
|
118
|
+
result.push(NaN);
|
|
119
|
+
} else if (i === firstValidIndex) {
|
|
120
|
+
result.push(emaValue);
|
|
109
121
|
} else {
|
|
110
|
-
|
|
111
|
-
|
|
122
|
+
const val = source[i];
|
|
123
|
+
if (val !== void 0 && !isNaN(val)) {
|
|
124
|
+
emaValue = (val - emaValue) * multiplier + emaValue;
|
|
125
|
+
}
|
|
126
|
+
result.push(emaValue);
|
|
112
127
|
}
|
|
113
128
|
}
|
|
114
129
|
return result;
|
|
@@ -150,12 +165,12 @@ function macd(source, fastLength, slowLength, signalLength) {
|
|
|
150
165
|
}
|
|
151
166
|
function bb(series, length2, mult2) {
|
|
152
167
|
const basis = sma(series, length2);
|
|
153
|
-
const
|
|
168
|
+
const dev3 = stdev(series, length2);
|
|
154
169
|
const upper2 = [];
|
|
155
170
|
const lower2 = [];
|
|
156
171
|
for (let i = 0; i < series.length; i++) {
|
|
157
|
-
upper2.push(basis[i] + mult2 *
|
|
158
|
-
lower2.push(basis[i] - mult2 *
|
|
172
|
+
upper2.push(basis[i] + mult2 * dev3[i]);
|
|
173
|
+
lower2.push(basis[i] - mult2 * dev3[i]);
|
|
159
174
|
}
|
|
160
175
|
return [basis, upper2, lower2];
|
|
161
176
|
}
|
|
@@ -359,13 +374,13 @@ function highest(source, length2) {
|
|
|
359
374
|
if (i < length2 - 1) {
|
|
360
375
|
result.push(NaN);
|
|
361
376
|
} else {
|
|
362
|
-
let
|
|
377
|
+
let max6 = -Infinity;
|
|
363
378
|
for (let j = 0; j < length2; j++) {
|
|
364
379
|
if (!isNaN(source[i - j])) {
|
|
365
|
-
|
|
380
|
+
max6 = Math.max(max6, source[i - j]);
|
|
366
381
|
}
|
|
367
382
|
}
|
|
368
|
-
result.push(
|
|
383
|
+
result.push(max6 === -Infinity ? NaN : max6);
|
|
369
384
|
}
|
|
370
385
|
}
|
|
371
386
|
return result;
|
|
@@ -376,13 +391,13 @@ function lowest(source, length2) {
|
|
|
376
391
|
if (i < length2 - 1) {
|
|
377
392
|
result.push(NaN);
|
|
378
393
|
} else {
|
|
379
|
-
let
|
|
394
|
+
let min6 = Infinity;
|
|
380
395
|
for (let j = 0; j < length2; j++) {
|
|
381
396
|
if (!isNaN(source[i - j])) {
|
|
382
|
-
|
|
397
|
+
min6 = Math.min(min6, source[i - j]);
|
|
383
398
|
}
|
|
384
399
|
}
|
|
385
|
-
result.push(
|
|
400
|
+
result.push(min6 === Infinity ? NaN : min6);
|
|
386
401
|
}
|
|
387
402
|
}
|
|
388
403
|
return result;
|
|
@@ -648,10 +663,10 @@ function correlation(source1, source2, length2) {
|
|
|
648
663
|
let sum2Sq = 0;
|
|
649
664
|
for (const [v1, v2] of pairs) {
|
|
650
665
|
const dev1 = v1 - mean1;
|
|
651
|
-
const
|
|
652
|
-
numerator += dev1 *
|
|
666
|
+
const dev22 = v2 - mean2;
|
|
667
|
+
numerator += dev1 * dev22;
|
|
653
668
|
sum1Sq += dev1 * dev1;
|
|
654
|
-
sum2Sq +=
|
|
669
|
+
sum2Sq += dev22 * dev22;
|
|
655
670
|
}
|
|
656
671
|
const denominator = Math.sqrt(sum1Sq * sum2Sq);
|
|
657
672
|
if (denominator === 0) {
|
|
@@ -716,11 +731,11 @@ function stoch(source, high, low, length2) {
|
|
|
716
731
|
if (isNaN(lowestValues[i]) || isNaN(highestValues[i])) {
|
|
717
732
|
result.push(NaN);
|
|
718
733
|
} else {
|
|
719
|
-
const
|
|
720
|
-
if (
|
|
734
|
+
const range4 = highestValues[i] - lowestValues[i];
|
|
735
|
+
if (range4 === 0) {
|
|
721
736
|
result.push(NaN);
|
|
722
737
|
} else {
|
|
723
|
-
const stochValue = 100 * (source[i] - lowestValues[i]) /
|
|
738
|
+
const stochValue = 100 * (source[i] - lowestValues[i]) / range4;
|
|
724
739
|
result.push(stochValue);
|
|
725
740
|
}
|
|
726
741
|
}
|
|
@@ -787,7 +802,7 @@ function hma(source, length2) {
|
|
|
787
802
|
}
|
|
788
803
|
return wma(diff2, sqrtLength);
|
|
789
804
|
}
|
|
790
|
-
function sar(start, inc,
|
|
805
|
+
function sar(start, inc, max6, high, low, close) {
|
|
791
806
|
if (!high || !low || !close) {
|
|
792
807
|
throw new Error(
|
|
793
808
|
"ta.sar() requires high, low, and close series. Either pass them explicitly or use createContext({ chart: { high, low, close } }) for implicit data."
|
|
@@ -839,12 +854,12 @@ function sar(start, inc, max5, high, low, close) {
|
|
|
839
854
|
if (isUpTrend) {
|
|
840
855
|
if (high[i] > extremePoint) {
|
|
841
856
|
extremePoint = high[i];
|
|
842
|
-
acceleration = Math.min(acceleration + inc,
|
|
857
|
+
acceleration = Math.min(acceleration + inc, max6);
|
|
843
858
|
}
|
|
844
859
|
} else {
|
|
845
860
|
if (low[i] < extremePoint) {
|
|
846
861
|
extremePoint = low[i];
|
|
847
|
-
acceleration = Math.min(acceleration + inc,
|
|
862
|
+
acceleration = Math.min(acceleration + inc, max6);
|
|
848
863
|
}
|
|
849
864
|
}
|
|
850
865
|
}
|
|
@@ -1080,22 +1095,22 @@ function cmo(source, length2) {
|
|
|
1080
1095
|
}
|
|
1081
1096
|
function kc(source, length2, mult2, useTrueRange = true, high, low, close) {
|
|
1082
1097
|
const middle = ema(source, length2);
|
|
1083
|
-
let
|
|
1098
|
+
let range4;
|
|
1084
1099
|
if (useTrueRange) {
|
|
1085
1100
|
if (!high || !low || !close) {
|
|
1086
1101
|
throw new Error("ta.kc() with useTrueRange=true requires high, low, and close data");
|
|
1087
1102
|
}
|
|
1088
|
-
|
|
1103
|
+
range4 = tr(false, high, low, close);
|
|
1089
1104
|
} else {
|
|
1090
1105
|
if (!high || !low) {
|
|
1091
1106
|
throw new Error("ta.kc() requires high and low data");
|
|
1092
1107
|
}
|
|
1093
|
-
|
|
1108
|
+
range4 = [];
|
|
1094
1109
|
for (let i = 0; i < high.length; i++) {
|
|
1095
|
-
|
|
1110
|
+
range4.push(high[i] - low[i]);
|
|
1096
1111
|
}
|
|
1097
1112
|
}
|
|
1098
|
-
const rangeEma = ema(
|
|
1113
|
+
const rangeEma = ema(range4, length2);
|
|
1099
1114
|
const upper2 = [];
|
|
1100
1115
|
const lower2 = [];
|
|
1101
1116
|
for (let i = 0; i < middle.length; i++) {
|
|
@@ -1132,11 +1147,11 @@ function wpr(high, low, close, length2 = 14) {
|
|
|
1132
1147
|
if (low[j] < lowestLow)
|
|
1133
1148
|
lowestLow = low[j];
|
|
1134
1149
|
}
|
|
1135
|
-
const
|
|
1136
|
-
if (
|
|
1150
|
+
const range4 = highestHigh - lowestLow;
|
|
1151
|
+
if (range4 === 0) {
|
|
1137
1152
|
result.push(NaN);
|
|
1138
1153
|
} else {
|
|
1139
|
-
const wprValue = (highestHigh - close[i]) /
|
|
1154
|
+
const wprValue = (highestHigh - close[i]) / range4 * -100;
|
|
1140
1155
|
result.push(wprValue);
|
|
1141
1156
|
}
|
|
1142
1157
|
}
|
|
@@ -1302,8 +1317,8 @@ function cog(source, length2 = 10) {
|
|
|
1302
1317
|
if (denominator === 0) {
|
|
1303
1318
|
result.push(NaN);
|
|
1304
1319
|
} else {
|
|
1305
|
-
const
|
|
1306
|
-
result.push(
|
|
1320
|
+
const cog3 = -1 * (numerator / denominator) + (length2 + 1) / 2;
|
|
1321
|
+
result.push(cog3);
|
|
1307
1322
|
}
|
|
1308
1323
|
}
|
|
1309
1324
|
return result;
|
|
@@ -1565,15 +1580,15 @@ function calculatePivotLevels(type, h, l, c, o) {
|
|
|
1565
1580
|
levels[2] = x / 2 - h;
|
|
1566
1581
|
break;
|
|
1567
1582
|
case "Camarilla":
|
|
1568
|
-
const
|
|
1569
|
-
levels[1] = c +
|
|
1570
|
-
levels[2] = c -
|
|
1571
|
-
levels[3] = c +
|
|
1572
|
-
levels[4] = c -
|
|
1573
|
-
levels[5] = c +
|
|
1574
|
-
levels[6] = c -
|
|
1575
|
-
levels[7] = c +
|
|
1576
|
-
levels[8] = c -
|
|
1583
|
+
const range4 = h - l;
|
|
1584
|
+
levels[1] = c + range4 * 1.1 / 12;
|
|
1585
|
+
levels[2] = c - range4 * 1.1 / 12;
|
|
1586
|
+
levels[3] = c + range4 * 1.1 / 6;
|
|
1587
|
+
levels[4] = c - range4 * 1.1 / 6;
|
|
1588
|
+
levels[5] = c + range4 * 1.1 / 4;
|
|
1589
|
+
levels[6] = c - range4 * 1.1 / 4;
|
|
1590
|
+
levels[7] = c + range4 * 1.1 / 2;
|
|
1591
|
+
levels[8] = c - range4 * 1.1 / 2;
|
|
1577
1592
|
levels[9] = h;
|
|
1578
1593
|
levels[10] = l;
|
|
1579
1594
|
break;
|
|
@@ -2657,10 +2672,10 @@ function todegrees(radians) {
|
|
|
2657
2672
|
}
|
|
2658
2673
|
return radians * (180 / Math.PI);
|
|
2659
2674
|
}
|
|
2660
|
-
function random(
|
|
2675
|
+
function random(min6, max6, _seed) {
|
|
2661
2676
|
const rand = Math.random();
|
|
2662
|
-
if (
|
|
2663
|
-
return
|
|
2677
|
+
if (min6 !== void 0 && max6 !== void 0) {
|
|
2678
|
+
return min6 + rand * (max6 - min6);
|
|
2664
2679
|
}
|
|
2665
2680
|
return rand;
|
|
2666
2681
|
}
|
|
@@ -2872,16 +2887,16 @@ function median2(id) {
|
|
|
2872
2887
|
function mode2(id) {
|
|
2873
2888
|
const frequency = /* @__PURE__ */ new Map();
|
|
2874
2889
|
let maxFreq = 0;
|
|
2875
|
-
let
|
|
2890
|
+
let mode5 = id[0];
|
|
2876
2891
|
for (const val of id) {
|
|
2877
2892
|
const freq = (frequency.get(val) || 0) + 1;
|
|
2878
2893
|
frequency.set(val, freq);
|
|
2879
2894
|
if (freq > maxFreq) {
|
|
2880
2895
|
maxFreq = freq;
|
|
2881
|
-
|
|
2896
|
+
mode5 = val;
|
|
2882
2897
|
}
|
|
2883
2898
|
}
|
|
2884
|
-
return
|
|
2899
|
+
return mode5;
|
|
2885
2900
|
}
|
|
2886
2901
|
function stdev2(id) {
|
|
2887
2902
|
const mean = avg2(id);
|
|
@@ -3097,6 +3112,7 @@ __export(str_exports, {
|
|
|
3097
3112
|
lower: () => lower,
|
|
3098
3113
|
match: () => match,
|
|
3099
3114
|
pos: () => pos,
|
|
3115
|
+
repeat: () => repeat,
|
|
3100
3116
|
replace: () => replace,
|
|
3101
3117
|
replace_all: () => replace_all,
|
|
3102
3118
|
split: () => split,
|
|
@@ -3182,6 +3198,13 @@ function trimRight(str) {
|
|
|
3182
3198
|
function match(source, regex) {
|
|
3183
3199
|
return new RegExp(regex).test(source);
|
|
3184
3200
|
}
|
|
3201
|
+
function repeat(source, count, separator = "") {
|
|
3202
|
+
if (source == null)
|
|
3203
|
+
return null;
|
|
3204
|
+
if (count <= 0)
|
|
3205
|
+
return "";
|
|
3206
|
+
return Array(count).fill(source).join(separator);
|
|
3207
|
+
}
|
|
3185
3208
|
function format_time(time, format2) {
|
|
3186
3209
|
const date = new Date(time);
|
|
3187
3210
|
const monthNames = [
|
|
@@ -5124,21 +5147,45 @@ var ta_series_exports = {};
|
|
|
5124
5147
|
__export(ta_series_exports, {
|
|
5125
5148
|
alma: () => alma2,
|
|
5126
5149
|
atr: () => atr2,
|
|
5150
|
+
barssince: () => barssince2,
|
|
5127
5151
|
bb: () => bb2,
|
|
5152
|
+
bbw: () => bbw2,
|
|
5128
5153
|
cci: () => cci2,
|
|
5129
5154
|
change: () => change2,
|
|
5155
|
+
cmo: () => cmo2,
|
|
5156
|
+
cog: () => cog2,
|
|
5157
|
+
correlation: () => correlation2,
|
|
5130
5158
|
cross: () => cross2,
|
|
5131
5159
|
crossover: () => crossover2,
|
|
5132
5160
|
crossunder: () => crossunder2,
|
|
5133
5161
|
cum: () => cum2,
|
|
5162
|
+
dev: () => dev2,
|
|
5163
|
+
dmi: () => dmi2,
|
|
5134
5164
|
ema: () => ema2,
|
|
5135
5165
|
falling: () => falling2,
|
|
5136
5166
|
highest: () => highest2,
|
|
5167
|
+
highestbars: () => highestbars2,
|
|
5168
|
+
hma: () => hma2,
|
|
5137
5169
|
ichimoku: () => ichimoku2,
|
|
5170
|
+
kc: () => kc2,
|
|
5171
|
+
kcw: () => kcw2,
|
|
5138
5172
|
linreg: () => linreg2,
|
|
5139
5173
|
lowest: () => lowest2,
|
|
5174
|
+
lowestbars: () => lowestbars2,
|
|
5140
5175
|
macd: () => macd2,
|
|
5176
|
+
max: () => max5,
|
|
5177
|
+
median: () => median4,
|
|
5178
|
+
mfi: () => mfi2,
|
|
5179
|
+
min: () => min5,
|
|
5180
|
+
mode: () => mode4,
|
|
5141
5181
|
mom: () => mom2,
|
|
5182
|
+
percentile_linear_interpolation: () => percentile_linear_interpolation3,
|
|
5183
|
+
percentile_nearest_rank: () => percentile_nearest_rank3,
|
|
5184
|
+
percentrank: () => percentrank3,
|
|
5185
|
+
pivothigh: () => pivothigh2,
|
|
5186
|
+
pivotlow: () => pivotlow2,
|
|
5187
|
+
range: () => range3,
|
|
5188
|
+
rci: () => rci2,
|
|
5142
5189
|
rising: () => rising2,
|
|
5143
5190
|
rma: () => rma2,
|
|
5144
5191
|
roc: () => roc2,
|
|
@@ -5148,11 +5195,16 @@ __export(ta_series_exports, {
|
|
|
5148
5195
|
stdev: () => stdev3,
|
|
5149
5196
|
stoch: () => stoch2,
|
|
5150
5197
|
supertrend: () => supertrend2,
|
|
5198
|
+
swma: () => swma2,
|
|
5151
5199
|
ta: () => ta,
|
|
5152
5200
|
tr: () => tr2,
|
|
5201
|
+
tsi: () => tsi2,
|
|
5202
|
+
valuewhen: () => valuewhen2,
|
|
5203
|
+
variance: () => variance3,
|
|
5153
5204
|
vwap: () => vwap2,
|
|
5154
5205
|
vwma: () => vwma2,
|
|
5155
5206
|
wma: () => wma2,
|
|
5207
|
+
wpr: () => wpr2,
|
|
5156
5208
|
zigzag: () => zigzag2
|
|
5157
5209
|
});
|
|
5158
5210
|
function sma2(source, length2) {
|
|
@@ -5384,11 +5436,174 @@ function cci2(source, length2) {
|
|
|
5384
5436
|
const result = cci(sourceValues, length2);
|
|
5385
5437
|
return Series.fromArray(bars, result);
|
|
5386
5438
|
}
|
|
5387
|
-
function sar2(bars, start = 0.02, inc = 0.02,
|
|
5439
|
+
function sar2(bars, start = 0.02, inc = 0.02, max6 = 0.2) {
|
|
5440
|
+
const high = bars.map((b2) => b2.high);
|
|
5441
|
+
const low = bars.map((b2) => b2.low);
|
|
5442
|
+
const close = bars.map((b2) => b2.close);
|
|
5443
|
+
const result = sar(start, inc, max6, high, low, close);
|
|
5444
|
+
return Series.fromArray(bars, result);
|
|
5445
|
+
}
|
|
5446
|
+
function dev2(source, length2) {
|
|
5447
|
+
const bars = source.bars;
|
|
5448
|
+
const result = dev(source.toArray(), length2);
|
|
5449
|
+
return Series.fromArray(bars, result);
|
|
5450
|
+
}
|
|
5451
|
+
function variance3(source, length2, biased = true) {
|
|
5452
|
+
const bars = source.bars;
|
|
5453
|
+
const result = variance(source.toArray(), length2, biased);
|
|
5454
|
+
return Series.fromArray(bars, result);
|
|
5455
|
+
}
|
|
5456
|
+
function median4(source, length2) {
|
|
5457
|
+
const bars = source.bars;
|
|
5458
|
+
const result = median(source.toArray(), length2);
|
|
5459
|
+
return Series.fromArray(bars, result);
|
|
5460
|
+
}
|
|
5461
|
+
function swma2(source) {
|
|
5462
|
+
const bars = source.bars;
|
|
5463
|
+
const result = swma(source.toArray());
|
|
5464
|
+
return Series.fromArray(bars, result);
|
|
5465
|
+
}
|
|
5466
|
+
function correlation2(source1, source2, length2) {
|
|
5467
|
+
const bars = source1.bars;
|
|
5468
|
+
const result = correlation(source1.toArray(), source2.toArray(), length2);
|
|
5469
|
+
return Series.fromArray(bars, result);
|
|
5470
|
+
}
|
|
5471
|
+
function percentrank3(source, length2) {
|
|
5472
|
+
const bars = source.bars;
|
|
5473
|
+
const result = percentrank(source.toArray(), length2);
|
|
5474
|
+
return Series.fromArray(bars, result);
|
|
5475
|
+
}
|
|
5476
|
+
function mfi2(source, length2, volume) {
|
|
5477
|
+
const bars = source.bars;
|
|
5478
|
+
const result = mfi(source.toArray(), length2, volume.toArray());
|
|
5479
|
+
return Series.fromArray(bars, result);
|
|
5480
|
+
}
|
|
5481
|
+
function hma2(source, length2) {
|
|
5482
|
+
const bars = source.bars;
|
|
5483
|
+
const result = hma(source.toArray(), length2);
|
|
5484
|
+
return Series.fromArray(bars, result);
|
|
5485
|
+
}
|
|
5486
|
+
function pivothigh2(source, leftbars, rightbars) {
|
|
5487
|
+
const bars = source.bars;
|
|
5488
|
+
const result = pivothigh(source.toArray(), leftbars, rightbars);
|
|
5489
|
+
return Series.fromArray(bars, result);
|
|
5490
|
+
}
|
|
5491
|
+
function pivotlow2(source, leftbars, rightbars) {
|
|
5492
|
+
const bars = source.bars;
|
|
5493
|
+
const result = pivotlow(source.toArray(), leftbars, rightbars);
|
|
5494
|
+
return Series.fromArray(bars, result);
|
|
5495
|
+
}
|
|
5496
|
+
function barssince2(condition) {
|
|
5497
|
+
const bars = condition.bars;
|
|
5498
|
+
const boolValues = condition.toArray().map((v) => v === 1);
|
|
5499
|
+
const result = barssince(boolValues);
|
|
5500
|
+
return Series.fromArray(bars, result);
|
|
5501
|
+
}
|
|
5502
|
+
function valuewhen2(condition, source, occurrence) {
|
|
5503
|
+
const bars = condition.bars;
|
|
5504
|
+
const boolValues = condition.toArray().map((v) => v === 1);
|
|
5505
|
+
const result = valuewhen(boolValues, source.toArray(), occurrence);
|
|
5506
|
+
return Series.fromArray(bars, result);
|
|
5507
|
+
}
|
|
5508
|
+
function dmi2(bars, diLength, adxSmoothing) {
|
|
5388
5509
|
const high = bars.map((b2) => b2.high);
|
|
5389
5510
|
const low = bars.map((b2) => b2.low);
|
|
5390
5511
|
const close = bars.map((b2) => b2.close);
|
|
5391
|
-
const
|
|
5512
|
+
const [plusDI, minusDI, adx] = dmi(diLength, adxSmoothing, high, low, close);
|
|
5513
|
+
return [
|
|
5514
|
+
Series.fromArray(bars, plusDI),
|
|
5515
|
+
Series.fromArray(bars, minusDI),
|
|
5516
|
+
Series.fromArray(bars, adx)
|
|
5517
|
+
];
|
|
5518
|
+
}
|
|
5519
|
+
function tsi2(source, shortLength, longLength) {
|
|
5520
|
+
const bars = source.bars;
|
|
5521
|
+
const result = tsi(source.toArray(), shortLength, longLength);
|
|
5522
|
+
return Series.fromArray(bars, result);
|
|
5523
|
+
}
|
|
5524
|
+
function cmo2(source, length2) {
|
|
5525
|
+
const bars = source.bars;
|
|
5526
|
+
const result = cmo(source.toArray(), length2);
|
|
5527
|
+
return Series.fromArray(bars, result);
|
|
5528
|
+
}
|
|
5529
|
+
function kc2(bars, source, length2, mult2, useTrueRange = true) {
|
|
5530
|
+
const high = bars.map((b2) => b2.high);
|
|
5531
|
+
const low = bars.map((b2) => b2.low);
|
|
5532
|
+
const close = bars.map((b2) => b2.close);
|
|
5533
|
+
const [middle, upper2, lower2] = kc(source.toArray(), length2, mult2, useTrueRange, high, low, close);
|
|
5534
|
+
return [
|
|
5535
|
+
Series.fromArray(bars, middle),
|
|
5536
|
+
Series.fromArray(bars, upper2),
|
|
5537
|
+
Series.fromArray(bars, lower2)
|
|
5538
|
+
];
|
|
5539
|
+
}
|
|
5540
|
+
function bbw2(source, length2, mult2) {
|
|
5541
|
+
const bars = source.bars;
|
|
5542
|
+
const result = bbw(source.toArray(), length2, mult2);
|
|
5543
|
+
return Series.fromArray(bars, result);
|
|
5544
|
+
}
|
|
5545
|
+
function wpr2(bars, length2 = 14) {
|
|
5546
|
+
const high = bars.map((b2) => b2.high);
|
|
5547
|
+
const low = bars.map((b2) => b2.low);
|
|
5548
|
+
const close = bars.map((b2) => b2.close);
|
|
5549
|
+
const result = wpr(high, low, close, length2);
|
|
5550
|
+
return Series.fromArray(bars, result);
|
|
5551
|
+
}
|
|
5552
|
+
function kcw2(bars, source, length2 = 20, mult2 = 2, useTrueRange = true) {
|
|
5553
|
+
const high = bars.map((b2) => b2.high);
|
|
5554
|
+
const low = bars.map((b2) => b2.low);
|
|
5555
|
+
const close = bars.map((b2) => b2.close);
|
|
5556
|
+
const result = kcw(source.toArray(), length2, mult2, useTrueRange, high, low, close);
|
|
5557
|
+
return Series.fromArray(bars, result);
|
|
5558
|
+
}
|
|
5559
|
+
function range3(high, low) {
|
|
5560
|
+
const bars = high.bars;
|
|
5561
|
+
const result = range(high.toArray(), low.toArray());
|
|
5562
|
+
return Series.fromArray(bars, result);
|
|
5563
|
+
}
|
|
5564
|
+
function highestbars2(source, length2) {
|
|
5565
|
+
const bars = source.bars;
|
|
5566
|
+
const result = highestbars(source.toArray(), length2);
|
|
5567
|
+
return Series.fromArray(bars, result);
|
|
5568
|
+
}
|
|
5569
|
+
function lowestbars2(source, length2) {
|
|
5570
|
+
const bars = source.bars;
|
|
5571
|
+
const result = lowestbars(source.toArray(), length2);
|
|
5572
|
+
return Series.fromArray(bars, result);
|
|
5573
|
+
}
|
|
5574
|
+
function max5(source1, source2) {
|
|
5575
|
+
const bars = source1.bars;
|
|
5576
|
+
const result = max(source1.toArray(), source2.toArray());
|
|
5577
|
+
return Series.fromArray(bars, result);
|
|
5578
|
+
}
|
|
5579
|
+
function min5(source1, source2) {
|
|
5580
|
+
const bars = source1.bars;
|
|
5581
|
+
const result = min(source1.toArray(), source2.toArray());
|
|
5582
|
+
return Series.fromArray(bars, result);
|
|
5583
|
+
}
|
|
5584
|
+
function cog2(source, length2 = 10) {
|
|
5585
|
+
const bars = source.bars;
|
|
5586
|
+
const result = cog(source.toArray(), length2);
|
|
5587
|
+
return Series.fromArray(bars, result);
|
|
5588
|
+
}
|
|
5589
|
+
function mode4(source, length2) {
|
|
5590
|
+
const bars = source.bars;
|
|
5591
|
+
const result = mode(source.toArray(), length2);
|
|
5592
|
+
return Series.fromArray(bars, result);
|
|
5593
|
+
}
|
|
5594
|
+
function percentile_linear_interpolation3(source, length2, percentage) {
|
|
5595
|
+
const bars = source.bars;
|
|
5596
|
+
const result = percentile_linear_interpolation(source.toArray(), length2, percentage);
|
|
5597
|
+
return Series.fromArray(bars, result);
|
|
5598
|
+
}
|
|
5599
|
+
function percentile_nearest_rank3(source, length2, percentage) {
|
|
5600
|
+
const bars = source.bars;
|
|
5601
|
+
const result = percentile_nearest_rank(source.toArray(), length2, percentage);
|
|
5602
|
+
return Series.fromArray(bars, result);
|
|
5603
|
+
}
|
|
5604
|
+
function rci2(source, length2) {
|
|
5605
|
+
const bars = source.bars;
|
|
5606
|
+
const result = rci(source.toArray(), length2);
|
|
5392
5607
|
return Series.fromArray(bars, result);
|
|
5393
5608
|
}
|
|
5394
5609
|
var ta = {
|
|
@@ -5422,7 +5637,36 @@ var ta = {
|
|
|
5422
5637
|
alma: alma2,
|
|
5423
5638
|
zigzag: zigzag2,
|
|
5424
5639
|
cci: cci2,
|
|
5425
|
-
sar: sar2
|
|
5640
|
+
sar: sar2,
|
|
5641
|
+
dev: dev2,
|
|
5642
|
+
variance: variance3,
|
|
5643
|
+
median: median4,
|
|
5644
|
+
swma: swma2,
|
|
5645
|
+
correlation: correlation2,
|
|
5646
|
+
percentrank: percentrank3,
|
|
5647
|
+
mfi: mfi2,
|
|
5648
|
+
hma: hma2,
|
|
5649
|
+
pivothigh: pivothigh2,
|
|
5650
|
+
pivotlow: pivotlow2,
|
|
5651
|
+
barssince: barssince2,
|
|
5652
|
+
valuewhen: valuewhen2,
|
|
5653
|
+
dmi: dmi2,
|
|
5654
|
+
tsi: tsi2,
|
|
5655
|
+
cmo: cmo2,
|
|
5656
|
+
kc: kc2,
|
|
5657
|
+
bbw: bbw2,
|
|
5658
|
+
wpr: wpr2,
|
|
5659
|
+
kcw: kcw2,
|
|
5660
|
+
range: range3,
|
|
5661
|
+
highestbars: highestbars2,
|
|
5662
|
+
lowestbars: lowestbars2,
|
|
5663
|
+
max: max5,
|
|
5664
|
+
min: min5,
|
|
5665
|
+
cog: cog2,
|
|
5666
|
+
mode: mode4,
|
|
5667
|
+
percentile_linear_interpolation: percentile_linear_interpolation3,
|
|
5668
|
+
percentile_nearest_rank: percentile_nearest_rank3,
|
|
5669
|
+
rci: rci2
|
|
5426
5670
|
};
|
|
5427
5671
|
|
|
5428
5672
|
// src/utils/index.ts
|
|
@@ -5637,9 +5881,9 @@ var ZigZag = class {
|
|
|
5637
5881
|
return true;
|
|
5638
5882
|
}
|
|
5639
5883
|
} else {
|
|
5640
|
-
const
|
|
5884
|
+
const dev3 = this.calcDev(last2.end.price, point.price);
|
|
5641
5885
|
const threshold = this.settings.devThreshold;
|
|
5642
|
-
const meetsThreshold = last2.isHigh ?
|
|
5886
|
+
const meetsThreshold = last2.isHigh ? dev3 <= -threshold : dev3 >= threshold;
|
|
5643
5887
|
if (meetsThreshold) {
|
|
5644
5888
|
this.pivots.push({
|
|
5645
5889
|
isHigh,
|
|
@@ -6370,7 +6614,7 @@ var SimpleInputAdapter = class {
|
|
|
6370
6614
|
};
|
|
6371
6615
|
|
|
6372
6616
|
// src/index.ts
|
|
6373
|
-
var VERSION = "0.
|
|
6617
|
+
var VERSION = "0.2.1";
|
|
6374
6618
|
var info = {
|
|
6375
6619
|
name: "OakScriptJS",
|
|
6376
6620
|
version: VERSION,
|
package/dist/str/index.d.ts
CHANGED
|
@@ -19,5 +19,6 @@ export declare function trim(str: simple_string): string;
|
|
|
19
19
|
export declare function trimLeft(str: simple_string): string;
|
|
20
20
|
export declare function trimRight(str: simple_string): string;
|
|
21
21
|
export declare function match(source: simple_string, regex: simple_string): bool;
|
|
22
|
+
export declare function repeat(source: simple_string, count: simple_int, separator?: simple_string): string | null;
|
|
22
23
|
export declare function format_time(time: simple_int, format: simple_string): string;
|
|
23
24
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/str/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/str/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAgBvE,wBAAgB,MAAM,CAAC,GAAG,EAAE,aAAa,GAAG,GAAG,CAE9C;AAuBD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,aAAa,GAAG,MAAM,CAOnE;AAyBD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,aAAa,GAAG,KAAK,GAAG,IAAI,CAGzD;AAwBD,wBAAgB,SAAS,CAAC,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,CAAC,EAAE,UAAU,GAAG,MAAM,CAEzF;AAiBD,wBAAgB,KAAK,CAAC,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,UAAU,EAC7B,WAAW,EAAE,UAAU,EACvB,mBAAmB,EAAE,UAAU,EAC/B,YAAY,EAAE,UAAU,EACxB,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,GACZ,CAAC,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,CAAC,CAmExE;AAwCD,wBAAgB,MAAM,CACpB,SAAS,GAAE,YAAkB,EAC7B,KAAK,GAAE,UAAe,EACtB,QAAQ,GAAE,UAAc,EACxB,MAAM,CAAC,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,MAAM,EACb,GAAG,CAAC,EAAE,MAAM,GACX,CAAC,YAAY,EAAE,UAAU,EAAE,WAAW,CAAC,CAwNzC"}
|
package/dist/ta-series.d.ts
CHANGED
|
@@ -31,6 +31,35 @@ export declare function alma(source: Series, length?: number, offset?: number, s
|
|
|
31
31
|
export declare function zigzag(bars: Bar[], deviation?: number, depth?: number, backstep?: number): [Series, Series, Series];
|
|
32
32
|
export declare function cci(source: Series, length: number): Series;
|
|
33
33
|
export declare function sar(bars: Bar[], start?: number, inc?: number, max?: number): Series;
|
|
34
|
+
export declare function dev(source: Series, length: number): Series;
|
|
35
|
+
export declare function variance(source: Series, length: number, biased?: boolean): Series;
|
|
36
|
+
export declare function median(source: Series, length: number): Series;
|
|
37
|
+
export declare function swma(source: Series): Series;
|
|
38
|
+
export declare function correlation(source1: Series, source2: Series, length: number): Series;
|
|
39
|
+
export declare function percentrank(source: Series, length: number): Series;
|
|
40
|
+
export declare function mfi(source: Series, length: number, volume: Series): Series;
|
|
41
|
+
export declare function hma(source: Series, length: number): Series;
|
|
42
|
+
export declare function pivothigh(source: Series, leftbars: number, rightbars: number): Series;
|
|
43
|
+
export declare function pivotlow(source: Series, leftbars: number, rightbars: number): Series;
|
|
44
|
+
export declare function barssince(condition: Series): Series;
|
|
45
|
+
export declare function valuewhen(condition: Series, source: Series, occurrence: number): Series;
|
|
46
|
+
export declare function dmi(bars: Bar[], diLength: number, adxSmoothing: number): [Series, Series, Series];
|
|
47
|
+
export declare function tsi(source: Series, shortLength: number, longLength: number): Series;
|
|
48
|
+
export declare function cmo(source: Series, length: number): Series;
|
|
49
|
+
export declare function kc(bars: Bar[], source: Series, length: number, mult: number, useTrueRange?: boolean): [Series, Series, Series];
|
|
50
|
+
export declare function bbw(source: Series, length: number, mult: number): Series;
|
|
51
|
+
export declare function wpr(bars: Bar[], length?: number): Series;
|
|
52
|
+
export declare function kcw(bars: Bar[], source: Series, length?: number, mult?: number, useTrueRange?: boolean): Series;
|
|
53
|
+
export declare function range(high: Series, low: Series): Series;
|
|
54
|
+
export declare function highestbars(source: Series, length: number): Series;
|
|
55
|
+
export declare function lowestbars(source: Series, length: number): Series;
|
|
56
|
+
export declare function max(source1: Series, source2: Series): Series;
|
|
57
|
+
export declare function min(source1: Series, source2: Series): Series;
|
|
58
|
+
export declare function cog(source: Series, length?: number): Series;
|
|
59
|
+
export declare function mode(source: Series, length: number): Series;
|
|
60
|
+
export declare function percentile_linear_interpolation(source: Series, length: number, percentage: number): Series;
|
|
61
|
+
export declare function percentile_nearest_rank(source: Series, length: number, percentage: number): Series;
|
|
62
|
+
export declare function rci(source: Series, length: number): Series;
|
|
34
63
|
export declare const ta: {
|
|
35
64
|
sma: typeof sma;
|
|
36
65
|
ema: typeof ema;
|
|
@@ -63,5 +92,34 @@ export declare const ta: {
|
|
|
63
92
|
zigzag: typeof zigzag;
|
|
64
93
|
cci: typeof cci;
|
|
65
94
|
sar: typeof sar;
|
|
95
|
+
dev: typeof dev;
|
|
96
|
+
variance: typeof variance;
|
|
97
|
+
median: typeof median;
|
|
98
|
+
swma: typeof swma;
|
|
99
|
+
correlation: typeof correlation;
|
|
100
|
+
percentrank: typeof percentrank;
|
|
101
|
+
mfi: typeof mfi;
|
|
102
|
+
hma: typeof hma;
|
|
103
|
+
pivothigh: typeof pivothigh;
|
|
104
|
+
pivotlow: typeof pivotlow;
|
|
105
|
+
barssince: typeof barssince;
|
|
106
|
+
valuewhen: typeof valuewhen;
|
|
107
|
+
dmi: typeof dmi;
|
|
108
|
+
tsi: typeof tsi;
|
|
109
|
+
cmo: typeof cmo;
|
|
110
|
+
kc: typeof kc;
|
|
111
|
+
bbw: typeof bbw;
|
|
112
|
+
wpr: typeof wpr;
|
|
113
|
+
kcw: typeof kcw;
|
|
114
|
+
range: typeof range;
|
|
115
|
+
highestbars: typeof highestbars;
|
|
116
|
+
lowestbars: typeof lowestbars;
|
|
117
|
+
max: typeof max;
|
|
118
|
+
min: typeof min;
|
|
119
|
+
cog: typeof cog;
|
|
120
|
+
mode: typeof mode;
|
|
121
|
+
percentile_linear_interpolation: typeof percentile_linear_interpolation;
|
|
122
|
+
percentile_nearest_rank: typeof percentile_nearest_rank;
|
|
123
|
+
rci: typeof rci;
|
|
66
124
|
};
|
|
67
125
|
//# sourceMappingURL=ta-series.d.ts.map
|
package/dist/ta-series.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ta-series.d.ts","sourceRoot":"","sources":["../src/ta-series.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAQnC,wBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAK1D;AAQD,wBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAK1D;AAQD,wBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAK1D;AAQD,wBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAK1D;AAQD,wBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG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