@guihz/trading-vue-editor-tes 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/assets/{parserTccWorker-cXJaK8VI.js → parserTccWorker-BOXqLi6O.js} +16 -16
- package/lib/assets/scriptsRunWorker-B-xbxuir.js +66 -0
- package/lib/components/diffEditor/index.d.ts +12 -0
- package/lib/components/editor/parseScript/buildInFuncNamespace/index.d.ts +2 -1
- package/lib/components/editor/parseScript/buildInFuncNamespace/strategy.d.ts +17 -34
- package/lib/packages/index.d.ts +1 -0
- package/lib/trading-vue-editor.js +1544 -1533
- package/lib/trading-vue-editor.umd.cjs +28 -28
- package/package.json +1 -1
- package/lib/assets/scriptsRunWorker-DEh9seQE.js +0 -66
@@ -0,0 +1,12 @@
|
|
1
|
+
import { Theme } from '@monaco-editor/react';
|
2
|
+
import { FC } from 'react';
|
3
|
+
interface IProps {
|
4
|
+
height?: string | number;
|
5
|
+
width?: string | number;
|
6
|
+
theme?: Theme;
|
7
|
+
modified?: string;
|
8
|
+
original?: string;
|
9
|
+
renderSideBySide?: boolean;
|
10
|
+
}
|
11
|
+
declare const TradingDiffEditor: FC<IProps>;
|
12
|
+
export default TradingDiffEditor;
|
@@ -14,9 +14,10 @@ import BuildInLine, { ILineArgs, Line } from "./line";
|
|
14
14
|
import BuildInLinefill, { TLinefill, Linefill } from "./linefill";
|
15
15
|
import BuildInBox, { IBoxArgs, Box } from "./box";
|
16
16
|
import BuildInTable, { ITableArgs, Table } from "./table";
|
17
|
+
import Strategy from './strategy';
|
17
18
|
import { Log } from './log';
|
18
19
|
import { Runtime } from './runtime';
|
19
20
|
export { TccErrorListener } from './errorListener';
|
20
21
|
export type { IColorArgs } from './color';
|
21
|
-
export { BuildInArray, BuildInMath, BuildInTa, BuildInInput, BuildInColor, BuildInMatrix, ChartPoint, Point, BuildInTimeframe, BuildInStr, BuildInMap, PseudoArray, VInputType, BuildInLabel, BuildInPolyline, BuildInLine, Label, Polyline, Line, BuildInLinefill, Linefill, BuildInBox, Box, BuildInTable, Table, Log, Runtime };
|
22
|
+
export { BuildInArray, BuildInMath, BuildInTa, BuildInInput, BuildInColor, BuildInMatrix, ChartPoint, Point, BuildInTimeframe, BuildInStr, BuildInMap, PseudoArray, VInputType, BuildInLabel, BuildInPolyline, BuildInLine, Label, Polyline, Line, BuildInLinefill, Linefill, BuildInBox, Box, BuildInTable, Table, Log, Runtime, Strategy };
|
22
23
|
export type { PartialLabelArgs, IPolyline, ILineArgs, TLinefill, IBoxArgs, ITableArgs };
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { IKeyObjectValue } from "../../type";
|
1
2
|
import { BuiltInVariables } from "../buildInVariables";
|
2
3
|
import { VCommission, VDirection, VFormatType, VOca, VScale, VStrategy } from "../enum";
|
3
4
|
interface IStrategy {
|
@@ -58,47 +59,29 @@ export default class Strategy {
|
|
58
59
|
private _variables;
|
59
60
|
private _options;
|
60
61
|
private _totalChangeCapital;
|
62
|
+
private _freezeCapital;
|
61
63
|
private _historyOrder;
|
62
64
|
private _orders;
|
63
65
|
private _pendingOrders;
|
64
66
|
private _mintick;
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
shorttitle?: string | undefined;
|
69
|
-
overlay?: boolean | undefined;
|
70
|
-
format?: VFormatType | undefined;
|
71
|
-
precision?: number | undefined;
|
72
|
-
scale?: VScale | undefined;
|
73
|
-
pyramiding?: number | undefined;
|
74
|
-
calc_on_order_fills?: boolean | undefined;
|
75
|
-
calc_on_every_tick?: boolean | undefined;
|
76
|
-
max_bars_back?: number | undefined;
|
77
|
-
backtest_fill_limits_assumption?: number | undefined;
|
78
|
-
default_qty_type?: VStrategy | undefined;
|
79
|
-
default_qty_value?: number | undefined;
|
80
|
-
initial_capital: number;
|
81
|
-
currency?: string | undefined;
|
82
|
-
slippage?: number | undefined;
|
83
|
-
commission_type?: VCommission | undefined;
|
84
|
-
commission_value?: number | undefined;
|
85
|
-
process_orders_on_close?: boolean | undefined;
|
86
|
-
close_entries_rule?: CloseEntriesRuleType | undefined;
|
87
|
-
margin_long?: number | undefined;
|
88
|
-
margin_short?: number | undefined;
|
89
|
-
explicit_plot_zorder?: boolean | undefined;
|
90
|
-
max_lines_count?: number | undefined;
|
91
|
-
max_labels_count?: number | undefined;
|
92
|
-
max_boxes_count?: number | undefined;
|
93
|
-
calc_bars_count?: number | undefined;
|
94
|
-
risk_free_rate?: number | undefined;
|
95
|
-
use_bar_magnifier?: boolean | undefined;
|
96
|
-
fill_orders_on_standard_ohlc?: boolean | undefined;
|
97
|
-
max_polylines_count?: number | undefined;
|
98
|
-
};
|
67
|
+
private _ocaMap;
|
68
|
+
private _funcOptions;
|
69
|
+
constructor(variables: BuiltInVariables, options: IKeyObjectValue, mintick?: number);
|
99
70
|
updateOptions(options: IStrategy): void;
|
100
71
|
strategy(args: IStrategy): void;
|
72
|
+
private _calcDefaultQty;
|
101
73
|
order(args: IOrderArgs): void;
|
74
|
+
private _orderHandle;
|
75
|
+
private _ocaGroupVerify;
|
76
|
+
private _processOrders;
|
77
|
+
private _addPendingOrders;
|
78
|
+
private _orderArgsParse;
|
79
|
+
entry(args: IOrderArgs): void;
|
80
|
+
private _entryHandle;
|
81
|
+
private _entryOrder;
|
82
|
+
private _addPendingEntry;
|
83
|
+
exit(args: IOrderArgs): void;
|
84
|
+
private _pendingOrderHandle;
|
102
85
|
private _longOrderHandle;
|
103
86
|
private _shortOrderHandle;
|
104
87
|
private _closeOrderHandle;
|
package/lib/packages/index.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
export { default as TradingVueEditor } from '../components/editor/index';
|
2
|
+
export { default as TradingVueDiffEditor } from '../components/diffEditor/index';
|
2
3
|
export type { IRefs as IEditorRefs } from '../components/editor/index';
|
3
4
|
export { parseTcc, scriptsRun } from '../components/editor/utils/parserTcc';
|
4
5
|
export type { IError, IPosition } from '../components/editor/parseScript/type';
|