@guihz/trading-vue-editor-tes 0.1.20 → 0.1.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-DzdECu81.js → parserTccWorker-DoVd1Ini.js} +44291 -25566
- package/lib/assets/{scriptsRunWorker-DO_0NAgb.js → scriptsRunWorker-NE25FJXj.js} +24876 -15587
- package/lib/components/editor/type/index.d.ts +2 -0
- package/lib/components/editor/utils/parserTccWorker.d.ts +1 -25
- package/lib/components/editor/utils/runTools.d.ts +4 -0
- package/lib/components/editor/utils/tools.d.ts +1 -4
- package/lib/components/editor/v3/parseScript/buildInFuncNamespace/strategy.d.ts +18 -2
- package/lib/components/editor/v3/parseScript/buildInVarNamespace/strategy.d.ts +8 -2
- package/lib/components/editor/v3/parseScript/buildInVariables.d.ts +1 -0
- package/lib/components/editor/v3/parseScript/constants.d.ts +3 -0
- package/lib/components/editor/v3/parseScript/constantsRun.d.ts +2 -0
- package/lib/components/editor/v4/parseScript/buildInFuncNamespace/strategy.d.ts +19 -2
- package/lib/components/editor/v4/parseScript/buildInVarNamespace/strategy.d.ts +8 -4
- package/lib/components/editor/v4/parseScript/constants.d.ts +3 -0
- package/lib/components/editor/v4/parseScript/constantsRun.d.ts +2 -0
- package/lib/components/editor/v5/parseScript/buildInConstants.d.ts +2 -0
- package/lib/components/editor/v5/parseScript/buildInVarNamespace/strategy.d.ts +8 -6
- package/lib/components/editor/v5/parseScript/constants.d.ts +2 -0
- package/lib/components/editor/v5/parseScript/constantsRun.d.ts +2 -0
- package/lib/components/editor/v5/parseScript/constants_en.d.ts +134 -0
- package/lib/components/editor/v5/parseScript/parseToJs.d.ts +2 -0
- package/lib/components/editor/v6/config/monarchTokens.d.ts +205 -0
- package/lib/components/editor/v6/constants/contents_zh.d.ts +6 -0
- package/lib/components/editor/v6/constants/index.d.ts +41 -0
- package/lib/components/editor/v6/parseScript/buildInConstants.d.ts +310 -0
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/array.d.ts +109 -0
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/box.d.ts +83 -0
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/chartPoint.d.ts +26 -0
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/color.d.ts +25 -0
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/errorListener.d.ts +9 -0
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/index.d.ts +25 -0
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/input.d.ts +57 -0
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/label.d.ts +66 -0
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/line.d.ts +74 -0
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/linefill.d.ts +36 -0
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/log.d.ts +39 -0
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/map.d.ts +51 -0
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/math.d.ts +49 -0
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/matrix.d.ts +98 -0
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/polyline.d.ts +32 -0
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/runtime.d.ts +10 -0
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/strategy.d.ts +279 -0
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/string.d.ts +55 -0
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/syminfo.d.ts +9 -0
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/ta.d.ts +125 -0
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/table.d.ts +89 -0
- package/lib/components/editor/v6/parseScript/buildInFuncNamespace/timeframe.d.ts +22 -0
- package/lib/components/editor/v6/parseScript/buildInVarNamespace/barstate.d.ts +22 -0
- package/lib/components/editor/v6/parseScript/buildInVarNamespace/chart.d.ts +21 -0
- package/lib/components/editor/v6/parseScript/buildInVarNamespace/dividends.d.ts +8 -0
- package/lib/components/editor/v6/parseScript/buildInVarNamespace/earnings.d.ts +9 -0
- package/lib/components/editor/v6/parseScript/buildInVarNamespace/index.d.ts +9 -0
- package/lib/components/editor/v6/parseScript/buildInVarNamespace/session.d.ts +12 -0
- package/lib/components/editor/v6/parseScript/buildInVarNamespace/strategy.d.ts +146 -0
- package/lib/components/editor/v6/parseScript/buildInVarNamespace/syminfo.d.ts +49 -0
- package/lib/components/editor/v6/parseScript/buildInVarNamespace/ta.d.ts +32 -0
- package/lib/components/editor/v6/parseScript/buildInVarNamespace/timeframe.d.ts +16 -0
- package/lib/components/editor/v6/parseScript/constants.d.ts +146 -0
- package/lib/components/editor/v6/parseScript/constantsRun.d.ts +5 -0
- package/lib/components/editor/v6/parseScript/enum.d.ts +302 -0
- package/lib/components/editor/v6/parseScript/parseToJs.d.ts +78 -0
- package/lib/components/editor/v6/parseScript/parseToLibJs.d.ts +71 -0
- package/lib/components/editor/v6/parseScript/strategyNamespace/closedtrades.d.ts +28 -0
- package/lib/components/editor/v6/parseScript/strategyNamespace/index.d.ts +4 -0
- package/lib/components/editor/v6/parseScript/strategyNamespace/opentrades.d.ts +25 -0
- package/lib/components/editor/v6/parseScript/strategyNamespace/risk.d.ts +22 -0
- package/lib/components/editor/v6/parseScript/type.d.ts +39 -0
- package/lib/components/editor/v6/parseScript/userTypeClass.d.ts +12 -0
- package/lib/components/editor/v6/parseScript/utils.d.ts +21 -0
- package/lib/components/editor/v6/parseScript/visitorParser.d.ts +384 -0
- package/lib/components/editor/v6/parseScript/visitorUtils.d.ts +31 -0
- package/lib/components/editor/v6/parserTccWorker.d.ts +40 -0
- package/lib/components/editor/v6/scriptsRunWorker.d.ts +11 -0
- package/lib/components/editor/v6/tccParser/LexerBase.d.ts +19 -0
- package/lib/components/editor/v6/tccParser/tccScriptParserVisitor.d.ts +507 -0
- package/lib/index-B2LF-839.js +61958 -0
- package/lib/{monarchTokens-D-73EVQs.js → monarchTokens-BNkQaBBZ.js} +22 -22
- package/lib/monarchTokens-Dzsc5GLx.js +563 -0
- package/lib/packages/index.d.ts +1 -1
- package/lib/trading-vue-editor.es.packages.js +1520 -1495
- package/lib/trading-vue-editor.umd.packages.mjs +110 -45
- package/package.json +2 -2
- package/lib/{index-DLIhM_y0.js → index-Clupi1hX.js} +24 -24
@@ -0,0 +1,146 @@
|
|
1
|
+
import { IKeyObjectValue } from "../../../type";
|
2
|
+
import { IOrder, IStrategy } from "../buildInFuncNamespace";
|
3
|
+
import { BuiltInVariables } from "../buildInVariables";
|
4
|
+
export declare class Strategy {
|
5
|
+
private _orders;
|
6
|
+
private _options?;
|
7
|
+
private _max_contracts_held_all;
|
8
|
+
private _max_contracts_held_long;
|
9
|
+
private _max_contracts_held_short;
|
10
|
+
private _max_drawdown;
|
11
|
+
private _max_runup;
|
12
|
+
private _max_runup_percent;
|
13
|
+
private _max_drawdown_percent;
|
14
|
+
private _variables;
|
15
|
+
private _netprofit;
|
16
|
+
private _eventrades;
|
17
|
+
private _avg_trade_percent?;
|
18
|
+
private _avg_losing_trade_percent?;
|
19
|
+
private _avg_winning_trade_percent?;
|
20
|
+
private _closedtrades;
|
21
|
+
private _losstrades;
|
22
|
+
private _grossloss;
|
23
|
+
private _grossprofit;
|
24
|
+
private _wintrades;
|
25
|
+
private _opentrades_capital_held;
|
26
|
+
private _position_avg_price?;
|
27
|
+
private _position_size;
|
28
|
+
private _openprofit;
|
29
|
+
private _preMaxNetValue;
|
30
|
+
private _preMinNetValue;
|
31
|
+
marginCallLong: number;
|
32
|
+
marginCallShort: number;
|
33
|
+
opentrades_long: number;
|
34
|
+
opentrades_short: number;
|
35
|
+
position_size_long: number;
|
36
|
+
position_size_short: number;
|
37
|
+
position_size_total: number;
|
38
|
+
openprofit_long: number;
|
39
|
+
openprofit_short: number;
|
40
|
+
private _firstIndex;
|
41
|
+
private _preHistoryOrderCalcResult;
|
42
|
+
private _firstPrice?;
|
43
|
+
constructor(variables: BuiltInVariables);
|
44
|
+
get _strategyCacheData(): IKeyObjectValue;
|
45
|
+
set _strategyCacheData(data: IKeyObjectValue);
|
46
|
+
update(data: IKeyObjectValue): void;
|
47
|
+
private _calcMaxDrawdownAndMaxRunup;
|
48
|
+
updateOrders(orders: IOrder[], isRemove?: boolean): void;
|
49
|
+
private _calcMaxContracts;
|
50
|
+
updateHistoryOrderCalcData(): void;
|
51
|
+
private _createBalanceByInterval;
|
52
|
+
updateHistoryOrder(order?: IOrder): void;
|
53
|
+
updateStrategyOptions(options: IStrategy): void;
|
54
|
+
get account_currency(): string;
|
55
|
+
get closedtrades(): {
|
56
|
+
closedtrades: number;
|
57
|
+
first_index: number;
|
58
|
+
};
|
59
|
+
get opentrades(): {
|
60
|
+
opentrades: number;
|
61
|
+
capital_held: number;
|
62
|
+
};
|
63
|
+
get price_first_long(): number;
|
64
|
+
get price_last_long(): number;
|
65
|
+
get avg_price_long(): number;
|
66
|
+
get price_highest_long(): number | undefined;
|
67
|
+
get price_lowest_long(): number | undefined;
|
68
|
+
get price_first_short(): number;
|
69
|
+
get price_last_short(): number;
|
70
|
+
get avg_price_short(): number;
|
71
|
+
get price_highest_short(): number | undefined;
|
72
|
+
get price_lowest_short(): number | undefined;
|
73
|
+
get avg_losing_trade(): number | undefined;
|
74
|
+
get avg_losing_trade_percent(): number | undefined;
|
75
|
+
get avg_trade(): number | undefined;
|
76
|
+
get equity(): number;
|
77
|
+
get netprofit(): number;
|
78
|
+
get eventrades(): number;
|
79
|
+
get openprofit(): number;
|
80
|
+
get avg_trade_percent(): number | undefined;
|
81
|
+
get avg_winning_trade(): number | undefined;
|
82
|
+
get avg_winning_trade_percent(): number | undefined;
|
83
|
+
get initial_capital(): number;
|
84
|
+
get losstrades(): number;
|
85
|
+
get grossloss(): number;
|
86
|
+
get grossloss_percent(): number;
|
87
|
+
get grossprofit(): number;
|
88
|
+
get grossprofit_percent(): number;
|
89
|
+
get wintrades(): number;
|
90
|
+
get margin_liquidation_price(): number | undefined;
|
91
|
+
get max_contracts_held_all(): number;
|
92
|
+
get max_contracts_held_long(): number;
|
93
|
+
get max_contracts_held_short(): number;
|
94
|
+
get max_drawdown(): number;
|
95
|
+
get max_runup(): number;
|
96
|
+
get max_runup_percent(): number;
|
97
|
+
get max_drawdown_percent(): number;
|
98
|
+
get netprofit_percent(): number;
|
99
|
+
get openprofit_percent(): number;
|
100
|
+
get position_avg_price(): number | undefined;
|
101
|
+
get position_entry_name(): string | undefined;
|
102
|
+
get position_size(): number;
|
103
|
+
get summaryData(): {
|
104
|
+
position_size: number;
|
105
|
+
position_avg_price: number | undefined;
|
106
|
+
position_entry_name: string | undefined;
|
107
|
+
openprofit_percent: number;
|
108
|
+
netprofit_percent: number;
|
109
|
+
max_drawdown_percent: number;
|
110
|
+
max_runup_percent: number;
|
111
|
+
max_drawdown: number;
|
112
|
+
max_runup: number;
|
113
|
+
max_contracts_held_long: number;
|
114
|
+
max_contracts_held_short: number;
|
115
|
+
max_contracts_held_all: number;
|
116
|
+
avg_winning_trade_percent: number | undefined;
|
117
|
+
avg_winning_trade: number | undefined;
|
118
|
+
avg_trade_percent: number | undefined;
|
119
|
+
avg_trade: number | undefined;
|
120
|
+
avg_losing_trade: number | undefined;
|
121
|
+
avg_losing_trade_percent: number | undefined;
|
122
|
+
wintrades: number;
|
123
|
+
losstrades: number;
|
124
|
+
eventrades: number;
|
125
|
+
grossprofit: number;
|
126
|
+
grossprofit_percent: number;
|
127
|
+
grossloss: number;
|
128
|
+
grossloss_percent: number;
|
129
|
+
openprofit: number;
|
130
|
+
initial_capital: number;
|
131
|
+
netprofit: number;
|
132
|
+
closedtrades: {
|
133
|
+
closedtrades: number;
|
134
|
+
first_index: number;
|
135
|
+
};
|
136
|
+
opentrades: {
|
137
|
+
opentrades: number;
|
138
|
+
capital_held: number;
|
139
|
+
};
|
140
|
+
equity: number;
|
141
|
+
margin_call_long: number;
|
142
|
+
margin_call_short: number;
|
143
|
+
first_price: number | undefined;
|
144
|
+
};
|
145
|
+
private _getOrderPrices;
|
146
|
+
}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
import { IKeyObjectValue } from "../../../type";
|
2
|
+
import { BuiltInVariables } from "../buildInVariables";
|
3
|
+
export declare class Syminfo {
|
4
|
+
private _syminfo;
|
5
|
+
private _variables;
|
6
|
+
constructor(variables: BuiltInVariables);
|
7
|
+
update(syminfo: IKeyObjectValue): void;
|
8
|
+
get __syminfo(): IKeyObjectValue;
|
9
|
+
get basecurrency(): any;
|
10
|
+
get country(): any;
|
11
|
+
get currency(): any;
|
12
|
+
get description(): any;
|
13
|
+
get employees(): any;
|
14
|
+
get expiration_date(): any;
|
15
|
+
get industry(): any;
|
16
|
+
get minmove(): any;
|
17
|
+
get mintick(): any;
|
18
|
+
get pointvalue(): any;
|
19
|
+
get prefix(): any;
|
20
|
+
get pricescale(): any;
|
21
|
+
get recommendations_buy(): any;
|
22
|
+
get recommendations_buy_strong(): any;
|
23
|
+
get recommendations_date(): any;
|
24
|
+
get recommendations_hold(): any;
|
25
|
+
get recommendations_sell(): any;
|
26
|
+
get recommendations_sell_strong(): any;
|
27
|
+
get recommendations_total(): any;
|
28
|
+
get root(): any;
|
29
|
+
get sector(): any;
|
30
|
+
get session(): any;
|
31
|
+
get shareholders(): any;
|
32
|
+
get shares_outstanding_float(): any;
|
33
|
+
get shares_outstanding_total(): any;
|
34
|
+
get target_price_average(): any;
|
35
|
+
get target_price_date(): any;
|
36
|
+
get target_price_estimates(): any;
|
37
|
+
get target_price_high(): any;
|
38
|
+
get target_price_low(): any;
|
39
|
+
get target_price_median(): any;
|
40
|
+
get ticker(): any;
|
41
|
+
get tickerid(): any;
|
42
|
+
get timezone(): any;
|
43
|
+
get type(): any;
|
44
|
+
get volumetype(): any;
|
45
|
+
get current_contract(): any;
|
46
|
+
get mincontract(): any;
|
47
|
+
get main_period(): any;
|
48
|
+
get main_tickerid(): any;
|
49
|
+
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { IKeyObjectValue } from "../../../type";
|
2
|
+
import { BuiltInVariables } from "../buildInVariables";
|
3
|
+
export declare class Ta {
|
4
|
+
private _preAccdist;
|
5
|
+
private _preNvi;
|
6
|
+
private _prePvi;
|
7
|
+
private _preObv;
|
8
|
+
private _prePvt;
|
9
|
+
private _preWad;
|
10
|
+
private _preVwap;
|
11
|
+
private _preValue;
|
12
|
+
private _currentData;
|
13
|
+
private _preData;
|
14
|
+
private _variables;
|
15
|
+
constructor(variables: BuiltInVariables);
|
16
|
+
get _varTaCacheData(): IKeyObjectValue;
|
17
|
+
set _varTaCacheData(data: IKeyObjectValue);
|
18
|
+
update(currentData: IKeyObjectValue): void;
|
19
|
+
get isRealTime(): boolean;
|
20
|
+
get accdist(): any;
|
21
|
+
get iii(): any;
|
22
|
+
get nvi(): any;
|
23
|
+
get wvad(): any;
|
24
|
+
get obv(): any;
|
25
|
+
get pvi(): any;
|
26
|
+
get tr(): any;
|
27
|
+
get pvt(): any;
|
28
|
+
get wad(): any;
|
29
|
+
get vwap(): any;
|
30
|
+
private _getNvi;
|
31
|
+
private _getPvi;
|
32
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
export declare class Timeframe {
|
2
|
+
private _period;
|
3
|
+
private _multiplier;
|
4
|
+
private _unit;
|
5
|
+
constructor();
|
6
|
+
update(period: string): void;
|
7
|
+
get isdaily(): boolean;
|
8
|
+
get isdwm(): boolean;
|
9
|
+
get isintraday(): boolean;
|
10
|
+
get isminutes(): boolean;
|
11
|
+
get ismonthly(): boolean;
|
12
|
+
get isseconds(): boolean;
|
13
|
+
get isweekly(): boolean;
|
14
|
+
get multiplier(): number;
|
15
|
+
get period(): string;
|
16
|
+
}
|
@@ -0,0 +1,146 @@
|
|
1
|
+
import { IKeyValueStr } from "../../type";
|
2
|
+
import { VType } from "./enum";
|
3
|
+
export declare const ERRORS_TIPS: {
|
4
|
+
onlyInLoop: string;
|
5
|
+
invalidType: string;
|
6
|
+
typeUseError: string;
|
7
|
+
notTypeKeyword: string;
|
8
|
+
undeclared: string;
|
9
|
+
repeatVar: string;
|
10
|
+
typeRepeatErr: string;
|
11
|
+
typeMismatch: string;
|
12
|
+
assignTypeMismatch: string;
|
13
|
+
voidNotVar: string;
|
14
|
+
declareTypeErr: string;
|
15
|
+
mapKeyValErr: string;
|
16
|
+
inputSourceErr: string;
|
17
|
+
buildInUseErr: string;
|
18
|
+
argsLenErr: string;
|
19
|
+
requiredParamErr: string;
|
20
|
+
argsSyntaxErr: string;
|
21
|
+
requestArgsErr: string;
|
22
|
+
mapKeyErr: string;
|
23
|
+
templateErr: string;
|
24
|
+
templateNoSupportErr: string;
|
25
|
+
ifOrSwitchTypeErr: string;
|
26
|
+
argsNameErr: string;
|
27
|
+
noFiledErr: string;
|
28
|
+
methodNotExistErr: string;
|
29
|
+
tupleVarErr: string;
|
30
|
+
tupleLeftVarErr: string;
|
31
|
+
tupleRightVarErr: string;
|
32
|
+
tempateTypeErr: string;
|
33
|
+
qualifierErr: string;
|
34
|
+
notFindFuncErr: string;
|
35
|
+
naVarErr: string;
|
36
|
+
notHistoryErr: string;
|
37
|
+
defaultValueErr: string;
|
38
|
+
defaultValueTypeErr: string;
|
39
|
+
typeFieldErr: string;
|
40
|
+
unaryErr: string;
|
41
|
+
funcArgAssignErr: string;
|
42
|
+
declaredErr: string;
|
43
|
+
globalFuncErr: string;
|
44
|
+
onlyStatementErr: string;
|
45
|
+
modifyGlobalVarErr: string;
|
46
|
+
inputDefvalErr: string;
|
47
|
+
objectIsNaErr: string;
|
48
|
+
buidinAssignErr: string;
|
49
|
+
buidinVarErr: string;
|
50
|
+
useNaErr: string;
|
51
|
+
libraryTitleErr: string;
|
52
|
+
exportFuncArgErr: string;
|
53
|
+
indiRunErr: string;
|
54
|
+
libraryExportErr: string;
|
55
|
+
strategyRunErr: string;
|
56
|
+
exportUseErr: string;
|
57
|
+
funcRepeatErr: string;
|
58
|
+
importMultipleErr: string;
|
59
|
+
importNotExitErr: string;
|
60
|
+
importNameRepeatErr: string;
|
61
|
+
exportFuncHasInputErr: string;
|
62
|
+
libraryTitleIsKeywordErr: string;
|
63
|
+
exportFuncUseGlobalVarErr: string;
|
64
|
+
loopRuntimeErr: string;
|
65
|
+
paramsErr: string;
|
66
|
+
displayErr: string;
|
67
|
+
exportFuncUseReqErr: string;
|
68
|
+
requestExprErr: string;
|
69
|
+
argDefaultErr: string;
|
70
|
+
overloadFuncErr: string;
|
71
|
+
againAssignErr: string;
|
72
|
+
requestUserInLoopErr: string;
|
73
|
+
enumVarNameErr: string;
|
74
|
+
enumVarNameBuiltinErr: string;
|
75
|
+
typeNameErr: string;
|
76
|
+
enumUseErr: string;
|
77
|
+
conditionalErr: string;
|
78
|
+
fortoErr: string;
|
79
|
+
indicatorUseStrategyFuncErr: string;
|
80
|
+
arrEmptyErr: string;
|
81
|
+
arrLengthDiffErr: string;
|
82
|
+
arrTypeErr: string;
|
83
|
+
inputOptErr: string;
|
84
|
+
mathRandomErr: string;
|
85
|
+
matrixRehapeErr: string;
|
86
|
+
strategyExitErr: string;
|
87
|
+
arrLenErr: string;
|
88
|
+
mergeCellErr: string;
|
89
|
+
minOrMaxErr: string;
|
90
|
+
requestsNumErr: string;
|
91
|
+
undeterminedTypeMethodErr: string;
|
92
|
+
requestUseFuncErr: string;
|
93
|
+
requestLowerTfPeriodErr: string;
|
94
|
+
optionsRepeatErr: string;
|
95
|
+
scriptLongTimeErr: string;
|
96
|
+
plotFillForceOverlayErr: string;
|
97
|
+
constModifyErr: string;
|
98
|
+
arrMaxLenErr: string;
|
99
|
+
arrSetValueErr: string;
|
100
|
+
matrixMaxLenErr: string;
|
101
|
+
matrixToFromErr: string;
|
102
|
+
matrixAddRowColErr: string;
|
103
|
+
matrixSetValueErr: string;
|
104
|
+
matrixRowsColsEqErr: string;
|
105
|
+
matrixMultErr: string;
|
106
|
+
maxOpenOrdersErr: string;
|
107
|
+
historyReferencingOperatorErr: string;
|
108
|
+
historyReferencingOperatorUseFieldErr: string;
|
109
|
+
moreSameArgErr: string;
|
110
|
+
lineWidthErr: string;
|
111
|
+
ifOrSwitchQualifiedTypeErr: string;
|
112
|
+
conditionTypeErr: string;
|
113
|
+
boolVarErr: string;
|
114
|
+
naCompareErr: string;
|
115
|
+
notConstConditionTypeErr: string;
|
116
|
+
};
|
117
|
+
export declare const WARNING_TIPS: {
|
118
|
+
repeatVar: string;
|
119
|
+
typeMismatch: string;
|
120
|
+
moreSameArg: string;
|
121
|
+
localScopeGetHistory: string;
|
122
|
+
localScopeWarning: string;
|
123
|
+
strategyCalcTickWarn: string;
|
124
|
+
conditionWarning: string;
|
125
|
+
lineWidthWarning: string;
|
126
|
+
boolVarNumWarning: string;
|
127
|
+
transpDeprecatedTips: string;
|
128
|
+
};
|
129
|
+
export declare const DRAW_TYPES: VType[];
|
130
|
+
export declare const QUALIFIERS: VType[];
|
131
|
+
export declare const BASE_TYPE: VType[];
|
132
|
+
export declare const PLOT_DISPLAY_TYPES: string[];
|
133
|
+
export declare const ONLY_STATEMENTS: string[];
|
134
|
+
export declare const GLOBAL_DRAW_FUNCS: string[];
|
135
|
+
export declare const GLOBAL_FUNCS: string[];
|
136
|
+
export declare const INDICATOR_NEED_DRAW_FUNCS: string[];
|
137
|
+
export declare const STRATEGY_NEED_FUNCS: string[];
|
138
|
+
export declare const NAMESPACE_CALL_SELF_FUNCS: string[];
|
139
|
+
export declare const SOURCE_TYPE_BUILTIN: string[];
|
140
|
+
export declare const COMMENTS_DESC_REG: RegExp;
|
141
|
+
export declare const JS_KEYWORDS: string[];
|
142
|
+
export declare const TCC_KEYWORDS: string[];
|
143
|
+
export declare const TCC_NAMESAPCES: string[];
|
144
|
+
export declare const CHANGE_VALUE_FUNCS: string[];
|
145
|
+
export declare const TRANSP_FUNCS: string[];
|
146
|
+
export declare const BUILDIN_CONST_QUALIFIERS: IKeyValueStr;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
export declare const PERIOD_MAP: Record<string, string>;
|
2
|
+
export declare const PERIOD_UNIT_MAP: Record<string, string>;
|
3
|
+
export declare const SYMBOL_MAP: Record<string, string>;
|
4
|
+
export declare const MAX_STRATEGY_ORDERS_COUNT = 9000;
|
5
|
+
export declare const MAX_STRATEGY_OPEN_ORDERS_COUNT = 3000;
|
@@ -0,0 +1,302 @@
|
|
1
|
+
export declare enum VType {
|
2
|
+
BOOL = "bool",
|
3
|
+
INT = "int",
|
4
|
+
FLOAT = "float",
|
5
|
+
ARRAY = "array",
|
6
|
+
BOX = "box",
|
7
|
+
CHART_POINT = "chart.point",
|
8
|
+
COLOR = "color",
|
9
|
+
CONST = "const",
|
10
|
+
LABEL = "label",
|
11
|
+
LINE = "line",
|
12
|
+
LINEFILL = "linefill",
|
13
|
+
MAP = "map",
|
14
|
+
MATRIX = "matrix",
|
15
|
+
POLYLINE = "polyline",
|
16
|
+
SERIES = "series",
|
17
|
+
SIMPLE = "simple",
|
18
|
+
STRING = "string",
|
19
|
+
TABLE = "table",
|
20
|
+
UNDETERMINED = "undetermined type",
|
21
|
+
INPUT = "input",
|
22
|
+
NA = "na",
|
23
|
+
VOID = "void",
|
24
|
+
ENUM = "enum"
|
25
|
+
}
|
26
|
+
export declare enum VInsType {
|
27
|
+
TYPE = "type",
|
28
|
+
ARRAY = "array",
|
29
|
+
BOX = "box",
|
30
|
+
CHART_POINT = "chart.point",
|
31
|
+
LABEL = "label",
|
32
|
+
LINE = "line",
|
33
|
+
LINEFILL = "linefill",
|
34
|
+
MAP = "map",
|
35
|
+
MATRIX = "matrix",
|
36
|
+
POLYLINE = "polyline",
|
37
|
+
TABLE = "table"
|
38
|
+
}
|
39
|
+
export declare enum VRuleType {
|
40
|
+
FlowStmt = "FlowStmt",
|
41
|
+
DeclareAssign = "DeclareAssign",
|
42
|
+
VarBlockStmt = "VarBlockStmt",
|
43
|
+
VarSingle = "VarSingle",
|
44
|
+
VarMultiple = "VarMultiple",
|
45
|
+
ParenthesizedExpression = "ParenthesizedExpression",
|
46
|
+
AdditiveExpression = "AdditiveExpression",
|
47
|
+
RelationalExpression = "RelationalExpression",
|
48
|
+
EqualityExpression = "EqualityExpression",
|
49
|
+
TernaryExpression = "TernaryExpression",
|
50
|
+
UnaryExpression = "UnaryExpression",
|
51
|
+
NotExpression = "NotExpression",
|
52
|
+
MemberIndexExpression = "MemberIndexExpression",
|
53
|
+
MethodExpression = "MethodExpression",
|
54
|
+
LogicalAndExpression = "LogicalAndExpression",
|
55
|
+
LogicalOrExpression = "LogicalOrExpression",
|
56
|
+
MultiplicativeExpression = "MultiplicativeExpression",
|
57
|
+
Brackethesized = "Brackethesized",
|
58
|
+
IfStatement = "IfStatement",
|
59
|
+
ForToStatement = "ForToStatement",
|
60
|
+
ForInStatement = "ForInStatement",
|
61
|
+
SwitchStatement = "SwitchStatement",
|
62
|
+
CaseClause = "CaseClause",
|
63
|
+
DefaultCaluse = "DefaultCaluse",
|
64
|
+
WhileStatement = "WhileStatement",
|
65
|
+
ImportElement = "ImportElement",
|
66
|
+
Literal = "Literal",
|
67
|
+
ArrowFunction = "ArrowFunction",
|
68
|
+
ArrowMethod = "ArrowMethod",
|
69
|
+
TypeStatement = "TypeStatement",
|
70
|
+
Name = "Name",
|
71
|
+
AgainAssign = "AgainAssign",
|
72
|
+
EnumStatement = "EnumStatement"
|
73
|
+
}
|
74
|
+
export declare enum VAdjustment {
|
75
|
+
dividends = "dividends",
|
76
|
+
none = "none",
|
77
|
+
splits = "splits"
|
78
|
+
}
|
79
|
+
export declare enum VAlert {
|
80
|
+
freqAll = "freq_all",
|
81
|
+
freqOncePerBar = "freq_once_per_bar",
|
82
|
+
freqOncePerBarClose = "freq_once_per_bar_close"
|
83
|
+
}
|
84
|
+
export declare enum VBarmergeGaps {
|
85
|
+
gapsOff = "gaps_off",
|
86
|
+
gapsOn = "gaps_on",
|
87
|
+
lookaheadOff = "lookahead_off",
|
88
|
+
lookaheadOn = "lookahead_on"
|
89
|
+
}
|
90
|
+
export declare enum VPlotDisplay {
|
91
|
+
all = "all",
|
92
|
+
dataWindow = "data_window",
|
93
|
+
none = "none",
|
94
|
+
pane = "pane",
|
95
|
+
priceScale = "price_scale",
|
96
|
+
statusLine = "status_line"
|
97
|
+
}
|
98
|
+
export declare enum VExtend {
|
99
|
+
both = "both",
|
100
|
+
left = "left",
|
101
|
+
none = "none",
|
102
|
+
right = "right"
|
103
|
+
}
|
104
|
+
export declare enum VFormatType {
|
105
|
+
inherit = "inherit",
|
106
|
+
mintick = "mintick",
|
107
|
+
percent = "percent",
|
108
|
+
price = "price",
|
109
|
+
volume = "volume"
|
110
|
+
}
|
111
|
+
export declare enum VHlineStyle {
|
112
|
+
styleDashed = "style_dashed",
|
113
|
+
styleDotted = "style_dotted",
|
114
|
+
styleSolid = "style_solid"
|
115
|
+
}
|
116
|
+
export declare enum VLabelStyle {
|
117
|
+
styleArrowdown = "style_arrowdown",
|
118
|
+
styleArrowup = "style_arrowup",
|
119
|
+
styleCircle = "style_circle",
|
120
|
+
styleCross = "style_cross",
|
121
|
+
styleDiamond = "style_diamond",
|
122
|
+
styleFlag = "style_flag",
|
123
|
+
styleLabelCenter = "style_label_center",
|
124
|
+
styleLabelDown = "style_label_down",
|
125
|
+
styleLabelLeft = "style_label_left",
|
126
|
+
styleLabelLowerLeft = "style_label_lower_left",
|
127
|
+
styleLabelLowerRight = "style_label_lower_right",
|
128
|
+
styleLabelRight = "style_label_right",
|
129
|
+
styleLabelUp = "style_label_up",
|
130
|
+
styleLabelUpperLeft = "style_label_upper_left",
|
131
|
+
styleLabelUpperRight = "style_label_upper_right",
|
132
|
+
styleNone = "style_none",
|
133
|
+
styleSquare = "style_square",
|
134
|
+
styleTextOutline = "style_text_outline",
|
135
|
+
styleTriangledown = "style_triangledown",
|
136
|
+
styleTriangleup = "style_triangleup",
|
137
|
+
styleXcross = "style_xcross"
|
138
|
+
}
|
139
|
+
export declare enum VLineStyle {
|
140
|
+
styleArrowBoth = "style_arrow_both",
|
141
|
+
styleArrowLeft = "style_arrow_left",
|
142
|
+
styleArrowRight = "style_arrow_right",
|
143
|
+
styleDashed = "style_dashed",
|
144
|
+
styleDotted = "style_dotted",
|
145
|
+
styleSolid = "style_solid"
|
146
|
+
}
|
147
|
+
export declare enum VLocation {
|
148
|
+
abovebar = "abovebar",
|
149
|
+
absolute = "absolute",
|
150
|
+
belowbar = "belowbar",
|
151
|
+
bottom = "bottom",
|
152
|
+
top = "top"
|
153
|
+
}
|
154
|
+
export declare enum VSortOrder {
|
155
|
+
ascending = "ascending",// 从小到大
|
156
|
+
descending = "descending"
|
157
|
+
}
|
158
|
+
export declare enum VPlotStyle {
|
159
|
+
styleArea = "Area",
|
160
|
+
styleAreabr = "Area With Breaks",
|
161
|
+
styleCircles = "Circles",
|
162
|
+
styleColumns = "Columns",
|
163
|
+
styleCross = "Cross",
|
164
|
+
styleHistogram = "Histogram",
|
165
|
+
styleLine = "Line",
|
166
|
+
styleLinebr = "Line With Breaks",
|
167
|
+
styleStepline = "Step Line",
|
168
|
+
styleSteplineDiamond = "Step Line With Diamonds",
|
169
|
+
styleSteplinebr = "Step line with Breaks"
|
170
|
+
}
|
171
|
+
export declare enum VPosition {
|
172
|
+
bottomCenter = "bottom_center",
|
173
|
+
bottomLeft = "bottom_left",
|
174
|
+
bottomRight = "bottom_right",
|
175
|
+
middleCenter = "middle_center",
|
176
|
+
middleLeft = "middle_left",
|
177
|
+
middleRight = "middle_right",
|
178
|
+
topCenter = "top_center",
|
179
|
+
topLeft = "top_left",
|
180
|
+
topRight = "top_right"
|
181
|
+
}
|
182
|
+
export declare enum VScale {
|
183
|
+
left = "left",
|
184
|
+
none = "none",
|
185
|
+
right = "right"
|
186
|
+
}
|
187
|
+
export declare enum VSession {
|
188
|
+
extended = "extended",
|
189
|
+
regular = "regular"
|
190
|
+
}
|
191
|
+
export declare enum VShape {
|
192
|
+
arrowdown = "arrowdown",
|
193
|
+
arrowup = "arrowup",
|
194
|
+
circle = "circle",
|
195
|
+
cross = "cross",
|
196
|
+
diamond = "diamond",
|
197
|
+
flag = "flag",
|
198
|
+
labeldown = "labeldown",
|
199
|
+
labelup = "labelup",
|
200
|
+
square = "square",
|
201
|
+
triangledown = "triangledown",
|
202
|
+
triangleup = "triangleup",
|
203
|
+
xcross = "xcross"
|
204
|
+
}
|
205
|
+
export declare enum VSize {
|
206
|
+
auto = "auto",
|
207
|
+
huge = "huge",
|
208
|
+
large = "large",
|
209
|
+
normal = "normal",
|
210
|
+
small = "small",
|
211
|
+
tiny = "tiny"
|
212
|
+
}
|
213
|
+
export declare enum VFont {
|
214
|
+
familyDefault = "default",
|
215
|
+
familyMonospace = "monospace"
|
216
|
+
}
|
217
|
+
export declare enum VStrategy {
|
218
|
+
cash = "cash",
|
219
|
+
fixed = "fixed",
|
220
|
+
percentOfEquity = "percent_of_equity"
|
221
|
+
}
|
222
|
+
export declare enum VCommission {
|
223
|
+
cashPerContract = "cash_per_contract",
|
224
|
+
cashPerOrder = "cash_per_order",
|
225
|
+
percent = "percent"
|
226
|
+
}
|
227
|
+
export declare enum VDirection {
|
228
|
+
all = "all",
|
229
|
+
long = "long",
|
230
|
+
short = "short"
|
231
|
+
}
|
232
|
+
export declare enum VOca {
|
233
|
+
cancel = "cancel",
|
234
|
+
none = "none",
|
235
|
+
reduce = "reduce"
|
236
|
+
}
|
237
|
+
export declare enum VText {
|
238
|
+
alignBottom = "align_bottom",
|
239
|
+
alignCenter = "align_center",
|
240
|
+
alignLeft = "align_left",
|
241
|
+
alignRight = "align_right",
|
242
|
+
alignTop = "align_top",
|
243
|
+
wrapAuto = "wrap_auto",
|
244
|
+
wrapNone = "wrap_none"
|
245
|
+
}
|
246
|
+
export declare enum VXloc {
|
247
|
+
bar_index = "bar_index",
|
248
|
+
bar_time = "bar_time"
|
249
|
+
}
|
250
|
+
export declare enum VYloc {
|
251
|
+
abovebar = "abovebar",
|
252
|
+
belowbar = "belowbar",
|
253
|
+
price = "price"
|
254
|
+
}
|
255
|
+
export declare enum VEarnings {
|
256
|
+
actual = "actual",
|
257
|
+
estimate = "estimate",
|
258
|
+
standardized = "standardized"
|
259
|
+
}
|
260
|
+
export declare enum VPivotType {
|
261
|
+
traditional = "Traditional",
|
262
|
+
fibonacci = "Fibonacci",
|
263
|
+
woodie = "Woodie",
|
264
|
+
classic = "Classic",
|
265
|
+
dm = "DM",
|
266
|
+
camarilla = "Camarilla"
|
267
|
+
}
|
268
|
+
export declare enum VInputType {
|
269
|
+
INT = "int",
|
270
|
+
BOOL = "bool",
|
271
|
+
TIME = "time",
|
272
|
+
COLOR = "color",
|
273
|
+
FLOAT = "float",
|
274
|
+
PRICE = "price",
|
275
|
+
SOURCE = "source",
|
276
|
+
STRING = "string",
|
277
|
+
SYMBOL = "symbol",
|
278
|
+
SESSION = "session",
|
279
|
+
TEXT_AREA = "text_area",
|
280
|
+
TIMEFRAME = "timeframe",
|
281
|
+
ENUM = "enum"
|
282
|
+
}
|
283
|
+
export declare enum VComments {
|
284
|
+
description = "description",
|
285
|
+
field = "field",
|
286
|
+
function = "function",
|
287
|
+
param = "param",
|
288
|
+
returns = "returns",
|
289
|
+
type = "type",
|
290
|
+
variable = "variable",
|
291
|
+
enum = "enum"
|
292
|
+
}
|
293
|
+
export declare enum VScriptType {
|
294
|
+
library = "library",
|
295
|
+
indicator = "indicator",
|
296
|
+
strategy = "strategy"
|
297
|
+
}
|
298
|
+
export declare enum VTextFormat {
|
299
|
+
format_bold = "format_bold",
|
300
|
+
format_italic = "format_italic",
|
301
|
+
format_none = "format_none"
|
302
|
+
}
|