@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
@@ -76,6 +76,7 @@ export default class BuildInBox {
|
|
76
76
|
set_top_left_point({ id, point }: VBoxArgs, posStr: string): void;
|
77
77
|
set_bottom_right_point({ id, point }: VBoxArgs, posStr: string): void;
|
78
78
|
set_text_font_family({ id, text_font_family }: VBoxArgs, posStr: string): void;
|
79
|
+
set_xloc({ id, left, right, xloc }: VBoxArgs, posStr: string): void;
|
79
80
|
private _getBox;
|
80
81
|
}
|
81
82
|
export declare function createBox(key: string, data: IKeyObjectValue): IDrawComponent;
|
@@ -31439,9 +31439,13 @@ else
|
|
31439
31439
|
"series string",
|
31440
31440
|
"simple string",
|
31441
31441
|
"input string",
|
31442
|
-
"const string"
|
31442
|
+
"const string",
|
31443
|
+
"series int",
|
31444
|
+
"simple int",
|
31445
|
+
"input int",
|
31446
|
+
"const int"
|
31443
31447
|
],
|
31444
|
-
displayType: "series string"
|
31448
|
+
displayType: "series int/string"
|
31445
31449
|
},
|
31446
31450
|
{
|
31447
31451
|
name: "text_color",
|
@@ -31689,9 +31693,13 @@ else
|
|
31689
31693
|
"series string",
|
31690
31694
|
"simple string",
|
31691
31695
|
"input string",
|
31692
|
-
"const string"
|
31696
|
+
"const string",
|
31697
|
+
"series int",
|
31698
|
+
"simple int",
|
31699
|
+
"input int",
|
31700
|
+
"const int"
|
31693
31701
|
],
|
31694
|
-
displayType: "series string"
|
31702
|
+
displayType: "series int/string"
|
31695
31703
|
},
|
31696
31704
|
{
|
31697
31705
|
name: "text_color",
|
@@ -31978,6 +31986,70 @@ else
|
|
31978
31986
|
"void"
|
31979
31987
|
]
|
31980
31988
|
},
|
31989
|
+
{
|
31990
|
+
name: "box.set_xloc",
|
31991
|
+
desc: [
|
31992
|
+
"设置box的左边框和右边框并更新其xloc属性。"
|
31993
|
+
],
|
31994
|
+
args: [
|
31995
|
+
{
|
31996
|
+
name: "id",
|
31997
|
+
desc: "一个box对象。",
|
31998
|
+
required: !0,
|
31999
|
+
allowedTypeIDs: [
|
32000
|
+
"series box"
|
32001
|
+
],
|
32002
|
+
displayType: "series box"
|
32003
|
+
},
|
32004
|
+
{
|
32005
|
+
name: "left",
|
32006
|
+
desc: "box左边框的K线索引或时间戳。",
|
32007
|
+
required: !0,
|
32008
|
+
allowedTypeIDs: [
|
32009
|
+
"series int",
|
32010
|
+
"simple int",
|
32011
|
+
"input int",
|
32012
|
+
"const int"
|
32013
|
+
],
|
32014
|
+
displayType: "series int"
|
32015
|
+
},
|
32016
|
+
{
|
32017
|
+
name: "right",
|
32018
|
+
desc: "box右边框的K线索引或时间戳。",
|
32019
|
+
required: !0,
|
32020
|
+
allowedTypeIDs: [
|
32021
|
+
"series int",
|
32022
|
+
"simple int",
|
32023
|
+
"input int",
|
32024
|
+
"const int"
|
32025
|
+
],
|
32026
|
+
displayType: "series int"
|
32027
|
+
},
|
32028
|
+
{
|
32029
|
+
name: "xloc",
|
32030
|
+
desc: "确定框是否将left和right参数视为K线索引或时间戳。可能的值:[xloc.bar_index](#const_xloc.bar_index)和[xloc.bar_time](#const_xloc.bar_time)。如果xloc = [xloc.bar_index](#const_xloc.bar_index),则参数必须是K线索引。如果xloc = [xloc.bar_time](#const_xloc.bar_time),则参数必须是UNIX时间。",
|
32031
|
+
required: !0,
|
32032
|
+
allowedTypeIDs: [
|
32033
|
+
"series string",
|
32034
|
+
"simple string",
|
32035
|
+
"input string",
|
32036
|
+
"const string"
|
32037
|
+
],
|
32038
|
+
displayType: "series string"
|
32039
|
+
}
|
32040
|
+
],
|
32041
|
+
seeAlso: [
|
32042
|
+
"[box.new](#fun_box.new)",
|
32043
|
+
"[xloc.bar_index](#const_xloc.bar_index)",
|
32044
|
+
"[xloc.bar_time](#const_xloc.bar_time)"
|
32045
|
+
],
|
32046
|
+
syntax: [
|
32047
|
+
"box.set_xloc(id, left, right, xloc) → void"
|
32048
|
+
],
|
32049
|
+
returnedTypes: [
|
32050
|
+
"void"
|
32051
|
+
]
|
32052
|
+
},
|
31981
32053
|
{
|
31982
32054
|
name: "box.set_lefttop",
|
31983
32055
|
desc: [
|
@@ -32559,9 +32631,13 @@ else
|
|
32559
32631
|
"series string",
|
32560
32632
|
"simple string",
|
32561
32633
|
"input string",
|
32562
|
-
"const string"
|
32634
|
+
"const string",
|
32635
|
+
"series int",
|
32636
|
+
"simple int",
|
32637
|
+
"input int",
|
32638
|
+
"const int"
|
32563
32639
|
],
|
32564
|
-
displayType: "series string"
|
32640
|
+
displayType: "series int/string"
|
32565
32641
|
}
|
32566
32642
|
],
|
32567
32643
|
seeAlso: [
|
@@ -34050,9 +34126,13 @@ else
|
|
34050
34126
|
"series string",
|
34051
34127
|
"simple string",
|
34052
34128
|
"input string",
|
34053
|
-
"const string"
|
34129
|
+
"const string",
|
34130
|
+
"series int",
|
34131
|
+
"simple int",
|
34132
|
+
"input int",
|
34133
|
+
"const int"
|
34054
34134
|
],
|
34055
|
-
displayType: "series string"
|
34135
|
+
displayType: "series int/string"
|
34056
34136
|
},
|
34057
34137
|
{
|
34058
34138
|
name: "textalign",
|
@@ -34236,9 +34316,13 @@ else
|
|
34236
34316
|
"series string",
|
34237
34317
|
"simple string",
|
34238
34318
|
"input string",
|
34239
|
-
"const string"
|
34319
|
+
"const string",
|
34320
|
+
"series int",
|
34321
|
+
"simple int",
|
34322
|
+
"input int",
|
34323
|
+
"const int"
|
34240
34324
|
],
|
34241
|
-
displayType: "series string"
|
34325
|
+
displayType: "series int/string"
|
34242
34326
|
},
|
34243
34327
|
{
|
34244
34328
|
name: "textalign",
|
@@ -34764,9 +34848,13 @@ else
|
|
34764
34848
|
"series string",
|
34765
34849
|
"simple string",
|
34766
34850
|
"input string",
|
34767
|
-
"const string"
|
34851
|
+
"const string",
|
34852
|
+
"series int",
|
34853
|
+
"simple int",
|
34854
|
+
"input int",
|
34855
|
+
"const int"
|
34768
34856
|
],
|
34769
|
-
displayType: "series string"
|
34857
|
+
displayType: "series int/string"
|
34770
34858
|
}
|
34771
34859
|
],
|
34772
34860
|
seeAlso: [
|
@@ -39949,9 +40037,13 @@ else
|
|
39949
40037
|
"series string",
|
39950
40038
|
"simple string",
|
39951
40039
|
"input string",
|
39952
|
-
"const string"
|
40040
|
+
"const string",
|
40041
|
+
"series int",
|
40042
|
+
"simple int",
|
40043
|
+
"input int",
|
40044
|
+
"const int"
|
39953
40045
|
],
|
39954
|
-
displayType: "series string"
|
40046
|
+
displayType: "series int/string"
|
39955
40047
|
},
|
39956
40048
|
{
|
39957
40049
|
name: "bgcolor",
|
@@ -40625,9 +40717,13 @@ else
|
|
40625
40717
|
"series string",
|
40626
40718
|
"simple string",
|
40627
40719
|
"input string",
|
40628
|
-
"const string"
|
40720
|
+
"const string",
|
40721
|
+
"series int",
|
40722
|
+
"simple int",
|
40723
|
+
"input int",
|
40724
|
+
"const int"
|
40629
40725
|
],
|
40630
|
-
displayType: "series string"
|
40726
|
+
displayType: "series int/string"
|
40631
40727
|
}
|
40632
40728
|
],
|
40633
40729
|
seeAlso: [
|
@@ -49184,6 +49280,74 @@ else
|
|
49184
49280
|
"series box"
|
49185
49281
|
]
|
49186
49282
|
},
|
49283
|
+
{
|
49284
|
+
name: "set_xloc",
|
49285
|
+
desc: [
|
49286
|
+
"设置box的左边框和右边框并更新其xloc属性。"
|
49287
|
+
],
|
49288
|
+
args: [
|
49289
|
+
{
|
49290
|
+
name: "id",
|
49291
|
+
desc: "一个box对象。",
|
49292
|
+
required: !0,
|
49293
|
+
allowedTypeIDs: [
|
49294
|
+
"series box"
|
49295
|
+
],
|
49296
|
+
displayType: "series box"
|
49297
|
+
},
|
49298
|
+
{
|
49299
|
+
name: "left",
|
49300
|
+
desc: "box左边框的K线索引或时间戳。",
|
49301
|
+
required: !0,
|
49302
|
+
allowedTypeIDs: [
|
49303
|
+
"series int",
|
49304
|
+
"simple int",
|
49305
|
+
"input int",
|
49306
|
+
"const int"
|
49307
|
+
],
|
49308
|
+
displayType: "series int"
|
49309
|
+
},
|
49310
|
+
{
|
49311
|
+
name: "right",
|
49312
|
+
desc: "box右边框的K线索引或时间戳。",
|
49313
|
+
required: !0,
|
49314
|
+
allowedTypeIDs: [
|
49315
|
+
"series int",
|
49316
|
+
"simple int",
|
49317
|
+
"input int",
|
49318
|
+
"const int"
|
49319
|
+
],
|
49320
|
+
displayType: "series int"
|
49321
|
+
},
|
49322
|
+
{
|
49323
|
+
name: "xloc",
|
49324
|
+
desc: "确定框是否将left和right参数视为K线索引或时间戳。可能的值:[xloc.bar_index](#const_xloc.bar_index)和[xloc.bar_time](#const_xloc.bar_time)。如果xloc = [xloc.bar_index](#const_xloc.bar_index),则参数必须是K线索引。如果xloc = [xloc.bar_time](#const_xloc.bar_time),则参数必须是UNIX时间。",
|
49325
|
+
required: !0,
|
49326
|
+
allowedTypeIDs: [
|
49327
|
+
"series string",
|
49328
|
+
"simple string",
|
49329
|
+
"input string",
|
49330
|
+
"const string"
|
49331
|
+
],
|
49332
|
+
displayType: "series string"
|
49333
|
+
}
|
49334
|
+
],
|
49335
|
+
seeAlso: [
|
49336
|
+
"[box.new](#fun_box.new)",
|
49337
|
+
"[xloc.bar_index](#const_xloc.bar_index)",
|
49338
|
+
"[xloc.bar_time](#const_xloc.bar_time)"
|
49339
|
+
],
|
49340
|
+
syntax: [
|
49341
|
+
"box.set_xloc(id, left, right, xloc) → void"
|
49342
|
+
],
|
49343
|
+
returnedTypes: [
|
49344
|
+
"void"
|
49345
|
+
],
|
49346
|
+
originalName: "box.set_xloc",
|
49347
|
+
thisType: [
|
49348
|
+
"series box"
|
49349
|
+
]
|
49350
|
+
},
|
49187
49351
|
{
|
49188
49352
|
name: "set_lefttop",
|
49189
49353
|
desc: [
|
@@ -49691,9 +49855,13 @@ else
|
|
49691
49855
|
"series string",
|
49692
49856
|
"simple string",
|
49693
49857
|
"input string",
|
49694
|
-
"const string"
|
49858
|
+
"const string",
|
49859
|
+
"series int",
|
49860
|
+
"simple int",
|
49861
|
+
"input int",
|
49862
|
+
"const int"
|
49695
49863
|
],
|
49696
|
-
displayType: "series string"
|
49864
|
+
displayType: "series int/string"
|
49697
49865
|
}
|
49698
49866
|
],
|
49699
49867
|
seeAlso: [
|
@@ -50976,9 +51144,13 @@ else
|
|
50976
51144
|
"series string",
|
50977
51145
|
"simple string",
|
50978
51146
|
"input string",
|
50979
|
-
"const string"
|
51147
|
+
"const string",
|
51148
|
+
"series int",
|
51149
|
+
"simple int",
|
51150
|
+
"input int",
|
51151
|
+
"const int"
|
50980
51152
|
],
|
50981
|
-
displayType: "series string"
|
51153
|
+
displayType: "series int/string"
|
50982
51154
|
}
|
50983
51155
|
],
|
50984
51156
|
seeAlso: [
|
@@ -54075,9 +54247,13 @@ else
|
|
54075
54247
|
"series string",
|
54076
54248
|
"simple string",
|
54077
54249
|
"input string",
|
54078
|
-
"const string"
|
54250
|
+
"const string",
|
54251
|
+
"series int",
|
54252
|
+
"simple int",
|
54253
|
+
"input int",
|
54254
|
+
"const int"
|
54079
54255
|
],
|
54080
|
-
displayType: "series string"
|
54256
|
+
displayType: "series int/string"
|
54081
54257
|
},
|
54082
54258
|
{
|
54083
54259
|
name: "bgcolor",
|
@@ -54706,9 +54882,13 @@ else
|
|
54706
54882
|
"series string",
|
54707
54883
|
"simple string",
|
54708
54884
|
"input string",
|
54709
|
-
"const string"
|
54885
|
+
"const string",
|
54886
|
+
"series int",
|
54887
|
+
"simple int",
|
54888
|
+
"input int",
|
54889
|
+
"const int"
|
54710
54890
|
],
|
54711
|
-
displayType: "series string"
|
54891
|
+
displayType: "series int/string"
|
54712
54892
|
}
|
54713
54893
|
],
|
54714
54894
|
seeAlso: [
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { KEY_LIST as l } from "./index-
|
1
|
+
import { KEY_LIST as l } from "./index-S1gW0Mpf.js";
|
2
2
|
const d = "tccScript", g = {
|
3
3
|
// builtinFunctions: /strategy\.closedtrades\.max_drawdown_percent|strategy\.opentrades\.max_drawdown_percent|strategy\.risk\.max_intraday_filled_orders|strategy\.closedtrades\.max_runup_percent|array\.percentile_linear_interpolation|strategy\.closedtrades\.entry_bar_index|strategy\.opentrades\.max_runup_percent|strategy\.closedtrades\.exit_bar_index|strategy\.closedtrades\.profit_percent|strategy\.closedtrades\.entry_comment|strategy\.opentrades\.entry_bar_index|strategy\.closedtrades\.exit_comment|strategy\.closedtrades\.max_drawdown|strategy\.opentrades\.profit_percent|ta\.percentile_linear_interpolation|strategy\.closedtrades\.entry_price|strategy\.opentrades\.entry_comment|strategy\.closedtrades\.commission|strategy\.closedtrades\.entry_time|strategy\.closedtrades\.exit_price|strategy\.opentrades\.max_drawdown|strategy\.risk\.max_cons_loss_days|strategy\.closedtrades\.exit_time|strategy\.closedtrades\.max_runup|strategy\.opentrades\.entry_price|strategy\.risk\.max_intraday_loss|strategy\.risk\.max_position_size|table\.cell_set_text_font_family|strategy\.closedtrades\.entry_id|strategy\.opentrades\.commission|strategy\.opentrades\.entry_time|array\.binary_search_rightmost|array\.percentile_nearest_rank|strategy\.closedtrades\.exit_id|strategy\.opentrades\.max_runup|array\.binary_search_leftmost|strategy\.closedtrades\.profit|strategy\.opentrades\.entry_id|strategy\.risk\.allow_entry_in|strategy\.convert_to_account|box\.set_bottom_right_point|label\.set_text_font_family|strategy\.closedtrades\.size|strategy\.convert_to_symbol|strategy\.default_entry_qty|strategy\.opentrades\.profit|strategy\.risk\.max_drawdown|ta\.percentile_nearest_rank|table\.cell_set_text_halign|table\.cell_set_text_valign|request\.security_lower_tf|table\.cell_set_text_color|box\.set_text_font_family|strategy\.opentrades\.size|table\.cell_set_text_size|matrix\.is_antisymmetric|box\.set_top_left_point|chart\.point\.from_index|matrix\.is_antidiagonal|table\.cell_set_bgcolor|table\.cell_set_tooltip|table\.set_border_color|table\.set_border_width|timeframe\.from_seconds|chart\.point\.from_time|line\.set_second_point|math\.round_to_mintick|matrix\.elements_count|request\.currency_rate|ta\.pivot_point_levels|table\.cell_set_height|table\.set_frame_color|table\.set_frame_width|box\.set_border_color|box\.set_border_style|box\.set_border_width|line\.set_first_point|matrix\.is_stochastic|matrix\.is_triangular|table\.cell_set_width|timeframe\.in_seconds|array\.binary_search|box\.set_rightbottom|box\.set_text_halign|box\.set_text_valign|color\.from_gradient|label\.set_textalign|label\.set_textcolor|matrix\.eigenvectors|matrix\.is_symmetric|matrix\.swap_columns|strategy\.cancel_all|table\.cell_set_text|array\.new_linefill|array\.sort_indices|box\.set_text_color|linefill\.get_line1|linefill\.get_line2|linefill\.set_color|matrix\.eigenvalues|matrix\.is_diagonal|matrix\.is_identity|strategy\.close_all|table\.set_position|ticker\.pointfigure|array\.lastindexof|array\.percentrank|array\.standardize|box\.set_text_size|box\.set_text_wrap|label\.set_tooltip|matrix\.remove_col|matrix\.remove_row|request\.dividends|request\.financial|table\.merge_cells|table\.set_bgcolor|ticker\.heikinashi|array\.covariance|array\.new_string|chart\.point\.copy|matrix\.is_binary|matrix\.is_square|matrix\.submatrix|matrix\.swap_rows|matrix\.transpose|request\.earnings|request\.economic|request\.security|ticker\.linebreak|timeframe\.change|array\.new_color|array\.new_float|array\.new_label|array\.new_table|box\.set_bgcolor|box\.set_lefttop|chart\.point\.new|chart\.point\.now|input\.text_area|input\.timeframe|label\.set_color|label\.set_point|label\.set_style|line\.set_extend|linefill\.delete|polyline\.delete|str\.format_time|str\.replace_all|strategy\.cancel|ticker\.standard|alertcondition|array\.includes|array\.new_bool|array\.new_line|array\.variance|box\.get_bottom|box\.set_bottom|box\.set_extend|label\.get_text|label\.set_size|label\.set_text|label\.set_xloc|label\.set_yloc|line\.get_price|line\.set_color|line\.set_style|line\.set_width|math\.todegrees|math\.toradians|matrix\.add_col|matrix\.add_row|matrix\.columns|matrix\.is_zero|matrix\.reshape|matrix\.reverse|request\.quandl|request\.splits|str\.startswith|strategy\.close|strategy\.entry|strategy\.order|syminfo\.prefix|syminfo\.ticker|ta\.correlation|ta\.highestbars|ta\.percentrank|ticker\.inherit|array\.indexof|array\.new_box|array\.new_int|array\.reverse|array\.unshift|box\.get_right|box\.set_right|input\.session|line\.set_xloc|matrix\.concat|matrix\.median|max_bars_back|runtime\.error|str\.substring|strategy\.exit|ta\.crossunder|ta\.lowestbars|ta\.supertrend|ticker\.modify|array\.concat|array\.insert|array\.median|array\.remove|box\.get_left|box\.set_left|box\.set_text|input\.source|input\.string|input\.symbol|label\.delete|label\.set_xy|line\.set_xy1|line\.set_xy2|linefill\.new|map\.contains|matrix\.trace|polyline\.new|request\.seed|str\.contains|str\.endswith|str\.tonumber|str\.tostring|ta\.barssince|ta\.crossover|ta\.pivothigh|ta\.valuewhen|table\.delete|ticker\.renko|array\.clear|array\.every|array\.first|array\.range|array\.shift|array\.slice|array\.stdev|box\.get_top|box\.set_top|input\.color|input\.float|input\.price|label\.get_x|label\.get_y|label\.set_x|label\.set_y|line\.delete|line\.get_x1|line\.get_x2|line\.get_y1|line\.get_y2|line\.set_x1|line\.set_x2|line\.set_y1|line\.set_y2|log\.warning|map\.put_all|math\.random|matrix\.copy|matrix\.diff|matrix\.fill|matrix\.kron|matrix\.mode|matrix\.mult|matrix\.pinv|matrix\.rank|matrix\.rows|matrix\.sort|str\.replace|ta\.pivotlow|ta\.variance|table\.clear|ticker\.kagi|array\.copy|array\.fill|array\.from|array\.join|array\.last|array\.mode|array\.push|array\.size|array\.some|array\.sort|box\.delete|dayofmonth|input\.bool|input\.time|label\.copy|map\.remove|map\.values|math\.floor|math\.log10|math\.round|matrix\.avg|matrix\.col|matrix\.det|matrix\.get|matrix\.inv|matrix\.max|matrix\.min|matrix\.new|matrix\.pow|matrix\.row|matrix\.set|matrix\.sum|plotcandle|str\.format|str\.length|ta\.falling|ta\.highest|table\.cell|ticker\.new|time_close|weekofyear|array\.abs|array\.avg|array\.get|array\.max|array\.min|array\.new|array\.pop|array\.set|array\.sum|color\.new|color\.rgb|dayofweek|indicator|input\.int|label\.new|line\.copy|log\.error|map\.clear|math\.acos|math\.asin|math\.atan|input\.enum|math\.ceil|math\.sign|math\.sqrt|plotarrow|plotshape|str\.lower|str\.match|str\.split|str\.upper|ta\.change|ta\.linreg|ta\.lowest|ta\.median|ta\.rising|table\.new|timestamp|barcolor|box\.copy|line\.new|linefill|log\.info|map\.copy|map\.keys|map\.size|math\.abs|math\.avg|math\.cos|math\.exp|math\.log|math\.max|math\.min|math\.pow|math\.sin|math\.sum|math\.tan|plotchar|strategy|ta\.cross|ta\.range|ta\.stdev|ta\.stoch|bgcolor|box\.new|color\.b|color\.g|color\.r|color\.t|library|map\.get|map\.new|map\.put|plotbar|str\.pos|ta\.alma|ta\.macd|ta\.mode|ta\.swma|ta\.vwap|ta\.vwma|fixnan|minute|second|string|ta\.atr|ta\.bbw|ta\.cci|ta\.cmo|ta\.cog|ta\.cum|ta\.dev|ta\.dmi|ta\.ema|ta\.hma|ta\.kcw|ta\.max|ta\.mfi|ta\.min|ta\.mom|ta\.rma|ta\.roc|ta\.rsi|ta\.sar|ta\.sma|ta\.tsi|ta\.wma|ta\.wpr|alert|color|float|hline|input|label|month|ta\.bb|ta\.kc|ta\.tr|table|bool|fill|hour|line|plot|time|year|box|int|na|nz/,
|
4
4
|
builtinFunctions: new RegExp(a(l.functions)),
|