oakscriptjs 0.8.0 → 0.8.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 +1 -1
- package/dist/array/index.d.ts.map +1 -1
- package/dist/callsite/index.d.ts +1 -0
- package/dist/callsite/index.d.ts.map +1 -1
- package/dist/color/index.d.ts +4 -4
- package/dist/color/index.d.ts.map +1 -1
- package/dist/index.cjs +95 -132
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +95 -132
- package/dist/runtime/index.cjs +1 -1
- package/dist/runtime/index.mjs +1 -1
- package/dist/runtime/types.d.ts +17 -1
- package/dist/runtime/types.d.ts.map +1 -1
- package/dist/script/index.cjs +185 -138
- package/dist/script/index.d.ts +67 -16
- package/dist/script/index.d.ts.map +1 -1
- package/dist/script/index.mjs +185 -138
- package/dist/strategy/index.d.ts.map +1 -1
- package/dist/ta/index.d.ts.map +1 -1
- package/dist/types/metadata.d.ts +9 -1
- package/dist/types/metadata.d.ts.map +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
<h1 align="center">OakScriptJS</h1>
|
|
6
6
|
|
|
7
|
-
OakScriptJS is a TypeScript/JavaScript library that provides PineScript v6 compatible technical analysis functions. Build trading indicators,
|
|
7
|
+
OakScriptJS is a TypeScript/JavaScript library that provides PineScript v6 compatible technical analysis functions. Build trading indicators, write strategy logic for a backtesting engine of your choice (OakScriptJS does not fill orders), or integrate TA calculations into any JavaScript environment.
|
|
8
8
|
|
|
9
9
|
## Quick Start
|
|
10
10
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/array/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE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,GAAG,MAAc,GAAG,SAAS,CAAC,GAAG,CAAC,CAchG;AAyBD,wBAAgB,WAAW,CAAC,EAAE,EAAE,SAAS,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,CAelE;AAyBD,wBAAgB,OAAO,CAAC,CAAC,EAAE,IAAI,GAAE,UAAc,EAAE,aAAa,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAIhF"}
|
package/dist/callsite/index.d.ts
CHANGED
|
@@ -2,5 +2,6 @@ import type { Source } from '../types';
|
|
|
2
2
|
export declare function whenCalled<T extends number | boolean>(called: ArrayLike<boolean | number>, fn: (...values: number[][]) => ArrayLike<T>, ...sources: Source[]): Array<T | number>;
|
|
3
3
|
export declare function crossover(): (a: number, b: number) => boolean;
|
|
4
4
|
export declare function crossunder(): (a: number, b: number) => boolean;
|
|
5
|
+
export declare function barssince(): (condition: boolean | number) => number;
|
|
5
6
|
export declare function cross(): (a: number, b: number) => boolean;
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/callsite/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/callsite/index.ts"],"names":[],"mappings":"AAuCA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAWvC,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,GAAG,OAAO,EACnD,MAAM,EAAE,SAAS,CAAC,OAAO,GAAG,MAAM,CAAC,EACnC,EAAE,EAAE,CAAC,GAAG,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,EAC3C,GAAG,OAAO,EAAE,MAAM,EAAE,GACnB,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,CASnB;AAeD,wBAAgB,SAAS,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,OAAO,CAE7D;AAGD,wBAAgB,UAAU,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,OAAO,CAE9D;AAMD,wBAAgB,SAAS,IAAI,CAAC,SAAS,EAAE,OAAO,GAAG,MAAM,KAAK,MAAM,CAOnE;AAGD,wBAAgB,KAAK,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,OAAO,CAEzD"}
|
package/dist/color/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { color, int, float, simple_int, simple_float } from '../types';
|
|
2
|
-
export declare function rgb(red: simple_int, green: simple_int, blue: simple_int, transp?: simple_float):
|
|
3
|
-
export declare function from_hex(hex: string, transp?: simple_float):
|
|
4
|
-
export declare function new_color(baseColor: color, transp: simple_float):
|
|
2
|
+
export declare function rgb(red: simple_int, green: simple_int, blue: simple_int, transp?: simple_float): string;
|
|
3
|
+
export declare function from_hex(hex: string, transp?: simple_float): string;
|
|
4
|
+
export declare function new_color(baseColor: color, transp: simple_float): string;
|
|
5
5
|
export declare function r(clr: color): int;
|
|
6
6
|
export declare function g(clr: color): int;
|
|
7
7
|
export declare function b(clr: color): int;
|
|
@@ -23,6 +23,6 @@ export declare const silver = "#B2B5BE";
|
|
|
23
23
|
export declare const teal = "#089981";
|
|
24
24
|
export declare const white = "#FFFFFF";
|
|
25
25
|
export declare const yellow = "#FDD835";
|
|
26
|
-
export declare function from_gradient(value: float, bottom_value: float, top_value: float, bottom_color: color, top_color: color):
|
|
26
|
+
export declare function from_gradient(value: float, bottom_value: float, top_value: float, bottom_color: color, top_color: color): string;
|
|
27
27
|
export { new_color as new };
|
|
28
28
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/color/index.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,KAAK,EAA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AAY,CAAC;AAMhC,eAAO,MAAM,MAAM,YAAY,CAAC;AAMhC,eAAO,MAAM,GAAG,YAAY,CAAC;AAM7B,eAAO,MAAM,MAAM,YAAY,CAAC;AAMhC,eAAO,MAAM,IAAI,YAAY,CAAC;AAM9B,eAAO,MAAM,KAAK,YAAY,CAAC;AAM/B,eAAO,MAAM,MAAM,YAAY,CAAC;AAmChC,wBAAgB,aAAa,CAC3B,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,KAAK,EACnB,SAAS,EAAE,KAAK,EAChB,YAAY,EAAE,KAAK,EACnB,SAAS,EAAE,KAAK,GACf,MAAM,CAqBR;AAmBD,OAAO,EAAE,SAAS,IAAI,GAAG,EAAE,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -241,7 +241,7 @@ function sma(source, length2) {
|
|
|
241
241
|
const window = [];
|
|
242
242
|
for (let i = 0; i < source.length; i++) {
|
|
243
243
|
const v = source[i];
|
|
244
|
-
if (v !== void 0 && v !== null &&
|
|
244
|
+
if (v !== void 0 && v !== null && Number.isFinite(v)) {
|
|
245
245
|
window.push(v);
|
|
246
246
|
if (window.length > len) window.shift();
|
|
247
247
|
}
|
|
@@ -585,7 +585,7 @@ function lowest(source, length2) {
|
|
|
585
585
|
function cum(source) {
|
|
586
586
|
let sum4 = 0;
|
|
587
587
|
return source.map((v) => {
|
|
588
|
-
if (Number.
|
|
588
|
+
if (!Number.isFinite(v)) return NaN;
|
|
589
589
|
sum4 += v;
|
|
590
590
|
return sum4;
|
|
591
591
|
});
|
|
@@ -603,41 +603,24 @@ function cross(source1, source2) {
|
|
|
603
603
|
}
|
|
604
604
|
return result;
|
|
605
605
|
}
|
|
606
|
-
function
|
|
606
|
+
function monotonic(source, length2, step) {
|
|
607
607
|
const result = [];
|
|
608
|
+
const values2 = [];
|
|
608
609
|
for (let i = 0; i < source.length; i++) {
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
isRising = false;
|
|
616
|
-
break;
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
result.push(isRising);
|
|
620
|
-
}
|
|
610
|
+
const v = source[i];
|
|
611
|
+
if (!Number.isNaN(v)) values2.push(v);
|
|
612
|
+
const n = values2.length;
|
|
613
|
+
let ok = n > length2;
|
|
614
|
+
for (let j = 1; ok && j <= length2; j++) ok = step(values2[n - j], values2[n - j - 1]);
|
|
615
|
+
result.push(ok);
|
|
621
616
|
}
|
|
622
617
|
return result;
|
|
623
618
|
}
|
|
619
|
+
function rising(source, length2) {
|
|
620
|
+
return monotonic(source, length2, gt);
|
|
621
|
+
}
|
|
624
622
|
function falling(source, length2) {
|
|
625
|
-
|
|
626
|
-
for (let i = 0; i < source.length; i++) {
|
|
627
|
-
if (i < length2) {
|
|
628
|
-
result.push(false);
|
|
629
|
-
} else {
|
|
630
|
-
let isFalling = true;
|
|
631
|
-
for (let j = 1; j <= length2; j++) {
|
|
632
|
-
if (source[i - j + 1] >= source[i - j]) {
|
|
633
|
-
isFalling = false;
|
|
634
|
-
break;
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
|
-
result.push(isFalling);
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
return result;
|
|
623
|
+
return monotonic(source, length2, lt);
|
|
641
624
|
}
|
|
642
625
|
function roc(source, length2) {
|
|
643
626
|
const result = [];
|
|
@@ -861,33 +844,16 @@ function correlation(source1, source2, length2) {
|
|
|
861
844
|
function percentrank(source, length2) {
|
|
862
845
|
const result = [];
|
|
863
846
|
for (let i = 0; i < source.length; i++) {
|
|
864
|
-
|
|
847
|
+
const currentValue = source[i];
|
|
848
|
+
if (i < length2 || Number.isNaN(currentValue)) {
|
|
865
849
|
result.push(NaN);
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
let hasNaN = false;
|
|
872
|
-
for (let j = 1; j <= length2; j++) {
|
|
873
|
-
if (isNaN(source[i - j])) {
|
|
874
|
-
hasNaN = true;
|
|
875
|
-
break;
|
|
876
|
-
}
|
|
877
|
-
}
|
|
878
|
-
if (hasNaN) {
|
|
879
|
-
result.push(NaN);
|
|
880
|
-
} else {
|
|
881
|
-
const currentValue = source[i];
|
|
882
|
-
let countLessOrEqual = 0;
|
|
883
|
-
for (let j = 1; j <= length2; j++) {
|
|
884
|
-
if (source[i - j] <= currentValue) {
|
|
885
|
-
countLessOrEqual++;
|
|
886
|
-
}
|
|
887
|
-
}
|
|
888
|
-
result.push(countLessOrEqual / length2 * 100);
|
|
889
|
-
}
|
|
850
|
+
continue;
|
|
851
|
+
}
|
|
852
|
+
let countLessOrEqual = 0;
|
|
853
|
+
for (let j = 1; j <= length2; j++) {
|
|
854
|
+
if (le(source[i - j], currentValue)) countLessOrEqual++;
|
|
890
855
|
}
|
|
856
|
+
result.push(countLessOrEqual / length2 * 100);
|
|
891
857
|
}
|
|
892
858
|
return result;
|
|
893
859
|
}
|
|
@@ -1414,63 +1380,36 @@ function mode(source, length2) {
|
|
|
1414
1380
|
return result;
|
|
1415
1381
|
}
|
|
1416
1382
|
function percentile_linear_interpolation(source, length2, percentage) {
|
|
1383
|
+
return sortedWindow(source, length2, (s) => {
|
|
1384
|
+
const pos2 = percentage / 100 * length2 - 0.5;
|
|
1385
|
+
if (pos2 <= 0) return s[0];
|
|
1386
|
+
if (pos2 >= length2 - 1) return s[length2 - 1];
|
|
1387
|
+
const lo = Math.floor(pos2);
|
|
1388
|
+
return s[lo] + (pos2 - lo) * (s[lo + 1] - s[lo]);
|
|
1389
|
+
});
|
|
1390
|
+
}
|
|
1391
|
+
function sortedWindow(source, length2, fn) {
|
|
1417
1392
|
const result = [];
|
|
1393
|
+
const values2 = [];
|
|
1394
|
+
const bars = [];
|
|
1418
1395
|
for (let i = 0; i < source.length; i++) {
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
const
|
|
1426
|
-
values2.
|
|
1427
|
-
|
|
1428
|
-
if (values2.some((v) => isNaN(v))) {
|
|
1429
|
-
result.push(NaN);
|
|
1430
|
-
continue;
|
|
1431
|
-
}
|
|
1432
|
-
const sorted = [...values2].sort((a, b2) => a - b2);
|
|
1433
|
-
const position = percentage / 100 * (sorted.length - 1);
|
|
1434
|
-
const lowerIndex = Math.floor(position);
|
|
1435
|
-
const upperIndex = Math.ceil(position);
|
|
1436
|
-
if (lowerIndex === upperIndex) {
|
|
1437
|
-
result.push(sorted[lowerIndex]);
|
|
1438
|
-
} else {
|
|
1439
|
-
const fraction = position - lowerIndex;
|
|
1440
|
-
const interpolated = sorted[lowerIndex] + fraction * (sorted[upperIndex] - sorted[lowerIndex]);
|
|
1441
|
-
result.push(interpolated);
|
|
1396
|
+
const v = source[i];
|
|
1397
|
+
let k = 0;
|
|
1398
|
+
while (k < values2.length && !(values2[k] >= v)) k++;
|
|
1399
|
+
values2.splice(k, 0, v);
|
|
1400
|
+
bars.splice(k, 0, i);
|
|
1401
|
+
if (i >= length2) {
|
|
1402
|
+
const old = bars.indexOf(i - length2);
|
|
1403
|
+
values2.splice(old, 1);
|
|
1404
|
+
bars.splice(old, 1);
|
|
1442
1405
|
}
|
|
1406
|
+
result.push(i < length2 - 1 ? NaN : fn(values2));
|
|
1443
1407
|
}
|
|
1444
1408
|
return result;
|
|
1445
1409
|
}
|
|
1446
1410
|
function percentile_nearest_rank(source, length2, percentage) {
|
|
1447
|
-
const
|
|
1448
|
-
|
|
1449
|
-
if (i < length2 - 1) {
|
|
1450
|
-
result.push(NaN);
|
|
1451
|
-
continue;
|
|
1452
|
-
}
|
|
1453
|
-
const values2 = [];
|
|
1454
|
-
for (let j = 0; j < length2; j++) {
|
|
1455
|
-
const value = source[i - j];
|
|
1456
|
-
if (!isNaN(value)) {
|
|
1457
|
-
values2.push(value);
|
|
1458
|
-
}
|
|
1459
|
-
}
|
|
1460
|
-
if (values2.length === 0) {
|
|
1461
|
-
result.push(NaN);
|
|
1462
|
-
continue;
|
|
1463
|
-
}
|
|
1464
|
-
const sorted = [...values2].sort((a, b2) => a - b2);
|
|
1465
|
-
if (percentage >= 100) {
|
|
1466
|
-
result.push(sorted[sorted.length - 1]);
|
|
1467
|
-
continue;
|
|
1468
|
-
}
|
|
1469
|
-
const rank2 = Math.ceil(percentage / 100 * sorted.length);
|
|
1470
|
-
const index = Math.max(0, rank2 - 1);
|
|
1471
|
-
result.push(sorted[index]);
|
|
1472
|
-
}
|
|
1473
|
-
return result;
|
|
1411
|
+
const rank2 = Math.min(length2, Math.max(1, Math.ceil(percentage / 100 * length2)));
|
|
1412
|
+
return sortedWindow(source, length2, (s) => s[rank2 - 1]);
|
|
1474
1413
|
}
|
|
1475
1414
|
function rci(source, length2) {
|
|
1476
1415
|
const result = [];
|
|
@@ -2188,7 +2127,7 @@ var Series = class _Series {
|
|
|
2188
2127
|
return new _Series(this.dataSource, (bar, i, data) => {
|
|
2189
2128
|
const a = this.extractor(bar, i, data);
|
|
2190
2129
|
const b2 = typeof other === "number" ? other : other.extractor(bar, i, data);
|
|
2191
|
-
return
|
|
2130
|
+
return a / b2;
|
|
2192
2131
|
});
|
|
2193
2132
|
}
|
|
2194
2133
|
/**
|
|
@@ -3195,15 +3134,27 @@ function percentile_linear_interpolation2(id, percentage) {
|
|
|
3195
3134
|
if (id.length === 0) {
|
|
3196
3135
|
return NaN;
|
|
3197
3136
|
}
|
|
3198
|
-
const
|
|
3199
|
-
|
|
3137
|
+
const s = sortedNaLast(id);
|
|
3138
|
+
const n = s.length;
|
|
3139
|
+
const pos2 = percentage / 100 * n - 0.5;
|
|
3140
|
+
if (pos2 <= 0) return s[0];
|
|
3141
|
+
if (pos2 >= n - 1) return s[n - 1];
|
|
3142
|
+
const lo = Math.floor(pos2);
|
|
3143
|
+
const f = pos2 - lo;
|
|
3144
|
+
if (f === 0) return s[lo];
|
|
3145
|
+
return Number.isNaN(s[n - 1]) ? NaN : s[lo] + f * (s[lo + 1] - s[lo]);
|
|
3146
|
+
}
|
|
3147
|
+
function sortedNaLast(id) {
|
|
3148
|
+
const numbers = id.filter((v) => !Number.isNaN(v)).sort((a, b2) => a - b2);
|
|
3149
|
+
return [...numbers, ...Array(id.length - numbers.length).fill(NaN)];
|
|
3200
3150
|
}
|
|
3201
3151
|
function percentile_nearest_rank2(id, percentage) {
|
|
3202
3152
|
if (id.length === 0) {
|
|
3203
3153
|
return NaN;
|
|
3204
3154
|
}
|
|
3205
|
-
const
|
|
3206
|
-
|
|
3155
|
+
const s = sortedNaLast(id);
|
|
3156
|
+
const rank2 = Math.min(s.length, Math.max(1, Math.ceil(percentage / 100 * s.length)));
|
|
3157
|
+
return s[rank2 - 1];
|
|
3207
3158
|
}
|
|
3208
3159
|
function percentrank2(id, index) {
|
|
3209
3160
|
if (id.length === 0 || index < 0 || index >= id.length) {
|
|
@@ -3914,11 +3865,13 @@ __export(color_exports, {
|
|
|
3914
3865
|
white: () => white,
|
|
3915
3866
|
yellow: () => yellow
|
|
3916
3867
|
});
|
|
3868
|
+
var channel = (v) => v === null || v === void 0 || Number.isNaN(v) ? 0 : Math.max(0, Math.min(255, Math.trunc(v)));
|
|
3869
|
+
var alphaOf = (transp) => transp === null || Number.isNaN(transp) ? 0 : 1 - Math.max(0, Math.min(100, transp)) / 100;
|
|
3917
3870
|
function rgb(red2, green2, blue2, transp) {
|
|
3918
|
-
const r2 =
|
|
3919
|
-
const g2 =
|
|
3920
|
-
const b2 =
|
|
3921
|
-
const a = transp !== void 0 ?
|
|
3871
|
+
const r2 = channel(red2);
|
|
3872
|
+
const g2 = channel(green2);
|
|
3873
|
+
const b2 = channel(blue2);
|
|
3874
|
+
const a = transp !== void 0 ? alphaOf(transp) : 1;
|
|
3922
3875
|
if (a === 1) {
|
|
3923
3876
|
return `rgb(${r2}, ${g2}, ${b2})`;
|
|
3924
3877
|
}
|
|
@@ -3945,7 +3898,8 @@ function b(clr) {
|
|
|
3945
3898
|
return parseColor(clr).b;
|
|
3946
3899
|
}
|
|
3947
3900
|
function t(clr) {
|
|
3948
|
-
|
|
3901
|
+
const alpha = Math.round((1 - parseColor(clr).t / 100) * 255);
|
|
3902
|
+
return Math.round((1 - alpha / 255) * 100);
|
|
3949
3903
|
}
|
|
3950
3904
|
function parseColor(clr) {
|
|
3951
3905
|
if (typeof clr === "string") {
|
|
@@ -3998,13 +3952,12 @@ function from_gradient(value, bottom_value, top_value, bottom_color, top_color)
|
|
|
3998
3952
|
};
|
|
3999
3953
|
const c1 = rgba(bottom_color);
|
|
4000
3954
|
const c2 = rgba(top_color);
|
|
4001
|
-
const
|
|
4002
|
-
const w2 = c2.a * k;
|
|
4003
|
-
const a = w1 + w2;
|
|
3955
|
+
const a = c1.a * (1 - k) + c2.a * k;
|
|
4004
3956
|
if (a === 0) return transparent;
|
|
4005
|
-
const mix = (x1, x2) => Math.floor((x1 *
|
|
3957
|
+
const mix = (x1, x2) => Math.floor((x1 / 255 * c1.a * (1 - k) + x2 / 255 * c2.a * k) / (a / 255));
|
|
4006
3958
|
const [r2, g2, b2] = [mix(c1.r, c2.r), mix(c1.g, c2.g), mix(c1.b, c2.b)];
|
|
4007
|
-
|
|
3959
|
+
const alpha = Math.floor(a);
|
|
3960
|
+
return alpha === 255 ? `rgb(${r2}, ${g2}, ${b2})` : `rgba(${r2}, ${g2}, ${b2}, ${alpha / 255})`;
|
|
4008
3961
|
}
|
|
4009
3962
|
|
|
4010
3963
|
// src/time/index.ts
|
|
@@ -6215,6 +6168,7 @@ var format_italic = 2;
|
|
|
6215
6168
|
// src/callsite/index.ts
|
|
6216
6169
|
var callsite_exports = {};
|
|
6217
6170
|
__export(callsite_exports, {
|
|
6171
|
+
barssince: () => barssince2,
|
|
6218
6172
|
cross: () => cross2,
|
|
6219
6173
|
crossover: () => crossover2,
|
|
6220
6174
|
crossunder: () => crossunder2,
|
|
@@ -6246,6 +6200,14 @@ function crossover2() {
|
|
|
6246
6200
|
function crossunder2() {
|
|
6247
6201
|
return twoSeriesSite((a, b2, pa, pb) => a < b2 && pa >= pb);
|
|
6248
6202
|
}
|
|
6203
|
+
function barssince2() {
|
|
6204
|
+
let count = NaN;
|
|
6205
|
+
return (condition) => {
|
|
6206
|
+
if (condition && !Number.isNaN(condition)) count = 0;
|
|
6207
|
+
else if (!Number.isNaN(count)) count++;
|
|
6208
|
+
return count;
|
|
6209
|
+
};
|
|
6210
|
+
}
|
|
6249
6211
|
function cross2() {
|
|
6250
6212
|
return twoSeriesSite((a, b2, pa, pb) => a > b2 && pa <= pb || a < b2 && pa >= pb);
|
|
6251
6213
|
}
|
|
@@ -6256,7 +6218,7 @@ __export(ta_series_exports, {
|
|
|
6256
6218
|
accdist: () => accdist2,
|
|
6257
6219
|
alma: () => alma2,
|
|
6258
6220
|
atr: () => atr2,
|
|
6259
|
-
barssince: () =>
|
|
6221
|
+
barssince: () => barssince3,
|
|
6260
6222
|
bb: () => bb2,
|
|
6261
6223
|
bbw: () => bbw2,
|
|
6262
6224
|
cci: () => cci2,
|
|
@@ -6644,7 +6606,7 @@ function pivotlow2(source, leftbars, rightbars) {
|
|
|
6644
6606
|
const result = pivotlow(source.toArray(), leftbars, rightbars);
|
|
6645
6607
|
return Series.fromArray(bars, result);
|
|
6646
6608
|
}
|
|
6647
|
-
function
|
|
6609
|
+
function barssince3(condition) {
|
|
6648
6610
|
const bars = condition.bars;
|
|
6649
6611
|
const boolValues = condition.toArray().map((v) => v === 1);
|
|
6650
6612
|
const result = barssince(boolValues);
|
|
@@ -6796,7 +6758,7 @@ var ta = {
|
|
|
6796
6758
|
hma: hma2,
|
|
6797
6759
|
pivothigh: pivothigh2,
|
|
6798
6760
|
pivotlow: pivotlow2,
|
|
6799
|
-
barssince:
|
|
6761
|
+
barssince: barssince3,
|
|
6800
6762
|
valuewhen: valuewhen2,
|
|
6801
6763
|
dmi: dmi2,
|
|
6802
6764
|
tsi: tsi2,
|
|
@@ -6828,7 +6790,7 @@ var ta = {
|
|
|
6828
6790
|
|
|
6829
6791
|
// src/utils/index.ts
|
|
6830
6792
|
function isNA(value) {
|
|
6831
|
-
return value === null || value === void 0 || Number.isNaN(value) || isDeleted(value);
|
|
6793
|
+
return value === null || value === void 0 || Number.isNaN(value) || value === Infinity || value === -Infinity || isDeleted(value);
|
|
6832
6794
|
}
|
|
6833
6795
|
function nz(value, defaultValue = 0) {
|
|
6834
6796
|
return isNA(value) ? defaultValue : value;
|
|
@@ -6837,7 +6799,7 @@ function fixnan(source) {
|
|
|
6837
6799
|
let last2;
|
|
6838
6800
|
let seen = false;
|
|
6839
6801
|
return source.map((v) => {
|
|
6840
|
-
if (!
|
|
6802
|
+
if (!(v === null || v === void 0 || Number.isNaN(v) || isDeleted(v))) {
|
|
6841
6803
|
last2 = v;
|
|
6842
6804
|
seen = true;
|
|
6843
6805
|
return v;
|
|
@@ -6853,7 +6815,7 @@ function at(source, i, offset = 0) {
|
|
|
6853
6815
|
return j >= 0 && j < source.length ? source[j] ?? NaN : NaN;
|
|
6854
6816
|
}
|
|
6855
6817
|
function div(a, b2) {
|
|
6856
|
-
return
|
|
6818
|
+
return a / b2;
|
|
6857
6819
|
}
|
|
6858
6820
|
function ohlcFromBars(bars) {
|
|
6859
6821
|
return {
|
|
@@ -7487,7 +7449,7 @@ function hline(price, title, color, linestyle, linewidth) {
|
|
|
7487
7449
|
const options = {
|
|
7488
7450
|
color,
|
|
7489
7451
|
lineWidth: linewidth,
|
|
7490
|
-
lineStyle: getLineStyle(linestyle)
|
|
7452
|
+
lineStyle: getLineStyle(linestyle ?? "dashed")
|
|
7491
7453
|
};
|
|
7492
7454
|
const seriesHandle = context.chart.addSeries("line", options);
|
|
7493
7455
|
const data = context.ohlcv.time.map((time) => ({
|
|
@@ -7734,9 +7696,10 @@ var STRATEGY_DEFAULTS = {
|
|
|
7734
7696
|
calc_on_order_fills: false,
|
|
7735
7697
|
calc_on_every_tick: false,
|
|
7736
7698
|
backtest_fill_limits_assumption: 0,
|
|
7737
|
-
|
|
7738
|
-
|
|
7739
|
-
|
|
7699
|
+
// v6 values; PineScript v5: fixed / 1 / 1000000 and margins 0
|
|
7700
|
+
default_qty_type: "percent_of_equity",
|
|
7701
|
+
default_qty_value: 100,
|
|
7702
|
+
initial_capital: 1e5,
|
|
7740
7703
|
slippage: 0,
|
|
7741
7704
|
commission_type: "percent",
|
|
7742
7705
|
commission_value: 0,
|
|
@@ -7992,7 +7955,7 @@ var SimpleInputAdapter = class {
|
|
|
7992
7955
|
};
|
|
7993
7956
|
|
|
7994
7957
|
// src/index.ts
|
|
7995
|
-
var VERSION = "0.8.
|
|
7958
|
+
var VERSION = "0.8.1";
|
|
7996
7959
|
var info2 = {
|
|
7997
7960
|
name: "OakScriptJS",
|
|
7998
7961
|
version: VERSION,
|
package/dist/index.d.ts
CHANGED
|
@@ -35,12 +35,12 @@ export { input, type InputValue, type IntInputOptions, type FloatInputOptions, t
|
|
|
35
35
|
export { plot as plotHelper, createPlot, type Time, type TimeValuePair, type PlotOptions as PlotHelperOptions, type PlotResult, } from './plot';
|
|
36
36
|
export { setContext, clearContext, getContext, registerCalculate, recalculate, plot, hline, clearPlots, } from './runtime/runtime';
|
|
37
37
|
export { input_int, input_float, input_bool, input_string, input_source, input_timeframe, input_session, input_time, } from './runtime/inputs';
|
|
38
|
-
export type { OakScriptContext, ChartAdapter, InputAdapter, SeriesHandle, SeriesOptions, InputConfig, InputOptions, OhlcvData, PlotConfig, HLineConfig, FillConfig, } from './runtime/types';
|
|
38
|
+
export type { OakScriptContext, ChartAdapter, InputAdapter, SeriesHandle, SeriesOptions, InputConfig, InputOptions, OhlcvData, PlotConfig, HLineConfig, FillConfig, ArrowConfig, } from './runtime/types';
|
|
39
39
|
export { STRATEGY_CONSTANTS, STRATEGY_DEFAULTS, STRATEGY_NUMBER_VARIABLES, STRATEGY_TEXT_VARIABLES, } from './strategy';
|
|
40
40
|
export type * from './strategy';
|
|
41
41
|
export { LightweightChartsAdapter } from './runtime/adapters/LightweightChartsAdapter';
|
|
42
42
|
export { SimpleInputAdapter } from './runtime/adapters/SimpleInputAdapter';
|
|
43
|
-
export declare const VERSION = "0.8.
|
|
43
|
+
export declare const VERSION = "0.8.1";
|
|
44
44
|
export declare const info: {
|
|
45
45
|
name: string;
|
|
46
46
|
version: string;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAgBA,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AAGjC,OAAO,KAAK,MAAM,MAAM,MAAM,CAAC;AAC/B,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,GAAG,MAAM,OAAO,CAAC;AAC7B,OAAO,KAAK,GAAG,MAAM,OAAO,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,GAAG,MAAM,OAAO,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,G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