@guihz/trading-vue-editor-tes 0.1.1 → 0.1.3
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/lib/assets/{parserTccWorker-D5cq4N-Y.js → parserTccWorker-DzTqNT47.js} +1 -2
- package/lib/assets/{scriptsRunWorker-CaEvEpNA.js → scriptsRunWorker-RM2NRIoU.js} +164 -157
- package/lib/components/editor/v5/parseScript/buildInFuncNamespace/box.d.ts +1 -0
- package/lib/{index-UdtfRBFV.js → index-S1gW0Mpf.js} +204 -24
- package/lib/{monarchTokens-oh3fO2YY.js → monarchTokens-CMDv_iys.js} +1 -1
- package/lib/trading-vue-editor.es.packages.js +763 -763
- package/lib/trading-vue-editor.umd.packages.mjs +34 -34
- package/lib/utils/tools.d.ts +1 -1
- package/package.json +1 -1
@@ -804,7 +804,7 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
804
804
|
return e !== 0 && isFinite(e) && (t = St(e)), t;
|
805
805
|
}
|
806
806
|
var rp = {};
|
807
|
-
function
|
807
|
+
function E1(n, e) {
|
808
808
|
var t, r = e, i;
|
809
809
|
for (typeof n == "string" && (n = [n]), ii(e) && (r = function(o, s) {
|
810
810
|
s[e] = z1(o);
|
@@ -812,7 +812,7 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
812
812
|
rp[n[t]] = r;
|
813
813
|
}
|
814
814
|
function Xo(n, e) {
|
815
|
-
|
815
|
+
E1(n, function(t, r, i, o) {
|
816
816
|
i._w = i._w || {}, e(t, i._w, i, o);
|
817
817
|
});
|
818
818
|
}
|
@@ -838,14 +838,14 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
838
838
|
g0("YYYY", Ep, Tp);
|
839
839
|
g0("YYYYY", Xs, Ts);
|
840
840
|
g0("YYYYYY", Xs, Ts);
|
841
|
-
|
842
|
-
|
841
|
+
E1(["YYYYY", "YYYYYY"], ke);
|
842
|
+
E1("YYYY", function(n, e) {
|
843
843
|
e[ke] = n.length === 2 ? m0.parseTwoDigitYear(n) : z1(n);
|
844
844
|
});
|
845
|
-
|
845
|
+
E1("YY", function(n, e) {
|
846
846
|
e[ke] = m0.parseTwoDigitYear(n);
|
847
847
|
});
|
848
|
-
|
848
|
+
E1("Y", function(n, e) {
|
849
849
|
e[ke] = parseInt(n, 10);
|
850
850
|
});
|
851
851
|
function vo(n) {
|
@@ -957,10 +957,10 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
957
957
|
g0("MMMM", function(n, e) {
|
958
958
|
return e.monthsRegex(n);
|
959
959
|
});
|
960
|
-
|
960
|
+
E1(["M", "MM"], function(n, e) {
|
961
961
|
e[Gr] = z1(n) - 1;
|
962
962
|
});
|
963
|
-
|
963
|
+
E1(["MMM", "MMMM"], function(n, e, t, r) {
|
964
964
|
var i = t._locale.monthsParse(n, r, t._strict);
|
965
965
|
i != null ? e[Gr] = i : Z0(t).invalidMonth = n;
|
966
966
|
});
|
@@ -1289,30 +1289,30 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
1289
1289
|
g0("hmmss", i3);
|
1290
1290
|
g0("Hmm", r3);
|
1291
1291
|
g0("Hmmss", i3);
|
1292
|
-
|
1293
|
-
|
1292
|
+
E1(["H", "HH"], ge);
|
1293
|
+
E1(["k", "kk"], function(n, e, t) {
|
1294
1294
|
var r = z1(n);
|
1295
1295
|
e[ge] = r === 24 ? 0 : r;
|
1296
1296
|
});
|
1297
|
-
|
1297
|
+
E1(["a", "A"], function(n, e, t) {
|
1298
1298
|
t._isPm = t._locale.isPM(n), t._meridiem = n;
|
1299
1299
|
});
|
1300
|
-
|
1300
|
+
E1(["h", "hh"], function(n, e, t) {
|
1301
1301
|
e[ge] = z1(n), Z0(t).bigHour = !0;
|
1302
1302
|
});
|
1303
|
-
|
1303
|
+
E1("hmm", function(n, e, t) {
|
1304
1304
|
var r = n.length - 2;
|
1305
1305
|
e[ge] = z1(n.substr(0, r)), e[ir] = z1(n.substr(r)), Z0(t).bigHour = !0;
|
1306
1306
|
});
|
1307
|
-
|
1307
|
+
E1("hmmss", function(n, e, t) {
|
1308
1308
|
var r = n.length - 4, i = n.length - 2;
|
1309
1309
|
e[ge] = z1(n.substr(0, r)), e[ir] = z1(n.substr(r, 2)), e[Jr] = z1(n.substr(i)), Z0(t).bigHour = !0;
|
1310
1310
|
});
|
1311
|
-
|
1311
|
+
E1("Hmm", function(n, e, t) {
|
1312
1312
|
var r = n.length - 2;
|
1313
1313
|
e[ge] = z1(n.substr(0, r)), e[ir] = z1(n.substr(r));
|
1314
1314
|
});
|
1315
|
-
|
1315
|
+
E1("Hmmss", function(n, e, t) {
|
1316
1316
|
var r = n.length - 4, i = n.length - 2;
|
1317
1317
|
e[ge] = z1(n.substr(0, r)), e[ir] = z1(n.substr(r, 2)), e[Jr] = z1(n.substr(i));
|
1318
1318
|
});
|
@@ -1771,7 +1771,7 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
1771
1771
|
q3("ZZ", "");
|
1772
1772
|
g0("Z", Fs);
|
1773
1773
|
g0("ZZ", Fs);
|
1774
|
-
|
1774
|
+
E1(["Z", "ZZ"], function(n, e, t) {
|
1775
1775
|
t._useUTC = !0, t._tzm = Hp(Fs, n);
|
1776
1776
|
});
|
1777
1777
|
var HW = /([\+\-]|\d\d)/gi;
|
@@ -2269,7 +2269,7 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
2269
2269
|
g0("NNN", Vp);
|
2270
2270
|
g0("NNNN", Q6);
|
2271
2271
|
g0("NNNNN", Z6);
|
2272
|
-
|
2272
|
+
E1(
|
2273
2273
|
["N", "NN", "NNN", "NNNN", "NNNNN"],
|
2274
2274
|
function(n, e, t, r) {
|
2275
2275
|
var i = t._locale.erasParse(n, r, t._strict);
|
@@ -2281,8 +2281,8 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
2281
2281
|
g0("yyy", Vn);
|
2282
2282
|
g0("yyyy", Vn);
|
2283
2283
|
g0("yo", eg);
|
2284
|
-
|
2285
|
-
|
2284
|
+
E1(["y", "yy", "yyy", "yyyy"], ke);
|
2285
|
+
E1(["yo"], function(n, e, t, r) {
|
2286
2286
|
var i;
|
2287
2287
|
t._locale._eraYearOrdinalRegex && (i = n.match(t._locale._eraYearOrdinalRegex)), t._locale.eraYearOrdinalParse ? e[ke] = t._locale.eraYearOrdinalParse(n, i) : e[ke] = parseInt(n, 10);
|
2288
2288
|
});
|
@@ -2464,7 +2464,7 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
2464
2464
|
}
|
2465
2465
|
w0("Q", 0, "Qo", "quarter");
|
2466
2466
|
g0("Q", e3);
|
2467
|
-
|
2467
|
+
E1("Q", function(n, e) {
|
2468
2468
|
e[Gr] = (z1(n) - 1) * 3;
|
2469
2469
|
});
|
2470
2470
|
function cg(n) {
|
@@ -2476,15 +2476,15 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
2476
2476
|
g0("Do", function(n, e) {
|
2477
2477
|
return n ? e._dayOfMonthOrdinalParse || e._ordinalParse : e._dayOfMonthOrdinalParseLenient;
|
2478
2478
|
});
|
2479
|
-
|
2480
|
-
|
2479
|
+
E1(["D", "DD"], Ar);
|
2480
|
+
E1("Do", function(n, e) {
|
2481
2481
|
e[Ar] = z1(n.match(G1)[0]);
|
2482
2482
|
});
|
2483
2483
|
var x3 = Gn("Date", !0);
|
2484
2484
|
w0("DDD", ["DDDD", 3], "DDDo", "dayOfYear");
|
2485
2485
|
g0("DDD", Es);
|
2486
2486
|
g0("DDDD", t3);
|
2487
|
-
|
2487
|
+
E1(["DDD", "DDDD"], function(n, e, t) {
|
2488
2488
|
t._dayOfYear = z1(n);
|
2489
2489
|
});
|
2490
2490
|
function pg(n) {
|
@@ -2496,12 +2496,12 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
2496
2496
|
w0("m", ["mm", 2], 0, "minute");
|
2497
2497
|
g0("m", G1, Xp);
|
2498
2498
|
g0("mm", G1, qt);
|
2499
|
-
|
2499
|
+
E1(["m", "mm"], ir);
|
2500
2500
|
var bg = Gn("Minutes", !1);
|
2501
2501
|
w0("s", ["ss", 2], 0, "second");
|
2502
2502
|
g0("s", G1, Xp);
|
2503
2503
|
g0("ss", G1, qt);
|
2504
|
-
|
2504
|
+
E1(["s", "ss"], Jr);
|
2505
2505
|
var Mg = Gn("Seconds", !1);
|
2506
2506
|
w0("S", 0, 0, function() {
|
2507
2507
|
return ~~(this.millisecond() / 100);
|
@@ -2538,7 +2538,7 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
2538
2538
|
e[Zi] = z1(("0." + n) * 1e3);
|
2539
2539
|
}
|
2540
2540
|
for (mi = "S"; mi.length <= 9; mi += "S")
|
2541
|
-
|
2541
|
+
E1(mi, zg);
|
2542
2542
|
C3 = Gn("Milliseconds", !1);
|
2543
2543
|
w0("z", 0, 0, "zoneAbbr");
|
2544
2544
|
w0("zz", 0, 0, "zoneName");
|
@@ -2926,10 +2926,10 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
2926
2926
|
w0("x", 0, 0, "valueOf");
|
2927
2927
|
g0("x", Ss);
|
2928
2928
|
g0("X", fm);
|
2929
|
-
|
2929
|
+
E1("X", function(n, e, t) {
|
2930
2930
|
t._d = new Date(parseFloat(n) * 1e3);
|
2931
2931
|
});
|
2932
|
-
|
2932
|
+
E1("x", function(n, e, t) {
|
2933
2933
|
t._d = new Date(z1(n));
|
2934
2934
|
});
|
2935
2935
|
//! moment.js
|
@@ -4645,8 +4645,8 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
4645
4645
|
};
|
4646
4646
|
}
|
4647
4647
|
function tM(U, Q, K, W0, j0) {
|
4648
|
-
return j0(U, function(v1, Ae,
|
4649
|
-
K = W0 ? (W0 = !1, v1) : Q(K, v1, Ae,
|
4648
|
+
return j0(U, function(v1, Ae, X1) {
|
4649
|
+
K = W0 ? (W0 = !1, v1) : Q(K, v1, Ae, X1);
|
4650
4650
|
}), K;
|
4651
4651
|
}
|
4652
4652
|
function pf(U, Q) {
|
@@ -4788,18 +4788,18 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
4788
4788
|
}
|
4789
4789
|
var vf = function U(Q) {
|
4790
4790
|
Q = Q == null ? we : An.defaults(we.Object(), Q, An.pick(we, Hd));
|
4791
|
-
var K = Q.Array, W0 = Q.Date, j0 = Q.Error, v1 = Q.Function, Ae = Q.Math,
|
4791
|
+
var K = Q.Array, W0 = Q.Date, j0 = Q.Error, v1 = Q.Function, Ae = Q.Math, X1 = Q.Object, Va = Q.RegExp, yf = Q.String, vt = Q.TypeError, Jo = K.prototype, Rf = v1.prototype, hn = X1.prototype, Qo = Q["__core-js_shared__"], Zo = Rf.toString, D1 = hn.hasOwnProperty, Nf = 0, aM = function() {
|
4792
4792
|
var z = /[^.]+$/.exec(Qo && Qo.keys && Qo.keys.IE_PROTO || "");
|
4793
4793
|
return z ? "Symbol(src)_1." + z : "";
|
4794
|
-
}(), e2 = hn.toString, Lf = Zo.call(
|
4794
|
+
}(), e2 = hn.toString, Lf = Zo.call(X1), wf = we._, Df = Va(
|
4795
4795
|
"^" + Zo.call(D1).replace(ro, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
4796
|
-
), t2 = Ub ? Q.Buffer : t, zi = Q.Symbol, r2 = Q.Uint8Array, cM = t2 ? t2.allocUnsafe : t, i2 = oM(
|
4796
|
+
), t2 = Ub ? Q.Buffer : t, zi = Q.Symbol, r2 = Q.Uint8Array, cM = t2 ? t2.allocUnsafe : t, i2 = oM(X1.getPrototypeOf, X1), pM = X1.create, bM = hn.propertyIsEnumerable, n2 = Jo.splice, MM = zi ? zi.isConcatSpreadable : t, oo = zi ? zi.iterator : t, ki = zi ? zi.toStringTag : t, o2 = function() {
|
4797
4797
|
try {
|
4798
|
-
var z = Hi(
|
4798
|
+
var z = Hi(X1, "defineProperty");
|
4799
4799
|
return z({}, "", {}), z;
|
4800
4800
|
} catch {
|
4801
4801
|
}
|
4802
|
-
}(), Bf = Q.clearTimeout !== we.clearTimeout && Q.clearTimeout, xf = W0 && W0.now !== we.Date.now && W0.now, Cf = Q.setTimeout !== we.setTimeout && Q.setTimeout, s2 = Ae.ceil, a2 = Ae.floor, Ka =
|
4802
|
+
}(), Bf = Q.clearTimeout !== we.clearTimeout && Q.clearTimeout, xf = W0 && W0.now !== we.Date.now && W0.now, Cf = Q.setTimeout !== we.setTimeout && Q.setTimeout, s2 = Ae.ceil, a2 = Ae.floor, Ka = X1.getOwnPropertySymbols, Tf = t2 ? t2.isBuffer : t, zM = Q.isFinite, Ef = Jo.join, Xf = oM(X1.keys, X1), he = Ae.max, Fe = Ae.min, Sf = W0.now, Ff = Q.parseInt, OM = Ae.random, If = Jo.reverse, Ga = Hi(Q, "DataView"), so = Hi(Q, "Map"), Ja = Hi(Q, "Promise"), _n = Hi(Q, "Set"), ao = Hi(Q, "WeakMap"), co = Hi(X1, "create"), c2 = ao && new ao(), qn = {}, kf = Yi(Ga), $f = Yi(so), Pf = Yi(Ja), Uf = Yi(_n), jf = Yi(ao), p2 = zi ? zi.prototype : t, po = p2 ? p2.valueOf : t, uM = p2 ? p2.toString : t;
|
4803
4803
|
function x(z) {
|
4804
4804
|
if (oe(z) && !Y0(z) && !(z instanceof p1)) {
|
4805
4805
|
if (z instanceof yt)
|
@@ -5146,7 +5146,7 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
5146
5146
|
var v = _.length;
|
5147
5147
|
if (z == null)
|
5148
5148
|
return !v;
|
5149
|
-
for (z =
|
5149
|
+
for (z = X1(z); v--; ) {
|
5150
5150
|
var D = _[v], C = u[D], S = z[D];
|
5151
5151
|
if (S === t && !(D in z) || !C(S))
|
5152
5152
|
return !1;
|
@@ -5236,7 +5236,7 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
5236
5236
|
return Y0(z) ? v : bi(v, _(z));
|
5237
5237
|
}
|
5238
5238
|
function Pe(z) {
|
5239
|
-
return z == null ? z === t ? H : O0 : ki && ki in
|
5239
|
+
return z == null ? z === t ? H : O0 : ki && ki in X1(z) ? oh(z) : Ah(z);
|
5240
5240
|
}
|
5241
5241
|
function rc(z, u) {
|
5242
5242
|
return z > u;
|
@@ -5245,7 +5245,7 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
5245
5245
|
return z != null && D1.call(z, u);
|
5246
5246
|
}
|
5247
5247
|
function vA(z, u) {
|
5248
|
-
return z != null && u in
|
5248
|
+
return z != null && u in X1(z);
|
5249
5249
|
}
|
5250
5250
|
function yA(z, u, _) {
|
5251
5251
|
return z >= Fe(u, _) && z < he(u, _);
|
@@ -5320,7 +5320,7 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
5320
5320
|
var D = _.length, C = D, S = !v;
|
5321
5321
|
if (z == null)
|
5322
5322
|
return !C;
|
5323
|
-
for (z =
|
5323
|
+
for (z = X1(z); D--; ) {
|
5324
5324
|
var $ = _[D];
|
5325
5325
|
if (S && $[2] ? $[1] !== z[$[0]] : !($[0] in z))
|
5326
5326
|
return !1;
|
@@ -5363,7 +5363,7 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
5363
5363
|
if (!fo(z))
|
5364
5364
|
return Xf(z);
|
5365
5365
|
var u = [];
|
5366
|
-
for (var _ in
|
5366
|
+
for (var _ in X1(z))
|
5367
5367
|
D1.call(z, _) && _ != "constructor" && u.push(_);
|
5368
5368
|
return u;
|
5369
5369
|
}
|
@@ -5687,7 +5687,7 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
5687
5687
|
return u.lastIndex = z.lastIndex, u;
|
5688
5688
|
}
|
5689
5689
|
function VA(z) {
|
5690
|
-
return po ?
|
5690
|
+
return po ? X1(po.call(z)) : {};
|
5691
5691
|
}
|
5692
5692
|
function $M(z, u) {
|
5693
5693
|
var _ = u ? lc(z.buffer) : z.buffer;
|
@@ -5763,7 +5763,7 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
5763
5763
|
function Wn(z) {
|
5764
5764
|
return r1(function(u, _) {
|
5765
5765
|
var v = -1, D = _.length, C = D > 1 ? _[D - 1] : t, S = D > 2 ? _[2] : t;
|
5766
|
-
for (C = z.length > 3 && typeof C == "function" ? (D--, C) : t, S && Ue(_[0], _[1], S) && (C = D < 3 ? t : C, D = 1), u =
|
5766
|
+
for (C = z.length > 3 && typeof C == "function" ? (D--, C) : t, S && Ue(_[0], _[1], S) && (C = D < 3 ? t : C, D = 1), u = X1(u); ++v < D; ) {
|
5767
5767
|
var $ = _[v];
|
5768
5768
|
$ && z(u, $, v, C);
|
5769
5769
|
}
|
@@ -5776,14 +5776,14 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
5776
5776
|
return _;
|
5777
5777
|
if (!Je(_))
|
5778
5778
|
return z(_, v);
|
5779
|
-
for (var D = _.length, C = u ? D : -1, S =
|
5779
|
+
for (var D = _.length, C = u ? D : -1, S = X1(_); (u ? C-- : ++C < D) && v(S[C], C, S) !== !1; )
|
5780
5780
|
;
|
5781
5781
|
return _;
|
5782
5782
|
};
|
5783
5783
|
}
|
5784
5784
|
function YM(z) {
|
5785
5785
|
return function(u, _, v) {
|
5786
|
-
for (var D = -1, C =
|
5786
|
+
for (var D = -1, C = X1(u), S = v(u), $ = S.length; $--; ) {
|
5787
5787
|
var j = S[z ? $ : ++D];
|
5788
5788
|
if (_(C[j], j, C) === !1)
|
5789
5789
|
break;
|
@@ -5862,7 +5862,7 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
5862
5862
|
}
|
5863
5863
|
function KM(z) {
|
5864
5864
|
return function(u, _, v) {
|
5865
|
-
var D =
|
5865
|
+
var D = X1(u);
|
5866
5866
|
if (!Je(u)) {
|
5867
5867
|
var C = x0(_, 3);
|
5868
5868
|
u = ye(u), _ = function($) {
|
@@ -6208,7 +6208,7 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
6208
6208
|
return v && (u ? z[ki] = _ : delete z[ki]), D;
|
6209
6209
|
}
|
6210
6210
|
var mc = Ka ? function(z) {
|
6211
|
-
return z == null ? [] : (z =
|
6211
|
+
return z == null ? [] : (z = X1(z), pi(Ka(z), function(u) {
|
6212
6212
|
return bM.call(z, u);
|
6213
6213
|
}));
|
6214
6214
|
} : Ic, nz = Ka ? function(z) {
|
@@ -6333,7 +6333,7 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
6333
6333
|
if (Y0(z))
|
6334
6334
|
return !1;
|
6335
6335
|
var _ = typeof z;
|
6336
|
-
return _ == "number" || _ == "symbol" || _ == "boolean" || z == null || zt(z) ? !0 : ua.test(z) || !Oa.test(z) || u != null && z in
|
6336
|
+
return _ == "number" || _ == "symbol" || _ == "boolean" || z == null || zt(z) ? !0 : ua.test(z) || !Oa.test(z) || u != null && z in X1(u);
|
6337
6337
|
}
|
6338
6338
|
function zh(z) {
|
6339
6339
|
var u = typeof z;
|
@@ -6361,7 +6361,7 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
6361
6361
|
}
|
6362
6362
|
function cz(z, u) {
|
6363
6363
|
return function(_) {
|
6364
|
-
return _ == null ? !1 : _[z] === u && (u !== t || z in
|
6364
|
+
return _ == null ? !1 : _[z] === u && (u !== t || z in X1(_));
|
6365
6365
|
};
|
6366
6366
|
}
|
6367
6367
|
function lh(z) {
|
@@ -6385,7 +6385,7 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
6385
6385
|
function fh(z) {
|
6386
6386
|
var u = [];
|
6387
6387
|
if (z != null)
|
6388
|
-
for (var _ in
|
6388
|
+
for (var _ in X1(z))
|
6389
6389
|
u.push(_);
|
6390
6390
|
return u;
|
6391
6391
|
}
|
@@ -7312,7 +7312,7 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
7312
7312
|
return u == null ? _ : fM(_, u);
|
7313
7313
|
}
|
7314
7314
|
var j4 = r1(function(z, u) {
|
7315
|
-
z =
|
7315
|
+
z = X1(z);
|
7316
7316
|
var _ = -1, v = u.length, D = v > 2 ? u[2] : t;
|
7317
7317
|
for (D && Ue(u[0], u[1], D) && (v = 1); ++_ < v; )
|
7318
7318
|
for (var C = u[_], S = Qe(C), $ = -1, j = S.length; ++$ < j; ) {
|
@@ -8669,7 +8669,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
8669
8669
|
function $t(n, e) {
|
8670
8670
|
return isNaN(n) || isNaN(e) ? NaN : Ci(n).minus(e).toNumber();
|
8671
8671
|
}
|
8672
|
-
function
|
8672
|
+
function S1(n, e) {
|
8673
8673
|
return isNaN(n) || isNaN(e) ? NaN : Ci(n).mul(e).toNumber();
|
8674
8674
|
}
|
8675
8675
|
function Jp(n, e) {
|
@@ -10532,7 +10532,7 @@ Example:
|
|
10532
10532
|
function dO(n, e) {
|
10533
10533
|
return P1(n) ? n : ze(n) ? n.toNumber() : e;
|
10534
10534
|
}
|
10535
|
-
function
|
10535
|
+
function F1(n, e) {
|
10536
10536
|
var t = fy(n, e);
|
10537
10537
|
return e && typeof e == "object" && "truncate" in e && t.length > e.truncate ? t.substring(0, e.truncate - 3) + "..." : t;
|
10538
10538
|
}
|
@@ -10554,7 +10554,7 @@ Example:
|
|
10554
10554
|
return n.format(e);
|
10555
10555
|
if (n && n.toString(e) !== {}.toString())
|
10556
10556
|
return n.toString(e);
|
10557
|
-
var t = Object.keys(n).map((r) => fO(r) + ": " +
|
10557
|
+
var t = Object.keys(n).map((r) => fO(r) + ": " + F1(n[r], e));
|
10558
10558
|
return "{" + t.join(", ") + "}";
|
10559
10559
|
}
|
10560
10560
|
return String(n);
|
@@ -10581,7 +10581,7 @@ Example:
|
|
10581
10581
|
i !== 0 && (t += ", "), t += Z3(n[i], e);
|
10582
10582
|
return t += "]", t;
|
10583
10583
|
} else
|
10584
|
-
return
|
10584
|
+
return F1(n, e);
|
10585
10585
|
}
|
10586
10586
|
function Ay(n) {
|
10587
10587
|
return n && typeof n == "object" && typeof n.s == "number" && typeof n.n == "number" && typeof n.d == "number" || !1;
|
@@ -10649,7 +10649,7 @@ Example:
|
|
10649
10649
|
throw new Error("Resizing to scalar is not supported");
|
10650
10650
|
e.forEach(function(i) {
|
10651
10651
|
if (!P1(i) || !ee(i) || i < 0)
|
10652
|
-
throw new TypeError("Invalid size, must contain positive integers (size: " +
|
10652
|
+
throw new TypeError("Invalid size, must contain positive integers (size: " + F1(e) + ")");
|
10653
10653
|
}), (P1(n) || ze(n)) && (n = [n]);
|
10654
10654
|
var r = t !== void 0 ? t : 0;
|
10655
10655
|
return bp(n, e, 0, r), n;
|
@@ -13851,9 +13851,9 @@ Example:
|
|
13851
13851
|
}, t.prototype.valueOf = function() {
|
13852
13852
|
return this._data;
|
13853
13853
|
}, t.prototype.format = function(b) {
|
13854
|
-
return
|
13854
|
+
return F1(this._data, b);
|
13855
13855
|
}, t.prototype.toString = function() {
|
13856
|
-
return
|
13856
|
+
return F1(this._data);
|
13857
13857
|
}, t.prototype.toJSON = function() {
|
13858
13858
|
return {
|
13859
13859
|
mathjs: "DenseMatrix",
|
@@ -14342,7 +14342,7 @@ Example:
|
|
14342
14342
|
throw new Error("Only two dimensions matrix are supported");
|
14343
14343
|
q.forEach(function(W) {
|
14344
14344
|
if (!P1(W) || !ee(W) || W < 0)
|
14345
|
-
throw new TypeError("Invalid size, must contain positive integers (size: " +
|
14345
|
+
throw new TypeError("Invalid size, must contain positive integers (size: " + F1(q) + ")");
|
14346
14346
|
});
|
14347
14347
|
var m = A ? this.clone() : this;
|
14348
14348
|
return O(m, q[0], q[1], h);
|
@@ -14389,7 +14389,7 @@ Example:
|
|
14389
14389
|
throw new Error("Sparse matrices can only be reshaped in two dimensions");
|
14390
14390
|
d.forEach(function(s0) {
|
14391
14391
|
if (!P1(s0) || !ee(s0) || s0 <= -2 || s0 === 0)
|
14392
|
-
throw new TypeError("Invalid size, must contain positive integers or -1 (size: " +
|
14392
|
+
throw new TypeError("Invalid size, must contain positive integers or -1 (size: " + F1(d) + ")");
|
14393
14393
|
});
|
14394
14394
|
var A = this._size[0] * this._size[1];
|
14395
14395
|
d = tb(d, A);
|
@@ -14512,16 +14512,16 @@ Example:
|
|
14512
14512
|
return R;
|
14513
14513
|
}
|
14514
14514
|
return i.prototype.format = function(d) {
|
14515
|
-
for (var h = this._size[0], A = this._size[1], q = this.density(), m = "Sparse Matrix [" +
|
14515
|
+
for (var h = this._size[0], A = this._size[1], q = this.density(), m = "Sparse Matrix [" + F1(h, d) + " x " + F1(A, d) + "] density: " + F1(q, d) + `
|
14516
14516
|
`, W = 0; W < A; W++)
|
14517
14517
|
for (var g = this._ptr[W], R = this._ptr[W + 1], y = g; y < R; y++) {
|
14518
14518
|
var L = this._index[y];
|
14519
14519
|
m += `
|
14520
|
-
(` +
|
14520
|
+
(` + F1(L, d) + ", " + F1(W, d) + ") ==> " + (this._values ? F1(this._values[y], d) : "X");
|
14521
14521
|
}
|
14522
14522
|
return m;
|
14523
14523
|
}, i.prototype.toString = function() {
|
14524
|
-
return
|
14524
|
+
return F1(this.toArray());
|
14525
14525
|
}, i.prototype.toJSON = function() {
|
14526
14526
|
return {
|
14527
14527
|
mathjs: "SparseMatrix",
|
@@ -15824,7 +15824,7 @@ Example:
|
|
15824
15824
|
{
|
15825
15825
|
var p = a[0], b = a[1];
|
15826
15826
|
if (b === 0)
|
15827
|
-
throw new RangeError("Cannot transpose a 2D matrix with no columns (size: " +
|
15827
|
+
throw new RangeError("Cannot transpose a 2D matrix with no columns (size: " + F1(a) + ")");
|
15828
15828
|
switch (s.storage()) {
|
15829
15829
|
case "dense":
|
15830
15830
|
c = i(s, p, b);
|
@@ -15836,7 +15836,7 @@ Example:
|
|
15836
15836
|
}
|
15837
15837
|
break;
|
15838
15838
|
default:
|
15839
|
-
throw new RangeError("Matrix must be a vector or two dimensional (size: " +
|
15839
|
+
throw new RangeError("Matrix must be a vector or two dimensional (size: " + F1(a) + ")");
|
15840
15840
|
}
|
15841
15841
|
return c;
|
15842
15842
|
}
|
@@ -16578,7 +16578,7 @@ Example:
|
|
16578
16578
|
case 1:
|
16579
16579
|
if (a[0] === 1)
|
16580
16580
|
return B1(c[0]);
|
16581
|
-
throw new RangeError("Matrix must be square (size: " +
|
16581
|
+
throw new RangeError("Matrix must be square (size: " + F1(a) + ")");
|
16582
16582
|
case 2: {
|
16583
16583
|
var p = a[0], b = a[1];
|
16584
16584
|
if (p === b) {
|
@@ -16586,10 +16586,10 @@ Example:
|
|
16586
16586
|
M = r(M, c[O][O]);
|
16587
16587
|
return M;
|
16588
16588
|
} else
|
16589
|
-
throw new RangeError("Matrix must be square (size: " +
|
16589
|
+
throw new RangeError("Matrix must be square (size: " + F1(a) + ")");
|
16590
16590
|
}
|
16591
16591
|
default:
|
16592
|
-
throw new RangeError("Matrix must be two dimensional (size: " +
|
16592
|
+
throw new RangeError("Matrix must be two dimensional (size: " + F1(a) + ")");
|
16593
16593
|
}
|
16594
16594
|
}
|
16595
16595
|
function o(s) {
|
@@ -16609,7 +16609,7 @@ Example:
|
|
16609
16609
|
}
|
16610
16610
|
return l;
|
16611
16611
|
}
|
16612
|
-
throw new RangeError("Matrix must be square (size: " +
|
16612
|
+
throw new RangeError("Matrix must be square (size: " + F1(b) + ")");
|
16613
16613
|
}
|
16614
16614
|
}), tu = "det", _L = ["typed", "matrix", "subtractScalar", "multiply", "divideScalar", "isZero", "unaryMinus"], qL = /* @__PURE__ */ _0(tu, _L, (n) => {
|
16615
16615
|
var {
|
@@ -16635,17 +16635,17 @@ Example:
|
|
16635
16635
|
return B1(b.valueOf()[0]);
|
16636
16636
|
if (M[0] === 0)
|
16637
16637
|
return 1;
|
16638
|
-
throw new RangeError("Matrix must be square (size: " +
|
16638
|
+
throw new RangeError("Matrix must be square (size: " + F1(M) + ")");
|
16639
16639
|
case 2: {
|
16640
16640
|
var O = M[0], l = M[1];
|
16641
16641
|
if (O === l)
|
16642
16642
|
return c(b.clone().valueOf(), O);
|
16643
16643
|
if (l === 0)
|
16644
16644
|
return 1;
|
16645
|
-
throw new RangeError("Matrix must be square (size: " +
|
16645
|
+
throw new RangeError("Matrix must be square (size: " + F1(M) + ")");
|
16646
16646
|
}
|
16647
16647
|
default:
|
16648
|
-
throw new RangeError("Matrix must be two dimensional (size: " +
|
16648
|
+
throw new RangeError("Matrix must be two dimensional (size: " + F1(M) + ")");
|
16649
16649
|
}
|
16650
16650
|
}
|
16651
16651
|
});
|
@@ -16692,15 +16692,15 @@ Example:
|
|
16692
16692
|
case 1:
|
16693
16693
|
if (l[0] === 1)
|
16694
16694
|
return V1(O) ? t([r(1, O.valueOf()[0])]) : [r(1, O[0])];
|
16695
|
-
throw new RangeError("Matrix must be square (size: " +
|
16695
|
+
throw new RangeError("Matrix must be square (size: " + F1(l) + ")");
|
16696
16696
|
case 2: {
|
16697
16697
|
var f = l[0], d = l[1];
|
16698
16698
|
if (f === d)
|
16699
16699
|
return V1(O) ? t(b(O.valueOf(), f, d), O.storage()) : b(O, f, d);
|
16700
|
-
throw new RangeError("Matrix must be square (size: " +
|
16700
|
+
throw new RangeError("Matrix must be square (size: " + F1(l) + ")");
|
16701
16701
|
}
|
16702
16702
|
default:
|
16703
|
-
throw new RangeError("Matrix must be two dimensional (size: " +
|
16703
|
+
throw new RangeError("Matrix must be two dimensional (size: " + F1(l) + ")");
|
16704
16704
|
}
|
16705
16705
|
},
|
16706
16706
|
any: function(O) {
|
@@ -16785,7 +16785,7 @@ Example:
|
|
16785
16785
|
return V1(m) ? t(l(m.valueOf(), g, R), m.storage()) : l(m, g, R);
|
16786
16786
|
}
|
16787
16787
|
default:
|
16788
|
-
throw new RangeError("Matrix must be two dimensional (size: " +
|
16788
|
+
throw new RangeError("Matrix must be two dimensional (size: " + F1(W) + ")");
|
16789
16789
|
}
|
16790
16790
|
},
|
16791
16791
|
any: function(m) {
|
@@ -18616,7 +18616,7 @@ Example:
|
|
18616
18616
|
if (!String(e).includes("."))
|
18617
18617
|
return e;
|
18618
18618
|
const r = this._getLen();
|
18619
|
-
return Jp(Math[t](
|
18619
|
+
return Jp(Math[t](S1(e, Math.pow(10, r))), Math.pow(10, r));
|
18620
18620
|
}
|
18621
18621
|
_getCommQty(e, t) {
|
18622
18622
|
const { commission_type: r, commission_value: i = 0, default_qty_value: o = 0 } = this._options;
|
@@ -18947,7 +18947,7 @@ Example:
|
|
18947
18947
|
if (b === 0)
|
18948
18948
|
O = p, s && p > t || !s && p < t ? l = 1 : l = 2;
|
18949
18949
|
else {
|
18950
|
-
M = $t(p,
|
18950
|
+
M = $t(p, S1(b * c, this._mintick));
|
18951
18951
|
let f = i, d = r;
|
18952
18952
|
s ? p >= t && p <= i ? (f = i, l = 1) : (s = !1, f = o, l = 2) : p < t && p >= r ? (d = r, l = 1) : (s = !0, d = o, l = 2);
|
18953
18953
|
const [h, A, q = 1] = this._calcTrailStopPrice(M, f, d, o, b, c, s);
|
@@ -18967,7 +18967,7 @@ Example:
|
|
18967
18967
|
}
|
18968
18968
|
_calcTrailStopPrice(e, t, r, i, o, s, a) {
|
18969
18969
|
let c = e, p;
|
18970
|
-
const b = $t(s === 1 ? t : r,
|
18970
|
+
const b = $t(s === 1 ? t : r, S1(o * s, this._mintick));
|
18971
18971
|
let M = 1;
|
18972
18972
|
return s === 1 ? a ? (c < b && (c = b), c >= r && (M = 2, p = c)) : c >= r ? (M = 1, p = c) : b > c && (c = b, b >= i && (M = 3, p = b)) : a ? c <= t ? (M = 1, p = c) : b < c && (c = b, b <= i && (M = 3, p = b)) : (b < c && (c = b), c <= t && (M = 2, p = c)), [c, p, M];
|
18973
18973
|
}
|
@@ -19082,7 +19082,7 @@ Example:
|
|
19082
19082
|
const W = A && (A - t) * f <= 0;
|
19083
19083
|
q && W || (h && !q || A && !W) && (l = t);
|
19084
19084
|
}
|
19085
|
-
const d = kt(l,
|
19085
|
+
const d = kt(l, S1(f * O, this._mintick));
|
19086
19086
|
if (l <= i && d >= r) {
|
19087
19087
|
const h = this._getOrders(p, M);
|
19088
19088
|
this._entryOrder(h, l, a, e);
|
@@ -19104,7 +19104,7 @@ Example:
|
|
19104
19104
|
const w = L && (L - o) * g <= 0;
|
19105
19105
|
B && w || (y && !B || L && !w) && (m = o);
|
19106
19106
|
}
|
19107
|
-
const R = kt(m,
|
19107
|
+
const R = kt(m, S1(g * p, this._mintick));
|
19108
19108
|
if (m <= a && R >= s) {
|
19109
19109
|
const y = this._getOrders(l, q);
|
19110
19110
|
if (y.length && (W = this._processOrders(y, m, M, q, f, !1, "order"), W <= 0))
|
@@ -19211,7 +19211,7 @@ Example:
|
|
19211
19211
|
const { limit: o, profit: s, comment_profit: a, comment: c, id: p, qty: b } = r;
|
19212
19212
|
let M = o;
|
19213
19213
|
const { in_price: O } = e, { process_orders_on_close: l } = this._options;
|
19214
|
-
if (!this._isNaN(s) && this._isNaN(o) && (M = kt(O,
|
19214
|
+
if (!this._isNaN(s) && this._isNaN(o) && (M = kt(O, S1(s * t, this._mintick))), M = t === 1 ? sO(M, this._variables.precision) : aO(M, this._variables.precision), r.limit = M, i)
|
19215
19215
|
return;
|
19216
19216
|
let { close: f } = this.calcOnOrderFillsData.data || this._variables;
|
19217
19217
|
if (this.calcOnOrderFillsData?.tradeData?.open && (f = this.calcOnOrderFillsData.tradeData.open), M !== void 0 && (M - f) * t <= 0)
|
@@ -19221,7 +19221,7 @@ Example:
|
|
19221
19221
|
const { stop: o, loss: s, comment_loss: a, comment: c, id: p, qty: b } = r;
|
19222
19222
|
let M = o;
|
19223
19223
|
const { in_price: O } = e, { process_orders_on_close: l } = this._options;
|
19224
|
-
if (!this._isNaN(s) && this._isNaN(o) && (M = $t(O,
|
19224
|
+
if (!this._isNaN(s) && this._isNaN(o) && (M = $t(O, S1(s * t, this._mintick))), M = t === 1 ? aO(M, this._variables.precision) : sO(M, this._variables.precision), r.stop = M, i)
|
19225
19225
|
return;
|
19226
19226
|
let { close: f } = this.calcOnOrderFillsData.data || this._variables;
|
19227
19227
|
if (this.calcOnOrderFillsData?.tradeData?.open && (f = this.calcOnOrderFillsData.tradeData.open), M !== void 0 && (M - f) * t >= 0)
|
@@ -19232,11 +19232,11 @@ Example:
|
|
19232
19232
|
if (!this._isNaN(o)) {
|
19233
19233
|
const { in_price: O } = e, { process_orders_on_close: l } = this._options;
|
19234
19234
|
let f;
|
19235
|
-
if (this._isNaN(s) ? this._isNaN(a) || (f = kt(O,
|
19235
|
+
if (this._isNaN(s) ? this._isNaN(a) || (f = kt(O, S1(a * t, this._mintick))) : f = s, r.active_price = f, i)
|
19236
19236
|
return;
|
19237
19237
|
let { close: d } = this.calcOnOrderFillsData.data || this._variables;
|
19238
19238
|
if (this.calcOnOrderFillsData?.tradeData?.open && (d = this.calcOnOrderFillsData.tradeData.open), f !== void 0 && (f - d) * t <= 0) {
|
19239
|
-
const h = $t(d,
|
19239
|
+
const h = $t(d, S1(o * t, this._mintick));
|
19240
19240
|
if ((h - d) * t >= 0)
|
19241
19241
|
return e.isMarketPriceStop = !0, r.comment = c || p, Object.assign(e, { out_comment: r.comment, out_id: b, out_qty: M }), l && this._addExitPendingCloseOrders(r), !0;
|
19242
19242
|
r.trail_stop_price = h;
|
@@ -24987,7 +24987,7 @@ ${l}`), l;
|
|
24987
24987
|
if (!String(e).includes("."))
|
24988
24988
|
return e;
|
24989
24989
|
const r = this._getLen();
|
24990
|
-
return Jp(Math[t](
|
24990
|
+
return Jp(Math[t](S1(e, Math.pow(10, r))), Math.pow(10, r));
|
24991
24991
|
}
|
24992
24992
|
_getCommQty(e, t) {
|
24993
24993
|
const { commission_type: r, commission_value: i = 0, default_qty_value: o = 0 } = this._options;
|
@@ -25318,7 +25318,7 @@ ${l}`), l;
|
|
25318
25318
|
if (b === 0)
|
25319
25319
|
O = p, s && p > t || !s && p < t ? l = 1 : l = 2;
|
25320
25320
|
else {
|
25321
|
-
M = $t(p,
|
25321
|
+
M = $t(p, S1(b * c, this._mintick));
|
25322
25322
|
let f = i, d = r;
|
25323
25323
|
s ? p >= t && p <= i ? (f = i, l = 1) : (s = !1, f = o, l = 2) : p < t && p >= r ? (d = r, l = 1) : (s = !0, d = o, l = 2);
|
25324
25324
|
const [h, A, q = 1] = this._calcTrailStopPrice(M, f, d, o, b, c, s);
|
@@ -25338,7 +25338,7 @@ ${l}`), l;
|
|
25338
25338
|
}
|
25339
25339
|
_calcTrailStopPrice(e, t, r, i, o, s, a) {
|
25340
25340
|
let c = e, p;
|
25341
|
-
const b = $t(s === 1 ? t : r,
|
25341
|
+
const b = $t(s === 1 ? t : r, S1(o * s, this._mintick));
|
25342
25342
|
let M = 1;
|
25343
25343
|
return s === 1 ? a ? (c < b && (c = b), c >= r && (M = 2, p = c)) : c >= r ? (M = 1, p = c) : b > c && (c = b, b >= i && (M = 3, p = b)) : a ? c <= t ? (M = 1, p = c) : b < c && (c = b, b <= i && (M = 3, p = b)) : (b < c && (c = b), c <= t && (M = 2, p = c)), [c, p, M];
|
25344
25344
|
}
|
@@ -25453,7 +25453,7 @@ ${l}`), l;
|
|
25453
25453
|
const W = A && (A - t) * f <= 0;
|
25454
25454
|
q && W || (h && !q || A && !W) && (l = t);
|
25455
25455
|
}
|
25456
|
-
const d = kt(l,
|
25456
|
+
const d = kt(l, S1(f * O, this._mintick));
|
25457
25457
|
if (l <= i && d >= r) {
|
25458
25458
|
const h = this._getOrders(p, M);
|
25459
25459
|
this._entryOrder(h, l, a, e);
|
@@ -25475,7 +25475,7 @@ ${l}`), l;
|
|
25475
25475
|
const w = L && (L - o) * g <= 0;
|
25476
25476
|
B && w || (y && !B || L && !w) && (m = o);
|
25477
25477
|
}
|
25478
|
-
const R = kt(m,
|
25478
|
+
const R = kt(m, S1(g * p, this._mintick));
|
25479
25479
|
if (m <= a && R >= s) {
|
25480
25480
|
const y = this._getOrders(l, q);
|
25481
25481
|
if (y.length && (W = this._processOrders(y, m, M, q, f, !1, "order"), W <= 0))
|
@@ -25582,7 +25582,7 @@ ${l}`), l;
|
|
25582
25582
|
const { limit: o, profit: s, comment_profit: a, comment: c, id: p, qty: b } = r;
|
25583
25583
|
let M = o;
|
25584
25584
|
const { in_price: O } = e, { process_orders_on_close: l } = this._options;
|
25585
|
-
if (!this._isNaN(s) && this._isNaN(o) && (M = kt(O,
|
25585
|
+
if (!this._isNaN(s) && this._isNaN(o) && (M = kt(O, S1(s * t, this._mintick))), M = t === 1 ? zu(M, this._variables.precision) : Ou(M, this._variables.precision), r.limit = M, i)
|
25586
25586
|
return;
|
25587
25587
|
let { close: f } = this.calcOnOrderFillsData.data || this._variables;
|
25588
25588
|
if (this.calcOnOrderFillsData?.tradeData?.open && (f = this.calcOnOrderFillsData.tradeData.open), M !== void 0 && (M - f) * t <= 0)
|
@@ -25592,7 +25592,7 @@ ${l}`), l;
|
|
25592
25592
|
const { stop: o, loss: s, comment_loss: a, comment: c, id: p, qty: b } = r;
|
25593
25593
|
let M = o;
|
25594
25594
|
const { in_price: O } = e, { process_orders_on_close: l } = this._options;
|
25595
|
-
if (!this._isNaN(s) && this._isNaN(o) && (M = $t(O,
|
25595
|
+
if (!this._isNaN(s) && this._isNaN(o) && (M = $t(O, S1(s * t, this._mintick))), M = t === 1 ? Ou(M, this._variables.precision) : zu(M, this._variables.precision), r.stop = M, i)
|
25596
25596
|
return;
|
25597
25597
|
let { close: f } = this.calcOnOrderFillsData.data || this._variables;
|
25598
25598
|
if (this.calcOnOrderFillsData?.tradeData?.open && (f = this.calcOnOrderFillsData.tradeData.open), M !== void 0 && (M - f) * t >= 0)
|
@@ -25603,11 +25603,11 @@ ${l}`), l;
|
|
25603
25603
|
if (!this._isNaN(o)) {
|
25604
25604
|
const { in_price: O } = e, { process_orders_on_close: l } = this._options;
|
25605
25605
|
let f;
|
25606
|
-
if (this._isNaN(s) ? this._isNaN(a) || (f = kt(O,
|
25606
|
+
if (this._isNaN(s) ? this._isNaN(a) || (f = kt(O, S1(a * t, this._mintick))) : f = s, r.active_price = f, i)
|
25607
25607
|
return;
|
25608
25608
|
let { close: d } = this.calcOnOrderFillsData.data || this._variables;
|
25609
25609
|
if (this.calcOnOrderFillsData?.tradeData?.open && (d = this.calcOnOrderFillsData.tradeData.open), f !== void 0 && (f - d) * t <= 0) {
|
25610
|
-
const h = $t(d,
|
25610
|
+
const h = $t(d, S1(o * t, this._mintick));
|
25611
25611
|
if ((h - d) * t >= 0)
|
25612
25612
|
return e.isMarketPriceStop = !0, r.comment = c || p, Object.assign(e, { out_comment: r.comment, out_id: b, out_qty: M }), l && this._addExitPendingCloseOrders(r), !0;
|
25613
25613
|
r.trail_stop_price = h;
|
@@ -26818,7 +26818,7 @@ ${l}`), l;
|
|
26818
26818
|
function kD(n) {
|
26819
26819
|
self?.workerStorage?.deleteStartwidthKey(n), self?.workerStorage?.delete(`inputs_${n}`), self?.workerStorage?.delete(`strategy_${n}`), self?.workerStorage?.delete(`request_${n}`), self?.workerStorage?.delete(`request_${n}_data`), self?.workerStorage?.delete(`request_${n}_list`);
|
26820
26820
|
}
|
26821
|
-
var N0 = /* @__PURE__ */ ((n) => (n.BOOL = "bool", n.INT = "int", n.FLOAT = "float", n.ARRAY = "array", n.BOX = "box", n.CHART_POINT = "chart.point", n.COLOR = "color", n.CONST = "const", n.LABEL = "label", n.LINE = "line", n.LINEFILL = "linefill", n.MAP = "map", n.MATRIX = "matrix", n.POLYLINE = "polyline", n.SERIES = "series", n.SIMPLE = "simple", n.STRING = "string", n.TABLE = "table", n.UNDETERMINED = "undetermined type", n.INPUT = "input", n.NA = "na", n.VOID = "void", n.ENUM = "enum", n))(N0 || {}), s1 = /* @__PURE__ */ ((n) => (n.TYPE = "type", n.ARRAY = "array", n.BOX = "box", n.CHART_POINT = "chart.point", n.LABEL = "label", n.LINE = "line", n.LINEFILL = "linefill", n.MAP = "map", n.MATRIX = "matrix", n.POLYLINE = "polyline", n.TABLE = "table", n))(s1 || {}), ts = /* @__PURE__ */ ((n) => (n.dividends = "dividends", n.none = "none", n.splits = "splits", n))(ts || {}), rr = /* @__PURE__ */ ((n) => (n.freqAll = "freq_all", n.freqOncePerBar = "freq_once_per_bar", n.freqOncePerBarClose = "freq_once_per_bar_close", n))(rr || {}), Zr = /* @__PURE__ */ ((n) => (n.gapsOff = "gaps_off", n.gapsOn = "gaps_on", n.lookaheadOff = "lookahead_off", n.lookaheadOn = "lookahead_on", n))(Zr || {}), Zt = /* @__PURE__ */ ((n) => (n.all = "all", n.dataWindow = "data_window", n.none = "none", n.pane = "pane", n.priceScale = "price_scale", n.statusLine = "status_line", n))(Zt || {}), ht = /* @__PURE__ */ ((n) => (n.both = "both", n.left = "left", n.none = "none", n.right = "right", n))(ht || {}), _1 = /* @__PURE__ */ ((n) => (n.inherit = "inherit", n.mintick = "mintick", n.percent = "percent", n.price = "price", n.volume = "volume", n))(_1 || {}), rs = /* @__PURE__ */ ((n) => (n.styleDashed = "style_dashed", n.styleDotted = "style_dotted", n.styleSolid = "style_solid", n))(rs || {}), $1 = /* @__PURE__ */ ((n) => (n.styleArrowdown = "style_arrowdown", n.styleArrowup = "style_arrowup", n.styleCircle = "style_circle", n.styleCross = "style_cross", n.styleDiamond = "style_diamond", n.styleFlag = "style_flag", n.styleLabelCenter = "style_label_center", n.styleLabelDown = "style_label_down", n.styleLabelLeft = "style_label_left", n.styleLabelLowerLeft = "style_label_lower_left", n.styleLabelLowerRight = "style_label_lower_right", n.styleLabelRight = "style_label_right", n.styleLabelUp = "style_label_up", n.styleLabelUpperLeft = "style_label_upper_left", n.styleLabelUpperRight = "style_label_upper_right", n.styleNone = "style_none", n.styleSquare = "style_square", n.styleTextOutline = "style_text_outline", n.styleTriangledown = "style_triangledown", n.styleTriangleup = "style_triangleup", n.styleXcross = "style_xcross", n))($1 || {}), ne = /* @__PURE__ */ ((n) => (n.styleArrowBoth = "style_arrow_both", n.styleArrowLeft = "style_arrow_left", n.styleArrowRight = "style_arrow_right", n.styleDashed = "style_dashed", n.styleDotted = "style_dotted", n.styleSolid = "style_solid", n))(ne || {}), Yr = /* @__PURE__ */ ((n) => (n.abovebar = "abovebar", n.absolute = "absolute", n.belowbar = "belowbar", n.bottom = "bottom", n.top = "top", n))(Yr || {}), Yn = /* @__PURE__ */ ((n) => (n.ascending = "ascending", n.descending = "descending", n))(Yn || {}), Ct = /* @__PURE__ */ ((n) => (n.styleArea = "Area", n.styleAreabr = "Area With Breaks", n.styleCircles = "Circles", n.styleColumns = "Columns", n.styleCross = "Cross", n.styleHistogram = "Histogram", n.styleLine = "Line", n.styleLinebr = "Line With Breaks", n.styleStepline = "Step Line", n.styleSteplineDiamond = "Step Line With Diamonds", n.styleSteplinebr = "Step line with Breaks", n))(Ct || {}), dt = /* @__PURE__ */ ((n) => (n.bottomCenter = "bottom_center", n.bottomLeft = "bottom_left", n.bottomRight = "bottom_right", n.middleCenter = "middle_center", n.middleLeft = "middle_left", n.middleRight = "middle_right", n.topCenter = "top_center", n.topLeft = "top_left", n.topRight = "top_right", n))(dt || {}), is = /* @__PURE__ */ ((n) => (n.left = "left", n.none = "none", n.right = "right", n))(is || {}), vi = /* @__PURE__ */ ((n) => (n.extended = "extended", n.regular = "regular", n))(vi || {}), it = /* @__PURE__ */ ((n) => (n.arrowdown = "arrowdown", n.arrowup = "arrowup", n.circle = "circle", n.cross = "cross", n.diamond = "diamond", n.flag = "flag", n.labeldown = "labeldown", n.labelup = "labelup", n.square = "square", n.triangledown = "triangledown", n.triangleup = "triangleup", n.xcross = "xcross", n))(it || {}), Te = /* @__PURE__ */ ((n) => (n.auto = "auto", n.huge = "huge", n.large = "large", n.normal = "normal", n.small = "small", n.tiny = "tiny", n))(Te || {}), ri = /* @__PURE__ */ ((n) => (n.familyDefault = "default", n.familyMonospace = "monospace", n))(ri || {}), me = /* @__PURE__ */ ((n) => (n.cash = "cash", n.fixed = "fixed", n.percentOfEquity = "percent_of_equity", n))(me || {}), Le = /* @__PURE__ */ ((n) => (n.cashPerContract = "cash_per_contract", n.cashPerOrder = "cash_per_order", n.percent = "percent", n))(Le || {}), B0 = /* @__PURE__ */ ((n) => (n.all = "all", n.long = "long", n.short = "short", n))(B0 || {}), Vr = /* @__PURE__ */ ((n) => (n.cancel = "cancel", n.none = "none", n.reduce = "reduce", n))(Vr || {}), S0 = /* @__PURE__ */ ((n) => (n.alignBottom = "align_bottom", n.alignCenter = "align_center", n.alignLeft = "align_left", n.alignRight = "align_right", n.alignTop = "align_top", n.wrapAuto = "wrap_auto", n.wrapNone = "wrap_none", n))(S0 || {}),
|
26821
|
+
var N0 = /* @__PURE__ */ ((n) => (n.BOOL = "bool", n.INT = "int", n.FLOAT = "float", n.ARRAY = "array", n.BOX = "box", n.CHART_POINT = "chart.point", n.COLOR = "color", n.CONST = "const", n.LABEL = "label", n.LINE = "line", n.LINEFILL = "linefill", n.MAP = "map", n.MATRIX = "matrix", n.POLYLINE = "polyline", n.SERIES = "series", n.SIMPLE = "simple", n.STRING = "string", n.TABLE = "table", n.UNDETERMINED = "undetermined type", n.INPUT = "input", n.NA = "na", n.VOID = "void", n.ENUM = "enum", n))(N0 || {}), s1 = /* @__PURE__ */ ((n) => (n.TYPE = "type", n.ARRAY = "array", n.BOX = "box", n.CHART_POINT = "chart.point", n.LABEL = "label", n.LINE = "line", n.LINEFILL = "linefill", n.MAP = "map", n.MATRIX = "matrix", n.POLYLINE = "polyline", n.TABLE = "table", n))(s1 || {}), ts = /* @__PURE__ */ ((n) => (n.dividends = "dividends", n.none = "none", n.splits = "splits", n))(ts || {}), rr = /* @__PURE__ */ ((n) => (n.freqAll = "freq_all", n.freqOncePerBar = "freq_once_per_bar", n.freqOncePerBarClose = "freq_once_per_bar_close", n))(rr || {}), Zr = /* @__PURE__ */ ((n) => (n.gapsOff = "gaps_off", n.gapsOn = "gaps_on", n.lookaheadOff = "lookahead_off", n.lookaheadOn = "lookahead_on", n))(Zr || {}), Zt = /* @__PURE__ */ ((n) => (n.all = "all", n.dataWindow = "data_window", n.none = "none", n.pane = "pane", n.priceScale = "price_scale", n.statusLine = "status_line", n))(Zt || {}), ht = /* @__PURE__ */ ((n) => (n.both = "both", n.left = "left", n.none = "none", n.right = "right", n))(ht || {}), _1 = /* @__PURE__ */ ((n) => (n.inherit = "inherit", n.mintick = "mintick", n.percent = "percent", n.price = "price", n.volume = "volume", n))(_1 || {}), rs = /* @__PURE__ */ ((n) => (n.styleDashed = "style_dashed", n.styleDotted = "style_dotted", n.styleSolid = "style_solid", n))(rs || {}), $1 = /* @__PURE__ */ ((n) => (n.styleArrowdown = "style_arrowdown", n.styleArrowup = "style_arrowup", n.styleCircle = "style_circle", n.styleCross = "style_cross", n.styleDiamond = "style_diamond", n.styleFlag = "style_flag", n.styleLabelCenter = "style_label_center", n.styleLabelDown = "style_label_down", n.styleLabelLeft = "style_label_left", n.styleLabelLowerLeft = "style_label_lower_left", n.styleLabelLowerRight = "style_label_lower_right", n.styleLabelRight = "style_label_right", n.styleLabelUp = "style_label_up", n.styleLabelUpperLeft = "style_label_upper_left", n.styleLabelUpperRight = "style_label_upper_right", n.styleNone = "style_none", n.styleSquare = "style_square", n.styleTextOutline = "style_text_outline", n.styleTriangledown = "style_triangledown", n.styleTriangleup = "style_triangleup", n.styleXcross = "style_xcross", n))($1 || {}), ne = /* @__PURE__ */ ((n) => (n.styleArrowBoth = "style_arrow_both", n.styleArrowLeft = "style_arrow_left", n.styleArrowRight = "style_arrow_right", n.styleDashed = "style_dashed", n.styleDotted = "style_dotted", n.styleSolid = "style_solid", n))(ne || {}), Yr = /* @__PURE__ */ ((n) => (n.abovebar = "abovebar", n.absolute = "absolute", n.belowbar = "belowbar", n.bottom = "bottom", n.top = "top", n))(Yr || {}), Yn = /* @__PURE__ */ ((n) => (n.ascending = "ascending", n.descending = "descending", n))(Yn || {}), Ct = /* @__PURE__ */ ((n) => (n.styleArea = "Area", n.styleAreabr = "Area With Breaks", n.styleCircles = "Circles", n.styleColumns = "Columns", n.styleCross = "Cross", n.styleHistogram = "Histogram", n.styleLine = "Line", n.styleLinebr = "Line With Breaks", n.styleStepline = "Step Line", n.styleSteplineDiamond = "Step Line With Diamonds", n.styleSteplinebr = "Step line with Breaks", n))(Ct || {}), dt = /* @__PURE__ */ ((n) => (n.bottomCenter = "bottom_center", n.bottomLeft = "bottom_left", n.bottomRight = "bottom_right", n.middleCenter = "middle_center", n.middleLeft = "middle_left", n.middleRight = "middle_right", n.topCenter = "top_center", n.topLeft = "top_left", n.topRight = "top_right", n))(dt || {}), is = /* @__PURE__ */ ((n) => (n.left = "left", n.none = "none", n.right = "right", n))(is || {}), vi = /* @__PURE__ */ ((n) => (n.extended = "extended", n.regular = "regular", n))(vi || {}), it = /* @__PURE__ */ ((n) => (n.arrowdown = "arrowdown", n.arrowup = "arrowup", n.circle = "circle", n.cross = "cross", n.diamond = "diamond", n.flag = "flag", n.labeldown = "labeldown", n.labelup = "labelup", n.square = "square", n.triangledown = "triangledown", n.triangleup = "triangleup", n.xcross = "xcross", n))(it || {}), Te = /* @__PURE__ */ ((n) => (n.auto = "auto", n.huge = "huge", n.large = "large", n.normal = "normal", n.small = "small", n.tiny = "tiny", n))(Te || {}), ri = /* @__PURE__ */ ((n) => (n.familyDefault = "default", n.familyMonospace = "monospace", n))(ri || {}), me = /* @__PURE__ */ ((n) => (n.cash = "cash", n.fixed = "fixed", n.percentOfEquity = "percent_of_equity", n))(me || {}), Le = /* @__PURE__ */ ((n) => (n.cashPerContract = "cash_per_contract", n.cashPerOrder = "cash_per_order", n.percent = "percent", n))(Le || {}), B0 = /* @__PURE__ */ ((n) => (n.all = "all", n.long = "long", n.short = "short", n))(B0 || {}), Vr = /* @__PURE__ */ ((n) => (n.cancel = "cancel", n.none = "none", n.reduce = "reduce", n))(Vr || {}), S0 = /* @__PURE__ */ ((n) => (n.alignBottom = "align_bottom", n.alignCenter = "align_center", n.alignLeft = "align_left", n.alignRight = "align_right", n.alignTop = "align_top", n.wrapAuto = "wrap_auto", n.wrapNone = "wrap_none", n))(S0 || {}), C1 = /* @__PURE__ */ ((n) => (n.bar_index = "bar_index", n.bar_time = "bar_time", n))(C1 || {}), Xt = /* @__PURE__ */ ((n) => (n.abovebar = "abovebar", n.belowbar = "belowbar", n.price = "price", n))(Xt || {}), ns = /* @__PURE__ */ ((n) => (n.actual = "actual", n.estimate = "estimate", n.standardized = "standardized", n))(ns || {}), Ji = /* @__PURE__ */ ((n) => (n.traditional = "Traditional", n.fibonacci = "Fibonacci", n.woodie = "Woodie", n.classic = "Classic", n.dm = "DM", n.camarilla = "Camarilla", n))(Ji || {}), He = /* @__PURE__ */ ((n) => (n.INT = "int", n.BOOL = "bool", n.TIME = "time", n.COLOR = "color", n.FLOAT = "float", n.PRICE = "price", n.SOURCE = "source", n.STRING = "string", n.SYMBOL = "symbol", n.SESSION = "session", n.TEXT_AREA = "text_area", n.TIMEFRAME = "timeframe", n.ENUM = "enum", n))(He || {}), Md = /* @__PURE__ */ ((n) => (n.library = "library", n.indicator = "indicator", n.strategy = "strategy", n))(Md || {});
|
26822
26822
|
class zd {
|
26823
26823
|
_defaultParams;
|
26824
26824
|
_varipKeys;
|
@@ -26844,7 +26844,7 @@ ${l}`), l;
|
|
26844
26844
|
return G0.cloneDeep(e?.object);
|
26845
26845
|
}
|
26846
26846
|
}
|
26847
|
-
const
|
26847
|
+
const T1 = {
|
26848
26848
|
onlyInLoop: "'$text' is only allowed inside loops",
|
26849
26849
|
invalidType: "Invalid argument 'expr$index' in 'operator SQBR' call",
|
26850
26850
|
typeUseError: "Cannot specify a type form '$text' without also specifying the type.",
|
@@ -27167,7 +27167,7 @@ ${l}`), l;
|
|
27167
27167
|
return n.length > 1 && e === 1 ? n.replace("1", "") : n;
|
27168
27168
|
}
|
27169
27169
|
function D0(n, e, t, r) {
|
27170
|
-
t && n.addError(Xe(
|
27170
|
+
t && n.addError(Xe(T1.requestUseFuncErr, { func: e, name: t }), r, i1.Error);
|
27171
27171
|
}
|
27172
27172
|
class dd {
|
27173
27173
|
_errorListener;
|
@@ -27485,7 +27485,7 @@ ${l}`), l;
|
|
27485
27485
|
}
|
27486
27486
|
_covariance(e, t, r = !0, i) {
|
27487
27487
|
if (e.length != t.length) {
|
27488
|
-
this._errorListener?.addError(
|
27488
|
+
this._errorListener?.addError(T1.arrLengthDiffErr, i, i1.Error);
|
27489
27489
|
return;
|
27490
27490
|
}
|
27491
27491
|
e = e.filter((c) => c !== void 0), t = t.filter((c) => c !== void 0);
|
@@ -27496,7 +27496,7 @@ ${l}`), l;
|
|
27496
27496
|
return r ? a / e.length : a / (e.length - 1);
|
27497
27497
|
}
|
27498
27498
|
_verifySimpleType(e, t, r, i, o = []) {
|
27499
|
-
o.filter((a) => a !== void 0).some((a) => !e.split("|").includes(typeof a)) && this._errorListener?.addError(Xe(
|
27499
|
+
o.filter((a) => a !== void 0).some((a) => !e.split("|").includes(typeof a)) && this._errorListener?.addError(Xe(T1.arrTypeErr, { name: t, type: r }), i, i1.Error);
|
27500
27500
|
}
|
27501
27501
|
_binarySearch(e, t) {
|
27502
27502
|
let r = 0, i = e.length - 1;
|
@@ -28461,7 +28461,7 @@ ${l}`), l;
|
|
28461
28461
|
const i = `${r || "input"}_${t}`, o = this._newCacheData[i] || this._cacheData[i];
|
28462
28462
|
if (this._variables.bar_index && o)
|
28463
28463
|
return o.sourceTypeName && (o.defval = this._variables[o.sourceTypeName]), o.defval;
|
28464
|
-
if (e.defval === void 0 && this._errorListener.addError(
|
28464
|
+
if (e.defval === void 0 && this._errorListener.addError(T1.inputDefvalErr, t, i1.Error), o)
|
28465
28465
|
if (!o.isModify)
|
28466
28466
|
Object.assign(this._newCacheData[i], e);
|
28467
28467
|
else {
|
@@ -28475,12 +28475,12 @@ ${l}`), l;
|
|
28475
28475
|
this._newCacheData[i].options = Od;
|
28476
28476
|
else if (e.options)
|
28477
28477
|
if (!e.options.includes(s))
|
28478
|
-
this._errorListener.addError(Xe(
|
28478
|
+
this._errorListener.addError(Xe(T1.inputOptErr, { defval: String(s), args: e.options.toString() }), t, i1.Error, 6 + (r?.length || -1));
|
28479
28479
|
else {
|
28480
28480
|
const c = /* @__PURE__ */ new Map();
|
28481
28481
|
for (const p of e.options) {
|
28482
28482
|
if (c.has(p)) {
|
28483
|
-
this._errorListener.addError(Xe(
|
28483
|
+
this._errorListener.addError(Xe(T1.optionsRepeatErr, { option: String(p) }), t, i1.Error, 6 + (r?.length || -1));
|
28484
28484
|
break;
|
28485
28485
|
}
|
28486
28486
|
c.set(p, p);
|
@@ -28490,11 +28490,11 @@ ${l}`), l;
|
|
28490
28490
|
return self.workerStorage.setValue(this._name, i, { ...e }), this._newCacheData[i].defval;
|
28491
28491
|
}
|
28492
28492
|
_displayVerify(e, t) {
|
28493
|
-
!t || !t.length || t.includes(Zt.dataWindow) || t.includes(Zt.statusLine) || this._errorListener.addError(Xe(
|
28493
|
+
!t || !t.length || t.includes(Zt.dataWindow) || t.includes(Zt.statusLine) || this._errorListener.addError(Xe(T1.displayErr, { func: "input", values: "[display.none, display.data_window, display.status_line, display.all]" }), e, i1.Error);
|
28494
28494
|
}
|
28495
28495
|
_verifyMaxOrMin(e, t) {
|
28496
28496
|
const { defval: r, maxval: i, minval: o } = e;
|
28497
|
-
typeof r == "number" && (i !== void 0 && r > i || o !== void 0 && r < o) && this._errorListener.addError(
|
28497
|
+
typeof r == "number" && (i !== void 0 && r > i || o !== void 0 && r < o) && this._errorListener.addError(T1.minOrMaxErr, t, i1.Error);
|
28498
28498
|
}
|
28499
28499
|
getInputs() {
|
28500
28500
|
const e = Object.keys(this._newCacheData), t = [];
|
@@ -31750,7 +31750,7 @@ ${fd}`);
|
|
31750
31750
|
if (!e)
|
31751
31751
|
return;
|
31752
31752
|
if (t * r !== (this.columns({ id: e }) || 0) * (this.rows({ id: e }) || 0)) {
|
31753
|
-
this._errorListener.addError(
|
31753
|
+
this._errorListener.addError(T1.matrixRehapeErr, i, i1.Error);
|
31754
31754
|
return;
|
31755
31755
|
}
|
31756
31756
|
const o = ew(e._matrixArray, [t, r]);
|
@@ -32143,7 +32143,7 @@ ${fd}`);
|
|
32143
32143
|
}
|
32144
32144
|
repeat({ source: e = "", repeat: t, separator: r = "" }, i) {
|
32145
32145
|
if (u0(t)) {
|
32146
|
-
this._errorListener.addError(
|
32146
|
+
this._errorListener.addError(T1.arrLenErr, i, i1.Error);
|
32147
32147
|
return;
|
32148
32148
|
}
|
32149
32149
|
return Array.from(new Array(t), () => e).join(r);
|
@@ -32429,7 +32429,7 @@ ${fd}`);
|
|
32429
32429
|
_updateIds = /* @__PURE__ */ new Set();
|
32430
32430
|
_defaultLabel = {
|
32431
32431
|
text: "",
|
32432
|
-
xloc:
|
32432
|
+
xloc: C1.bar_index,
|
32433
32433
|
yloc: Xt.price,
|
32434
32434
|
size: Te.normal,
|
32435
32435
|
style: $1.styleLabelDown,
|
@@ -32446,7 +32446,7 @@ ${fd}`);
|
|
32446
32446
|
const { time: i, high: o, low: s, bar_index: a } = this._variables, c = `label_${t}_${a}`;
|
32447
32447
|
e = this._parameterHandle(e, r), Y1(e, ["color", "textcolor"]);
|
32448
32448
|
const p = { ...this._defaultLabel, ...e, id: c, time: i, high: o, low: s, bar_index: a };
|
32449
|
-
e.x && (p.x = e.x && Math.floor(e.x)), e.point && (p.x = p.xloc ===
|
32449
|
+
e.x && (p.x = e.x && Math.floor(e.x)), e.point && (p.x = p.xloc === C1.bar_index ? e.point.index : e.point.time, p.y = e.point.price), p.yloc === Xt.abovebar ? p.y = o : p.yloc === Xt.belowbar && (p.y = s), this._verfiyArgs(e, t);
|
32450
32450
|
const b = Cu(c, p);
|
32451
32451
|
return t.startsWith("export") || this._variables.label.add(c, p, b), b;
|
32452
32452
|
}
|
@@ -32463,17 +32463,17 @@ ${fd}`);
|
|
32463
32463
|
}
|
32464
32464
|
_preVerfiyArgs(e) {
|
32465
32465
|
const { xloc: t, yloc: r, style: i, size: o, textalign: s, text_font_family: a } = e;
|
32466
|
-
return this._paramVerfiyHandle(i, Object.values($1)) || this._paramVerfiyHandle(t, Object.values(
|
32466
|
+
return this._paramVerfiyHandle(i, Object.values($1)) || this._paramVerfiyHandle(t, Object.values(C1)) || this._paramVerfiyHandle(r, Object.values(Xt)) || this._paramVerfiyHandle(o, Object.values(Te)) || this._paramVerfiyHandle(s, [S0.alignLeft, S0.alignCenter, S0.alignRight]) || this._paramVerfiyHandle(a, Object.values(ri));
|
32467
32467
|
}
|
32468
32468
|
_paramVerfiyHandle(e = "", t) {
|
32469
32469
|
return e && !t.includes(e);
|
32470
32470
|
}
|
32471
32471
|
_verfiyArgs(e, t) {
|
32472
32472
|
const { xloc: r, yloc: i, style: o, size: s, textalign: a, text_font_family: c } = e, p = "label.new";
|
32473
|
-
this._paramVerfiy(o, t, p, Object.values($1), "style"), this._paramVerfiy(r, t, p, Object.values(
|
32473
|
+
this._paramVerfiy(o, t, p, Object.values($1), "style"), this._paramVerfiy(r, t, p, Object.values(C1), "xloc"), this._paramVerfiy(i, t, p, Object.values(Xt), "yloc"), this._paramVerfiy(s, t, p, Object.values(Te), "size"), this._paramVerfiy(a, t, p, [S0.alignLeft, S0.alignCenter, S0.alignRight], "textalign"), this._paramVerfiy(c, t, p, Object.values(ri), "text_font_family");
|
32474
32474
|
}
|
32475
32475
|
_paramVerfiy(e = "", t, r, i, o) {
|
32476
|
-
this._paramVerfiyHandle(e, i) && this._errorListener.addError(Xe(
|
32476
|
+
this._paramVerfiyHandle(e, i) && this._errorListener.addError(Xe(T1.paramsErr, { value: e, func: r, param: o, targetVal: `[${i.join(", ")}]` }), t, i1.Error);
|
32477
32477
|
}
|
32478
32478
|
updateId(e) {
|
32479
32479
|
const { bar_index: t, _isRealTimeBar: r } = this._variables;
|
@@ -32547,7 +32547,7 @@ ${fd}`);
|
|
32547
32547
|
return;
|
32548
32548
|
D0(this._errorListener, "label.set_xloc", this._variables.__requestName, i);
|
32549
32549
|
const o = this._getLabel(e);
|
32550
|
-
o && (o.x = t && Math.floor(t), o.xloc = r, this._updateIds.add(e.id), this._paramVerfiy(r, i, "label.set_xloc", Object.values(
|
32550
|
+
o && (o.x = t && Math.floor(t), o.xloc = r, this._updateIds.add(e.id), this._paramVerfiy(r, i, "label.set_xloc", Object.values(C1), "xloc"));
|
32551
32551
|
}
|
32552
32552
|
set_yloc({ id: e, yloc: t }, r) {
|
32553
32553
|
if (!e)
|
@@ -32582,7 +32582,7 @@ ${fd}`);
|
|
32582
32582
|
return;
|
32583
32583
|
D0(this._errorListener, "label.set_point", this._variables.__requestName, r);
|
32584
32584
|
const i = this._getLabel(e);
|
32585
|
-
i && (i.x = i.xloc ===
|
32585
|
+
i && (i.x = i.xloc === C1.bar_index ? t?.index : t?.time, i.y = t?.price, this._updateIds.add(e.id));
|
32586
32586
|
}
|
32587
32587
|
set_text({ id: e, text: t }, r) {
|
32588
32588
|
if (!e)
|
@@ -32820,8 +32820,8 @@ ${fd}`);
|
|
32820
32820
|
wrap_auto: S0.wrapAuto,
|
32821
32821
|
wrap_none: S0.wrapNone
|
32822
32822
|
}, W7 = {
|
32823
|
-
bar_index:
|
32824
|
-
bar_time:
|
32823
|
+
bar_index: C1.bar_index,
|
32824
|
+
bar_time: C1.bar_time
|
32825
32825
|
}, g7 = {
|
32826
32826
|
abovebar: Xt.abovebar,
|
32827
32827
|
belowbar: Xt.belowbar,
|
@@ -32887,7 +32887,7 @@ ${fd}`);
|
|
32887
32887
|
_defaultPolyline = {
|
32888
32888
|
curved: !1,
|
32889
32889
|
closed: !1,
|
32890
|
-
xloc:
|
32890
|
+
xloc: C1.bar_index,
|
32891
32891
|
line_color: $n.blue,
|
32892
32892
|
line_style: ne.styleSolid,
|
32893
32893
|
line_width: 1
|
@@ -32908,10 +32908,10 @@ ${fd}`);
|
|
32908
32908
|
}
|
32909
32909
|
_verfiyArgs(e, t) {
|
32910
32910
|
const { line_style: r, xloc: i } = e, o = "polyline.new";
|
32911
|
-
this._paramVerfiy(r, t, o, Object.values(ne), "line_style"), this._paramVerfiy(i, t, o, Object.values(
|
32911
|
+
this._paramVerfiy(r, t, o, Object.values(ne), "line_style"), this._paramVerfiy(i, t, o, Object.values(C1), "xloc");
|
32912
32912
|
}
|
32913
32913
|
_paramVerfiy(e = "", t, r, i, o) {
|
32914
|
-
e && !i.includes(e) && this._errorListener.addError(Xe(
|
32914
|
+
e && !i.includes(e) && this._errorListener.addError(Xe(T1.paramsErr, { value: e, func: r, param: o, targetVal: `[${i.join(", ")}]` }), t, i1.Error);
|
32915
32915
|
}
|
32916
32916
|
updateId(e) {
|
32917
32917
|
const { bar_index: t, _isRealTimeBar: r } = this._variables;
|
@@ -32946,7 +32946,7 @@ ${fd}`);
|
|
32946
32946
|
_errorListener;
|
32947
32947
|
_updateIds = /* @__PURE__ */ new Set();
|
32948
32948
|
_defaultLine = {
|
32949
|
-
xloc:
|
32949
|
+
xloc: C1.bar_index,
|
32950
32950
|
extend: ht.none,
|
32951
32951
|
style: ne.styleSolid
|
32952
32952
|
};
|
@@ -32964,7 +32964,7 @@ ${fd}`);
|
|
32964
32964
|
Y1(c, ["color"]);
|
32965
32965
|
const p = { ...this._defaultLine, ...c, id: o, bar_index: i }, { x1: b, x2: M } = p;
|
32966
32966
|
if (b && (p.x1 = b && Math.floor(b)), M && (p.x2 = M && Math.floor(M)), s && a) {
|
32967
|
-
const l = p.xloc ===
|
32967
|
+
const l = p.xloc === C1.bar_index ? s?.index : s?.time, f = p.xloc === C1.bar_index ? a?.index : a?.time;
|
32968
32968
|
Object.assign(p, {
|
32969
32969
|
x1: l,
|
32970
32970
|
y1: s?.price,
|
@@ -32989,17 +32989,17 @@ ${fd}`);
|
|
32989
32989
|
}
|
32990
32990
|
_preVerfiyArgs(e) {
|
32991
32991
|
const { extend: t, xloc: r, style: i } = e;
|
32992
|
-
return this._paramVerfiyHandle(i, Object.values(ne)) || this._paramVerfiyHandle(r, Object.values(
|
32992
|
+
return this._paramVerfiyHandle(i, Object.values(ne)) || this._paramVerfiyHandle(r, Object.values(C1)) || this._paramVerfiyHandle(t, Object.values(ht));
|
32993
32993
|
}
|
32994
32994
|
_paramVerfiyHandle(e = "", t) {
|
32995
32995
|
return e && !t.includes(e);
|
32996
32996
|
}
|
32997
32997
|
_verfiyArgs(e, t) {
|
32998
32998
|
const { extend: r, xloc: i, style: o } = e, s = "line.new";
|
32999
|
-
this._paramVerfiy(o, t, s, Object.values(ne), "style"), this._paramVerfiy(r, t, s, Object.values(ht), "extend"), this._paramVerfiy(i, t, s, Object.values(
|
32999
|
+
this._paramVerfiy(o, t, s, Object.values(ne), "style"), this._paramVerfiy(r, t, s, Object.values(ht), "extend"), this._paramVerfiy(i, t, s, Object.values(C1), "xloc");
|
33000
33000
|
}
|
33001
33001
|
_paramVerfiy(e = "", t, r, i, o) {
|
33002
|
-
e && !i.includes(e) && this._errorListener.addError(Xe(
|
33002
|
+
e && !i.includes(e) && this._errorListener.addError(Xe(T1.paramsErr, { value: e, func: r, param: o, targetVal: `[${i.join(", ")}]` }), t, i1.Error);
|
33003
33003
|
}
|
33004
33004
|
updateId(e) {
|
33005
33005
|
const { bar_index: t, _isRealTimeBar: r } = this._variables;
|
@@ -33091,7 +33091,7 @@ ${fd}`);
|
|
33091
33091
|
if (!e)
|
33092
33092
|
return;
|
33093
33093
|
const s = this._getLine(e, o, "set_xloc");
|
33094
|
-
s && (s.xloc = t, s.x1 = r && Math.floor(r), s.x2 = i && Math.floor(i), this._updateIds.add(e.id), this._paramVerfiy(t, o, "line.set_xloc", Object.values(
|
33094
|
+
s && (s.xloc = t, s.x1 = r && Math.floor(r), s.x2 = i && Math.floor(i), this._updateIds.add(e.id), this._paramVerfiy(t, o, "line.set_xloc", Object.values(C1), "xloc"));
|
33095
33095
|
}
|
33096
33096
|
get_price({ id: e, x: t }, r) {
|
33097
33097
|
if (!e)
|
@@ -33099,7 +33099,7 @@ ${fd}`);
|
|
33099
33099
|
const i = this._getLine(e, r, "get_price");
|
33100
33100
|
if (t === void 0)
|
33101
33101
|
return t;
|
33102
|
-
if (i && i.xloc ===
|
33102
|
+
if (i && i.xloc === C1.bar_index) {
|
33103
33103
|
const { x1: o, y1: s, x2: a, y2: c } = i;
|
33104
33104
|
return o === void 0 || a === void 0 || s === void 0 || c === void 0 ? void 0 : (c - s) / (a - o) * (t - o) + s;
|
33105
33105
|
}
|
@@ -33133,7 +33133,7 @@ ${fd}`);
|
|
33133
33133
|
return;
|
33134
33134
|
const i = this._getLine(e, r, "set_first_point");
|
33135
33135
|
if (i) {
|
33136
|
-
const { index: o, time: s, price: a } = t || {}, c = i.xloc ===
|
33136
|
+
const { index: o, time: s, price: a } = t || {}, c = i.xloc === C1.bar_index ? o : s, p = a;
|
33137
33137
|
c && (i.x1 = c), p && (i.y1 = p), this._updateIds.add(e.id);
|
33138
33138
|
}
|
33139
33139
|
}
|
@@ -33142,7 +33142,7 @@ ${fd}`);
|
|
33142
33142
|
return;
|
33143
33143
|
const i = this._getLine(e, r, "set_second_point");
|
33144
33144
|
if (i) {
|
33145
|
-
const { index: o, time: s, price: a } = t || {}, c = i.xloc ===
|
33145
|
+
const { index: o, time: s, price: a } = t || {}, c = i.xloc === C1.bar_index ? o : s, p = a;
|
33146
33146
|
c && (i.x2 = c), p && (i.y2 = p), this._updateIds.add(e.id);
|
33147
33147
|
}
|
33148
33148
|
}
|
@@ -33238,7 +33238,7 @@ ${fd}`);
|
|
33238
33238
|
border_color: $n.blue,
|
33239
33239
|
border_width: 1,
|
33240
33240
|
bgcolor: $n.blue,
|
33241
|
-
xloc:
|
33241
|
+
xloc: C1.bar_index,
|
33242
33242
|
extend: ht.none,
|
33243
33243
|
style: ne.styleSolid,
|
33244
33244
|
text: "",
|
@@ -33266,11 +33266,11 @@ ${fd}`);
|
|
33266
33266
|
const { left: b, right: M } = p;
|
33267
33267
|
if (b && (p.left = b && Math.floor(b)), M && (p.right = M && Math.floor(M)), s) {
|
33268
33268
|
const { price: l, time: f, index: d } = s;
|
33269
|
-
p.top = l, p.left = p.xloc ===
|
33269
|
+
p.top = l, p.left = p.xloc === C1.bar_index ? d : f;
|
33270
33270
|
}
|
33271
33271
|
if (a) {
|
33272
33272
|
const { price: l, time: f, index: d } = a;
|
33273
|
-
p.bottom = l, p.right = p.xloc ===
|
33273
|
+
p.bottom = l, p.right = p.xloc === C1.bar_index ? d : f;
|
33274
33274
|
}
|
33275
33275
|
this._verfiyArgs(c, t);
|
33276
33276
|
const O = Eu(o, p);
|
@@ -33289,17 +33289,17 @@ ${fd}`);
|
|
33289
33289
|
}
|
33290
33290
|
_preVerfiyArgs(e) {
|
33291
33291
|
const { border_style: t, extend: r, xloc: i, text_size: o, text_halign: s, text_valign: a, text_wrap: c, text_font_family: p } = e;
|
33292
|
-
return this._paramVerfiyHandle(t, [ne.styleDashed, ne.styleDotted, ne.styleSolid]) || this._paramVerfiyHandle(r, Object.values(ht)) || this._paramVerfiyHandle(i, Object.values(
|
33292
|
+
return this._paramVerfiyHandle(t, [ne.styleDashed, ne.styleDotted, ne.styleSolid]) || this._paramVerfiyHandle(r, Object.values(ht)) || this._paramVerfiyHandle(i, Object.values(C1)) || this._paramVerfiyHandle(o, Object.values(Te)) || this._paramVerfiyHandle(s, [S0.alignLeft, S0.alignCenter, S0.alignRight]) || this._paramVerfiyHandle(a, [S0.alignBottom, S0.alignCenter, S0.alignTop]) || this._paramVerfiyHandle(c, [S0.wrapAuto, S0.wrapNone]) || this._paramVerfiyHandle(p, Object.values(ri));
|
33293
33293
|
}
|
33294
33294
|
_paramVerfiyHandle(e = "", t) {
|
33295
33295
|
return e && !t.includes(e);
|
33296
33296
|
}
|
33297
33297
|
_verfiyArgs(e, t) {
|
33298
33298
|
const { border_style: r, extend: i, xloc: o, text_size: s, text_halign: a, text_valign: c, text_wrap: p, text_font_family: b } = e, M = "box.new";
|
33299
|
-
this._paramVerfiy(r, t, M, [ne.styleDashed, ne.styleDotted, ne.styleSolid], "border_style"), this._paramVerfiy(i, t, M, Object.values(ht), "extend"), this._paramVerfiy(o, t, M, Object.values(
|
33299
|
+
this._paramVerfiy(r, t, M, [ne.styleDashed, ne.styleDotted, ne.styleSolid], "border_style"), this._paramVerfiy(i, t, M, Object.values(ht), "extend"), this._paramVerfiy(o, t, M, Object.values(C1), "xloc"), this._paramVerfiy(s, t, M, Object.values(Te), "text_size"), this._paramVerfiy(a, t, M, [S0.alignLeft, S0.alignCenter, S0.alignRight], "text_halign"), this._paramVerfiy(c, t, M, [S0.alignBottom, S0.alignCenter, S0.alignTop], "text_valign"), this._paramVerfiy(p, t, M, [S0.wrapAuto, S0.wrapNone], "text_wrap"), this._paramVerfiy(b, t, M, Object.values(ri), "text_font_family");
|
33300
33300
|
}
|
33301
33301
|
_paramVerfiy(e = "", t, r, i, o) {
|
33302
|
-
e && !i.includes(e) && this._errorListener.addError(Xe(
|
33302
|
+
e && !i.includes(e) && this._errorListener.addError(Xe(T1.paramsErr, { value: e, func: r, param: o, targetVal: `[${i.join(", ")}]` }), t, i1.Error);
|
33303
33303
|
}
|
33304
33304
|
updateId(e) {
|
33305
33305
|
const { bar_index: t, _isRealTimeBar: r } = this._variables;
|
@@ -33479,7 +33479,7 @@ ${fd}`);
|
|
33479
33479
|
const i = this._getBox(e);
|
33480
33480
|
if (i) {
|
33481
33481
|
const { index: o, price: s, time: a } = t || {};
|
33482
|
-
i.top = s, i.left = i.xloc ===
|
33482
|
+
i.top = s, i.left = i.xloc === C1.bar_index ? o : a, this._updateIds.add(e.id);
|
33483
33483
|
}
|
33484
33484
|
}
|
33485
33485
|
set_bottom_right_point({ id: e, point: t }, r) {
|
@@ -33489,7 +33489,7 @@ ${fd}`);
|
|
33489
33489
|
const i = this._getBox(e);
|
33490
33490
|
if (i) {
|
33491
33491
|
const { index: o, price: s, time: a } = t || {};
|
33492
|
-
i.bottom = s, i.right = i.xloc ===
|
33492
|
+
i.bottom = s, i.right = i.xloc === C1.bar_index ? o : a, this._updateIds.add(e.id);
|
33493
33493
|
}
|
33494
33494
|
}
|
33495
33495
|
set_text_font_family({ id: e, text_font_family: t }, r) {
|
@@ -33499,6 +33499,13 @@ ${fd}`);
|
|
33499
33499
|
const i = this._getBox(e);
|
33500
33500
|
i && (i.text_font_family = t, this._updateIds.add(e.id), this._paramVerfiy(t, r, "box.set_text_font_family", Object.values(ri), "text_font_family"));
|
33501
33501
|
}
|
33502
|
+
set_xloc({ id: e, left: t, right: r, xloc: i }, o) {
|
33503
|
+
if (!e)
|
33504
|
+
return;
|
33505
|
+
D0(this._errorListener, "box.set_xloc", this._variables.__requestName, o);
|
33506
|
+
const s = this._getBox(e);
|
33507
|
+
s && (s.left = t && Math.floor(t), s.right = r && Math.floor(r), s.xloc = i, this._updateIds.add(e.id), this._paramVerfiy(i, o, "box.set_xloc", Object.values(C1), "xloc"));
|
33508
|
+
}
|
33502
33509
|
_getBox(e) {
|
33503
33510
|
return this._variables.box.get(e.id) || e.data;
|
33504
33511
|
}
|
@@ -33550,7 +33557,7 @@ ${fd}`);
|
|
33550
33557
|
return this._paramVerfiy(e.position, t, "table.new", Object.values(dt), "position"), t.startsWith("export") || this._variables.table.add(i, b, M), M;
|
33551
33558
|
}
|
33552
33559
|
_paramVerfiy(e = "", t, r, i, o) {
|
33553
|
-
e && !i.includes(e) && this._errorListener.addError(Xe(
|
33560
|
+
e && !i.includes(e) && this._errorListener.addError(Xe(T1.paramsErr, { value: e, func: r, param: o, targetVal: `[${i.join(", ")}]` }), t, i1.Error);
|
33554
33561
|
}
|
33555
33562
|
updateId(e) {
|
33556
33563
|
const { bar_index: t, _isRealTimeBar: r } = this._variables;
|
@@ -33672,7 +33679,7 @@ ${fd}`);
|
|
33672
33679
|
if (!e)
|
33673
33680
|
return;
|
33674
33681
|
if (this._verfiyRequestFunc(s, "merge_cells"), t > i || r > o) {
|
33675
|
-
this._errorListener.addError(
|
33682
|
+
this._errorListener.addError(T1.mergeCellErr, s, i1.Error);
|
33676
33683
|
return;
|
33677
33684
|
}
|
33678
33685
|
const a = this._getTable(e);
|
@@ -33925,7 +33932,7 @@ ${fd}`);
|
|
33925
33932
|
this._strategy._verfiyRequestFunc(t, "strategy.risk.*"), this._strategy.updateRisk({ max_position_size: e });
|
33926
33933
|
}
|
33927
33934
|
_paramVerfiy(e = "", t, r, i, o) {
|
33928
|
-
e && !i.includes(e) && this._errorListener.addError(Xe(
|
33935
|
+
e && !i.includes(e) && this._errorListener.addError(Xe(T1.paramsErr, { value: e, func: r, param: o, targetVal: `[${i.join(", ")}]` }), t, i1.Error);
|
33929
33936
|
}
|
33930
33937
|
}
|
33931
33938
|
let I7 = class {
|
@@ -34241,7 +34248,7 @@ ${fd}`);
|
|
34241
34248
|
if (!String(e).includes("."))
|
34242
34249
|
return e;
|
34243
34250
|
const r = this._getLen();
|
34244
|
-
return Jp(Math[t](
|
34251
|
+
return Jp(Math[t](S1(e, Math.pow(10, r))), Math.pow(10, r));
|
34245
34252
|
}
|
34246
34253
|
_getCommQty(e, t) {
|
34247
34254
|
const { commission_type: r, commission_value: i = 0, default_qty_value: o = 0 } = this._options;
|
@@ -34576,7 +34583,7 @@ ${fd}`);
|
|
34576
34583
|
if (b === 0)
|
34577
34584
|
O = p, s && p > t || !s && p < t ? l = 1 : l = 2;
|
34578
34585
|
else {
|
34579
|
-
M = $t(p,
|
34586
|
+
M = $t(p, S1(b * c, this._mintick));
|
34580
34587
|
let f = i, d = r;
|
34581
34588
|
s ? p >= t && p <= i ? (f = i, l = 1) : (s = !1, f = o, l = 2) : p < t && p >= r ? (d = r, l = 1) : (s = !0, d = o, l = 2);
|
34582
34589
|
const [h, A, q = 1] = this._calcTrailStopPrice(M, f, d, o, b, c, s);
|
@@ -34596,7 +34603,7 @@ ${fd}`);
|
|
34596
34603
|
}
|
34597
34604
|
_calcTrailStopPrice(e, t, r, i, o, s, a) {
|
34598
34605
|
let c = e, p;
|
34599
|
-
const b = $t(s === 1 ? t : r,
|
34606
|
+
const b = $t(s === 1 ? t : r, S1(o * s, this._mintick));
|
34600
34607
|
let M = 1;
|
34601
34608
|
return s === 1 ? a ? (c < b && (c = b), c >= r && (M = 2, p = c)) : c >= r ? (M = 1, p = c) : b > c && (c = b, b >= i && (M = 3, p = b)) : a ? c <= t ? (M = 1, p = c) : b < c && (c = b, b <= i && (M = 3, p = b)) : (b < c && (c = b), c <= t && (M = 2, p = c)), [c, p, M];
|
34602
34609
|
}
|
@@ -34723,7 +34730,7 @@ ${fd}`);
|
|
34723
34730
|
const W = A && (A - t) * f <= 0;
|
34724
34731
|
q && W || (h && !q || A && !W) && (l = t);
|
34725
34732
|
}
|
34726
|
-
const d = kt(l,
|
34733
|
+
const d = kt(l, S1(f * O, this._mintick));
|
34727
34734
|
if (l <= i && d >= r) {
|
34728
34735
|
const h = this._getOrders(p, M);
|
34729
34736
|
this._entryOrder(h, l, a, e);
|
@@ -34745,7 +34752,7 @@ ${fd}`);
|
|
34745
34752
|
const w = L && (L - o) * g <= 0;
|
34746
34753
|
B && w || (y && !B || L && !w) && (m = o);
|
34747
34754
|
}
|
34748
|
-
const R = kt(m,
|
34755
|
+
const R = kt(m, S1(g * p, this._mintick));
|
34749
34756
|
if (m <= a && R >= s) {
|
34750
34757
|
const y = this._getOrders(l, q);
|
34751
34758
|
if (y.length && (W = this._processOrders(y, m, M, q, f, !1, "order"), W <= 0))
|
@@ -34787,7 +34794,7 @@ ${fd}`);
|
|
34787
34794
|
_exit(e, t) {
|
34788
34795
|
if (!e.hasOwnProperty("profit") && !e.hasOwnProperty("loss") && !e.hasOwnProperty("stop") && !e.hasOwnProperty("limit") && (!e.hasOwnProperty("trail_offset") || !e.hasOwnProperty("trail_price") && !e.hasOwnProperty("trail_points"))) {
|
34789
34796
|
this._errorListener.addError(
|
34790
|
-
|
34797
|
+
T1.strategyExitErr,
|
34791
34798
|
t,
|
34792
34799
|
i1.Error
|
34793
34800
|
);
|
@@ -34852,7 +34859,7 @@ ${fd}`);
|
|
34852
34859
|
const { limit: o, profit: s, comment_profit: a, comment: c, id: p, qty: b } = r;
|
34853
34860
|
let M = o;
|
34854
34861
|
const { in_price: O } = e, { process_orders_on_close: l } = this._options;
|
34855
|
-
if (!this._isNaN(s) && this._isNaN(o) && (M = kt(O,
|
34862
|
+
if (!this._isNaN(s) && this._isNaN(o) && (M = kt(O, S1(s * t, this._mintick))), M = t === 1 ? gu(M, this._variables.precision) : vu(M, this._variables.precision), r.limit = M, i)
|
34856
34863
|
return;
|
34857
34864
|
let { close: f } = this.calcOnOrderFillsData.data || this._variables;
|
34858
34865
|
if (this.calcOnOrderFillsData?.tradeData?.open && (f = this.calcOnOrderFillsData.tradeData.open), M !== void 0 && (M - f) * t <= 0)
|
@@ -34862,7 +34869,7 @@ ${fd}`);
|
|
34862
34869
|
const { stop: o, loss: s, comment_loss: a, comment: c, id: p, qty: b } = r;
|
34863
34870
|
let M = o;
|
34864
34871
|
const { in_price: O } = e, { process_orders_on_close: l } = this._options;
|
34865
|
-
if (!this._isNaN(s) && this._isNaN(o) && (M = $t(O,
|
34872
|
+
if (!this._isNaN(s) && this._isNaN(o) && (M = $t(O, S1(s * t, this._mintick))), M = t === 1 ? vu(M, this._variables.precision) : gu(M, this._variables.precision), r.stop = M, i)
|
34866
34873
|
return;
|
34867
34874
|
let { close: f } = this.calcOnOrderFillsData.data || this._variables;
|
34868
34875
|
if (this.calcOnOrderFillsData?.tradeData?.open && (f = this.calcOnOrderFillsData.tradeData.open), M !== void 0 && (M - f) * t >= 0)
|
@@ -34873,11 +34880,11 @@ ${fd}`);
|
|
34873
34880
|
if (!this._isNaN(o)) {
|
34874
34881
|
const { in_price: O } = e, { process_orders_on_close: l } = this._options;
|
34875
34882
|
let f;
|
34876
|
-
if (this._isNaN(s) ? this._isNaN(a) || (f = kt(O,
|
34883
|
+
if (this._isNaN(s) ? this._isNaN(a) || (f = kt(O, S1(a * t, this._mintick))) : f = s, r.active_price = f, i)
|
34877
34884
|
return;
|
34878
34885
|
let { close: d } = this.calcOnOrderFillsData.data || this._variables;
|
34879
34886
|
if (this.calcOnOrderFillsData?.tradeData?.open && (d = this.calcOnOrderFillsData.tradeData.open), f !== void 0 && (f - d) * t <= 0) {
|
34880
|
-
const h = $t(d,
|
34887
|
+
const h = $t(d, S1(o * t, this._mintick));
|
34881
34888
|
if ((h - d) * t >= 0)
|
34882
34889
|
return e.isMarketPriceStop = !0, r.comment = c || p, Object.assign(e, { out_comment: r.comment, out_id: b, out_qty: M }), l && this._addExitPendingCloseOrders(r), !0;
|
34883
34890
|
r.trail_stop_price = h;
|
@@ -35019,7 +35026,7 @@ ${fd}`);
|
|
35019
35026
|
return e === void 0 || isNaN(e);
|
35020
35027
|
}
|
35021
35028
|
_paramVerfiy(e = "", t, r, i, o) {
|
35022
|
-
e && !i.includes(e) && this._errorListener.addError(Xe(
|
35029
|
+
e && !i.includes(e) && this._errorListener.addError(Xe(T1.paramsErr, { value: e, func: r, param: o, targetVal: `[${i.join(", ")}]` }), t, i1.Error);
|
35023
35030
|
}
|
35024
35031
|
_verfiyRequestFunc(e, t) {
|
35025
35032
|
D0(this._errorListener, `strategy.${t}`, this._variables.__requestName, e);
|
@@ -35207,7 +35214,7 @@ ${fd}`);
|
|
35207
35214
|
if (e.type === s1.MAP && c.includes(`map<${e.keyTypeName},${e.typeName}>`))
|
35208
35215
|
return r(...i);
|
35209
35216
|
}
|
35210
|
-
this._errorListener.addError(Xe(
|
35217
|
+
this._errorListener.addError(Xe(T1.methodNotExistErr, { methodName: a, name: s }), o, i1.Error);
|
35211
35218
|
}
|
35212
35219
|
_getFirstArgName(e, t) {
|
35213
35220
|
switch (e) {
|
@@ -35262,7 +35269,7 @@ ${fd}`);
|
|
35262
35269
|
library(e, t) {
|
35263
35270
|
if (!this._variables.bar_index) {
|
35264
35271
|
const r = /^[^\W\d\s][^\W\s]*$/, { title: i } = e;
|
35265
|
-
r.test(i) ? (UD.includes(i) || PD.includes(i)) && this._errorListener.addError(Xe(
|
35272
|
+
r.test(i) ? (UD.includes(i) || PD.includes(i)) && this._errorListener.addError(Xe(T1.libraryTitleIsKeywordErr, { name: i }), t, i1.Error) : this._errorListener.addError(T1.libraryTitleErr, t, i1.Error), this._options.scriptType = "library", this._options.library = e;
|
35266
35273
|
}
|
35267
35274
|
}
|
35268
35275
|
indicator(e, t) {
|
@@ -35272,7 +35279,7 @@ ${fd}`);
|
|
35272
35279
|
}
|
35273
35280
|
}
|
35274
35281
|
_paramVerfiy(e = "", t, r, i, o = "format") {
|
35275
|
-
e && !i.includes(e) && this._errorListener.addError(Xe(
|
35282
|
+
e && !i.includes(e) && this._errorListener.addError(Xe(T1.paramsErr, { value: e, func: r, param: o, targetVal: `[${i.join(", ")}]` }), t, i1.Error);
|
35276
35283
|
}
|
35277
35284
|
_lineWidthVerify(e, t) {
|
35278
35285
|
const { linewidth: r = 1 } = e;
|
@@ -35357,7 +35364,7 @@ ${fd}`);
|
|
35357
35364
|
const L = this._plots.get(b?.key), B = this._plots.get(M?.key), N = L?.data || [], w = B?.data || [];
|
35358
35365
|
if (g = N[d]?.value?.[1], R = w[d]?.value?.[1], !d) {
|
35359
35366
|
const T = L?.force_overlay && B?.force_overlay;
|
35360
|
-
(L?.force_overlay || B?.force_overlay) && !T ? this._errorListener.addError(
|
35367
|
+
(L?.force_overlay || B?.force_overlay) && !T ? this._errorListener.addError(T1.plotFillForceOverlayErr, t, i1.Error) : f.force_overlay = T;
|
35361
35368
|
}
|
35362
35369
|
}
|
35363
35370
|
if (m[d] = { time: h, color: i, top_color: o, bottom_color: s, barIndex: d, plot1: g, plot2: R, top_value: O, bottom_value: l }, this._seriesColorHandle(e, r, q), !q) {
|
@@ -35421,7 +35428,7 @@ ${fd}`);
|
|
35421
35428
|
this._setColors(e, "bgcolor", t);
|
35422
35429
|
}
|
35423
35430
|
_verifyDisplay(e = yd.all, t, r) {
|
35424
|
-
e.length && e.length < 4 && this._errorListener.addError(Xe(
|
35431
|
+
e.length && e.length < 4 && this._errorListener.addError(Xe(T1.displayErr, { func: t, values: "[display.none, display.all]" }), r, i1.Error);
|
35425
35432
|
}
|
35426
35433
|
_setColors(e, t, r) {
|
35427
35434
|
Y1(e, ["color"]);
|
@@ -35742,7 +35749,7 @@ ${l}`), l;
|
|
35742
35749
|
let l = Ke(s, M) * 1e3;
|
35743
35750
|
const f = Ke(b, M) * 1e3;
|
35744
35751
|
if (l > f)
|
35745
|
-
return !p && this._errorListener.addError(Xe(
|
35752
|
+
return !p && this._errorListener.addError(Xe(T1.requestLowerTfPeriodErr, { period: s }), t, i1.Error, 25), [];
|
35746
35753
|
const d = `${o}--${s}`, h = self.workerStorage.get(`request_${this._scriptId}_data`), A = self.workerStorage.get(`request_${this._scriptId}_list`), q = self.workerStorage.get(`request_${this._scriptId}_tmp`), m = {
|
35747
35754
|
id: d,
|
35748
35755
|
calc_bars_count: a,
|
@@ -37567,7 +37574,7 @@ ${l}`), l;
|
|
37567
37574
|
startColumn: 0,
|
37568
37575
|
endColumn: 0,
|
37569
37576
|
startLineNumber: 0,
|
37570
|
-
message:
|
37577
|
+
message: T1.scriptLongTimeErr,
|
37571
37578
|
type: i1.Error
|
37572
37579
|
}]
|
37573
37580
|
};
|
@@ -37597,7 +37604,7 @@ ${l}`), l;
|
|
37597
37604
|
startColumn: 0,
|
37598
37605
|
endColumn: 0,
|
37599
37606
|
startLineNumber: 0,
|
37600
|
-
message:
|
37607
|
+
message: T1.requestsNumErr,
|
37601
37608
|
type: i1.Error
|
37602
37609
|
}]
|
37603
37610
|
};
|