@guihz/trading-vue-editor-tes 0.0.19 → 0.0.21
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-ClJL6TbY.js → parserTccWorker-CVfKSNrL.js} +6 -6
- package/lib/assets/{scriptsRunWorker-vL9x1NCe.js → scriptsRunWorker-D2Gv6w1f.js} +19 -19
- package/lib/components/editor/parseScript/buildInFuncNamespace/matrix.d.ts +6 -5
- package/lib/components/editor/parseScript/buildInFuncNamespace/strategy.d.ts +4 -1
- package/lib/trading-vue-editor.js +182 -180
- package/lib/trading-vue-editor.umd.cjs +18 -18
- package/package.json +1 -1
@@ -9,6 +9,7 @@ interface IMatrixArgs {
|
|
9
9
|
row?: number;
|
10
10
|
power?: number;
|
11
11
|
value?: number;
|
12
|
+
id1?: any;
|
12
13
|
id2?: any;
|
13
14
|
from_row?: number;
|
14
15
|
to_row?: number;
|
@@ -33,20 +34,20 @@ export default class BuildInMatrix {
|
|
33
34
|
pow({ id, power }: IMatrixArgs): Matrix | undefined;
|
34
35
|
row({ id, row }: IMatrixArgs): PseudoArray | undefined;
|
35
36
|
set({ id, row, column, value }: IMatrixArgs): void;
|
36
|
-
sum({
|
37
|
+
sum({ id1, id2 }: IMatrixArgs): any;
|
37
38
|
copy({ id }: IMatrixArgs): Matrix | undefined;
|
38
|
-
diff({
|
39
|
+
diff({ id1, id2 }: IMatrixArgs): any;
|
39
40
|
rows({ id }: IMatrixArgs): number | undefined;
|
40
41
|
columns({ id }: IMatrixArgs): number | undefined;
|
41
42
|
fill({ id, value, from_row, to_row, from_column, to_column }: IMatrixArgs): void;
|
42
|
-
kron({
|
43
|
+
kron({ id1, id2 }: IMatrixArgs): any;
|
43
44
|
mode({ id }: IMatrixArgs): any;
|
44
|
-
mult({
|
45
|
+
mult({ id1, id2 }: IMatrixArgs): any;
|
45
46
|
pinv({ id }: IMatrixArgs): Matrix | undefined;
|
46
47
|
rank({ id }: IMatrixArgs): number | undefined;
|
47
48
|
sort({ id, column, order }: IMatrixArgs): void;
|
48
49
|
trace({ id }: IMatrixArgs): number | undefined;
|
49
|
-
concat({
|
50
|
+
concat({ id1, id2 }: IMatrixArgs): any;
|
50
51
|
median({ id }: IMatrixArgs): any;
|
51
52
|
add_col({ id, column, array_id }: IMatrixArgs): void;
|
52
53
|
add_row({ id, row, array_id }: IMatrixArgs): void;
|
@@ -74,19 +74,21 @@ interface IOrder extends IOrderArgs {
|
|
74
74
|
isMarketPriceLimit?: boolean;
|
75
75
|
isMarketPriceStop?: boolean;
|
76
76
|
isCancel?: boolean;
|
77
|
+
close_qty?: number;
|
77
78
|
}
|
78
79
|
type CloseEntriesRuleType = 'FIFO' | 'ANY';
|
79
80
|
export default class Strategy {
|
80
81
|
private _variables;
|
81
82
|
private _options;
|
82
83
|
private _totalChangeCapital;
|
83
|
-
private _freezeCapital;
|
84
84
|
private _historyOrder;
|
85
85
|
private _orders;
|
86
86
|
private _pendingOrders;
|
87
87
|
private _mintick;
|
88
88
|
private _funcOptions;
|
89
89
|
constructor(variables: BuiltInVariables, options: IKeyObjectValue, mintick?: number);
|
90
|
+
get _orderProfit(): number;
|
91
|
+
get _freezeCapital(): number;
|
90
92
|
updateOptions(options: IStrategy): void;
|
91
93
|
strategy(args: IStrategy): void;
|
92
94
|
order(args: IOrderArgs): void;
|
@@ -101,6 +103,7 @@ export default class Strategy {
|
|
101
103
|
private _calcDefaultQty;
|
102
104
|
private _getCapital;
|
103
105
|
private _calcProfitAndLoss;
|
106
|
+
private _calcLiquidate;
|
104
107
|
private _orderHandle;
|
105
108
|
private _judgeCapitalEnough;
|
106
109
|
private _ocaGroupVerify;
|