hqchart 1.1.12614 → 1.1.12627
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/umychart.vue.js +26 -16
- package/package.json +1 -1
- package/src/jscommon/umychart.complier.js +169 -6
- package/src/jscommon/umychart.js +144 -21
- package/src/jscommon/umychart.resource/js/codemirror/javascript.js +24 -3
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +314 -28
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +314 -28
|
@@ -34600,6 +34600,108 @@ function ChartSingleText()
|
|
|
34600
34600
|
}
|
|
34601
34601
|
|
|
34602
34602
|
|
|
34603
|
+
function ChartTradeIcon()
|
|
34604
|
+
{
|
|
34605
|
+
this.newMethod=IChartPainting; //派生
|
|
34606
|
+
this.newMethod();
|
|
34607
|
+
delete this.newMethod;
|
|
34608
|
+
|
|
34609
|
+
this.ClassName='ChartTradeIcon'; //类名
|
|
34610
|
+
this.TextAlign='center';
|
|
34611
|
+
this.TextBaseline='middle';
|
|
34612
|
+
this.SVG={ Family:"iconfont", Size:12 };
|
|
34613
|
+
this.AryIcon;
|
|
34614
|
+
|
|
34615
|
+
this.Draw=function()
|
|
34616
|
+
{
|
|
34617
|
+
if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
|
|
34618
|
+
if (this.IsShowIndexTitleOnly()) return;
|
|
34619
|
+
if (this.IsHideScriptIndex()) return;
|
|
34620
|
+
|
|
34621
|
+
if(!this.Data || !this.Data.Data) return;
|
|
34622
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.AryIcon)) return;
|
|
34623
|
+
|
|
34624
|
+
this.Canvas.font=`${this.SVG.Size}px ${this.SVG.Family}`;
|
|
34625
|
+
this.Canvas.textAlign=this.TextAlign;
|
|
34626
|
+
this.Canvas.textBaseline='middle';
|
|
34627
|
+
var yOffset=0;
|
|
34628
|
+
if (this.TradeType=="BUY" || this.TradeType=="BUYSHORT")
|
|
34629
|
+
{
|
|
34630
|
+
this.Canvas.textBaseline="bottom";
|
|
34631
|
+
yOffset=-2;
|
|
34632
|
+
}
|
|
34633
|
+
else if (this.TradeType=="SELL" || this.TradeType=="SELLSHORT")
|
|
34634
|
+
{
|
|
34635
|
+
this.Canvas.textBaseline="top";
|
|
34636
|
+
yOffset+2;
|
|
34637
|
+
}
|
|
34638
|
+
|
|
34639
|
+
var bHScreen=(this.ChartFrame.IsHScreen===true);
|
|
34640
|
+
var dataWidth=this.ChartFrame.DataWidth;
|
|
34641
|
+
var distanceWidth=this.ChartFrame.DistanceWidth;
|
|
34642
|
+
var chartright=this.ChartBorder.GetRight();
|
|
34643
|
+
if (bHScreen) chartright=this.ChartBorder.GetBottom();
|
|
34644
|
+
var xPointCount=this.ChartFrame.XPointCount;
|
|
34645
|
+
var border=this.ChartFrame.GetBorder();
|
|
34646
|
+
var xOffset=border.LeftEx+distanceWidth/2.0+g_JSChartResource.FrameLeftMargin;
|
|
34647
|
+
|
|
34648
|
+
for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth))
|
|
34649
|
+
{
|
|
34650
|
+
var value=this.Data.Data[i];
|
|
34651
|
+
if (!IFrameSplitOperator.IsNumber(value)) continue;
|
|
34652
|
+
if (value<=0) continue;
|
|
34653
|
+
|
|
34654
|
+
var iconItem=this.AryIcon[i];
|
|
34655
|
+
if (!IFrameSplitOperator.IsNumber(iconItem.Value) || !iconItem.Icon) continue;
|
|
34656
|
+
|
|
34657
|
+
var left=xOffset;
|
|
34658
|
+
var right=xOffset+dataWidth;
|
|
34659
|
+
if (right>chartright) break;
|
|
34660
|
+
|
|
34661
|
+
|
|
34662
|
+
var x=left+(right-left)/2;
|
|
34663
|
+
var y=this.GetYFromData(iconItem.Value, false);
|
|
34664
|
+
|
|
34665
|
+
this.Canvas.fillStyle=iconItem.Color;
|
|
34666
|
+
this.Canvas.fillText(iconItem.Icon,x,y+yOffset);
|
|
34667
|
+
}
|
|
34668
|
+
}
|
|
34669
|
+
|
|
34670
|
+
this.GetMaxMin=function()
|
|
34671
|
+
{
|
|
34672
|
+
var range={Max:null, Min:null };
|
|
34673
|
+
if(!this.Data || !this.Data.Data) return range;
|
|
34674
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.AryIcon)) return range;
|
|
34675
|
+
|
|
34676
|
+
var xPointCount=this.ChartFrame.XPointCount;
|
|
34677
|
+
var start=this.Data.DataOffset;
|
|
34678
|
+
if (this.ChartFrame.GlobalOption && this.ChartFrame.GlobalOption.IsValueFullRange)
|
|
34679
|
+
{
|
|
34680
|
+
start=0;
|
|
34681
|
+
xPointCount=this.Data.Data.length;
|
|
34682
|
+
}
|
|
34683
|
+
|
|
34684
|
+
for(var i=start,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j)
|
|
34685
|
+
{
|
|
34686
|
+
var value=this.Data.Data[i];
|
|
34687
|
+
if (!IFrameSplitOperator.IsNumber(value)) continue;
|
|
34688
|
+
if (value<=0) continue;
|
|
34689
|
+
|
|
34690
|
+
var iconItem=this.AryIcon[i];
|
|
34691
|
+
if (!IFrameSplitOperator.IsNumber(iconItem.Value) || !iconItem.Icon) continue;
|
|
34692
|
+
|
|
34693
|
+
if (range.Max==null) range.Max=iconItem.Value;
|
|
34694
|
+
else if (range.Max<iconItem.Value) range.Max=iconItem.Value;
|
|
34695
|
+
|
|
34696
|
+
if (range.Min==null) range.Min=iconItem.Value;
|
|
34697
|
+
else if (range.Min>iconItem.Value) range.Min=iconItem.Value;
|
|
34698
|
+
}
|
|
34699
|
+
|
|
34700
|
+
return range;
|
|
34701
|
+
}
|
|
34702
|
+
}
|
|
34703
|
+
|
|
34704
|
+
|
|
34603
34705
|
function ChartDrawText()
|
|
34604
34706
|
{
|
|
34605
34707
|
this.newMethod=IChartPainting; //派生
|
|
@@ -55267,7 +55369,7 @@ function IChartDrawPicture()
|
|
|
55267
55369
|
//xStep,yStep 移动的偏移量
|
|
55268
55370
|
this.Move=function(xStep,yStep)
|
|
55269
55371
|
{
|
|
55270
|
-
if (this.Status!=20) return
|
|
55372
|
+
if (this.Status!=20) return false;
|
|
55271
55373
|
if (!this.Frame) return false;
|
|
55272
55374
|
var data=this.Frame.Data;
|
|
55273
55375
|
if (!data) return false;
|
|
@@ -58692,7 +58794,7 @@ function ChartDrawPictureParallelChannel()
|
|
|
58692
58794
|
//xStep,yStep 移动的偏移量
|
|
58693
58795
|
this.Move=function(xStep,yStep)
|
|
58694
58796
|
{
|
|
58695
|
-
if (this.Status!=20) return
|
|
58797
|
+
if (this.Status!=20) return false;
|
|
58696
58798
|
if (!this.Frame) return false;
|
|
58697
58799
|
var data=this.Frame.Data;
|
|
58698
58800
|
if (!data) return false;
|
|
@@ -78131,34 +78233,55 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
78131
78233
|
this.RequestData();
|
|
78132
78234
|
}
|
|
78133
78235
|
|
|
78134
|
-
//叠加股票
|
|
78236
|
+
//叠加股票 symbol支持数据 ["600000.sh", "0000001.sz"]
|
|
78135
78237
|
this.OverlaySymbol=function(symbol,option)
|
|
78136
78238
|
{
|
|
78137
|
-
|
|
78239
|
+
var arySymbol=null;
|
|
78240
|
+
if (IFrameSplitOperator.IsString(symbol)) arySymbol=[symbol];
|
|
78241
|
+
else if (Array.isArray(symbol)) arySymbol=symbol;
|
|
78242
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(arySymbol)) return false;
|
|
78243
|
+
|
|
78244
|
+
var aryNewSymbol=[];
|
|
78245
|
+
for(var i=0, j=0;i<arySymbol.length;++i)
|
|
78138
78246
|
{
|
|
78139
|
-
var
|
|
78140
|
-
|
|
78247
|
+
var strSymbol=arySymbol[i];
|
|
78248
|
+
var bFind=false;
|
|
78249
|
+
for(j=0;j<this.OverlayChartPaint.length; ++j)
|
|
78141
78250
|
{
|
|
78142
|
-
|
|
78143
|
-
|
|
78251
|
+
var item=this.OverlayChartPaint[j];
|
|
78252
|
+
if (item.Symbol==strSymbol)
|
|
78253
|
+
{
|
|
78254
|
+
bFind=true;
|
|
78255
|
+
console.warn(`[MinuteChartContainer::OverlaySymbol] overlay symbol=${strSymbol} exist.`);
|
|
78256
|
+
break;
|
|
78257
|
+
}
|
|
78144
78258
|
}
|
|
78259
|
+
|
|
78260
|
+
if (!bFind) aryNewSymbol.push(strSymbol);
|
|
78145
78261
|
}
|
|
78146
78262
|
|
|
78147
|
-
|
|
78148
|
-
paint.Canvas=this.Canvas;
|
|
78149
|
-
paint.ChartBorder=this.Frame.SubFrame[0].Frame.ChartBorder;
|
|
78150
|
-
paint.ChartFrame=this.Frame.SubFrame[0].Frame;
|
|
78151
|
-
paint.Name="Overlay-Minute";
|
|
78152
|
-
paint.Symbol=symbol;
|
|
78153
|
-
paint.Identify=`Overlay-Minute-${symbol}`;
|
|
78154
|
-
if (option && option.Color) paint.Color=option.Color; //外部设置颜色
|
|
78155
|
-
else paint.Color=g_JSChartResource.OverlaySymbol.Color[g_JSChartResource.OverlaySymbol.Random%g_JSChartResource.OverlaySymbol.Color.length];
|
|
78156
|
-
++g_JSChartResource.OverlaySymbol.Random;
|
|
78157
|
-
paint.MainData=this.SourceData; //绑定主图数据
|
|
78263
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(arySymbol)) return true;
|
|
78158
78264
|
|
|
78159
|
-
|
|
78265
|
+
for(var i=0;i<aryNewSymbol.length;++i)
|
|
78266
|
+
{
|
|
78267
|
+
var strSymbol=aryNewSymbol[i];
|
|
78160
78268
|
|
|
78161
|
-
|
|
78269
|
+
var paint=new ChartOverlayMinutePriceLine();
|
|
78270
|
+
paint.Canvas=this.Canvas;
|
|
78271
|
+
paint.ChartBorder=this.Frame.SubFrame[0].Frame.ChartBorder;
|
|
78272
|
+
paint.ChartFrame=this.Frame.SubFrame[0].Frame;
|
|
78273
|
+
paint.Name="Overlay-Minute";
|
|
78274
|
+
paint.Symbol=strSymbol;
|
|
78275
|
+
paint.Identify=`Overlay-Minute-${strSymbol}`;
|
|
78276
|
+
if (option && option.Color) paint.Color=option.Color; //外部设置颜色
|
|
78277
|
+
else paint.Color=g_JSChartResource.OverlaySymbol.Color[g_JSChartResource.OverlaySymbol.Random%g_JSChartResource.OverlaySymbol.Color.length];
|
|
78278
|
+
++g_JSChartResource.OverlaySymbol.Random;
|
|
78279
|
+
paint.MainData=this.SourceData; //绑定主图数据
|
|
78280
|
+
|
|
78281
|
+
if (paint.SetOption) paint.SetOption(option);
|
|
78282
|
+
|
|
78283
|
+
this.OverlayChartPaint.push(paint);
|
|
78284
|
+
}
|
|
78162
78285
|
|
|
78163
78286
|
if (this.DayCount<=1) this.RequestOverlayMinuteData(); //请求数据
|
|
78164
78287
|
else this.RequestOverlayHistoryMinuteData();
|
|
@@ -102441,10 +102564,10 @@ function JSAlgorithm(errorHandler,symbolData)
|
|
|
102441
102564
|
}
|
|
102442
102565
|
|
|
102443
102566
|
|
|
102444
|
-
//格式化字符串 "{0}-{1}", C, O;
|
|
102567
|
+
//格式化字符串 "{0}-{1}", C, O; 小数位数 {0:0.00}
|
|
102445
102568
|
this.STRFORMAT=function(strFormat,args,node)
|
|
102446
102569
|
{
|
|
102447
|
-
var aryParam=strFormat.match(/{
|
|
102570
|
+
var aryParam=strFormat.match(/{[0-9.:]+}/g);
|
|
102448
102571
|
|
|
102449
102572
|
if (!IFrameSplitOperator.IsNonEmptyArray(aryParam)) return null;
|
|
102450
102573
|
|
|
@@ -102456,9 +102579,47 @@ function JSAlgorithm(errorHandler,symbolData)
|
|
|
102456
102579
|
if (item.length<3) continue;
|
|
102457
102580
|
|
|
102458
102581
|
var value=item.slice(1, item.length-1);
|
|
102459
|
-
var index
|
|
102582
|
+
var index=-1,decimal=-1;
|
|
102583
|
+
if (value.indexOf(":")>0)
|
|
102584
|
+
{
|
|
102585
|
+
var aryTemp=value.split(":");
|
|
102586
|
+
if (aryTemp)
|
|
102587
|
+
{
|
|
102588
|
+
if (aryTemp[0])
|
|
102589
|
+
index=parseInt(aryTemp[0]);
|
|
102460
102590
|
|
|
102461
|
-
|
|
102591
|
+
if (aryTemp[1])
|
|
102592
|
+
{
|
|
102593
|
+
if (aryTemp[1].indexOf(".")>=0)
|
|
102594
|
+
{
|
|
102595
|
+
var zeroCount=0;
|
|
102596
|
+
var strTemp=aryTemp[1];
|
|
102597
|
+
for(var j=strTemp.length-1; j>=0; --j)
|
|
102598
|
+
{
|
|
102599
|
+
if (strTemp[j]=="0") ++zeroCount;
|
|
102600
|
+
else break;
|
|
102601
|
+
}
|
|
102602
|
+
|
|
102603
|
+
if (zeroCount>0) decimal=zeroCount;
|
|
102604
|
+
}
|
|
102605
|
+
else if (aryTemp[1]=="0")
|
|
102606
|
+
{
|
|
102607
|
+
decimal=0;
|
|
102608
|
+
}
|
|
102609
|
+
}
|
|
102610
|
+
|
|
102611
|
+
}
|
|
102612
|
+
|
|
102613
|
+
}
|
|
102614
|
+
else
|
|
102615
|
+
{
|
|
102616
|
+
index=parseInt(value);
|
|
102617
|
+
}
|
|
102618
|
+
|
|
102619
|
+
if (index<0) continue;
|
|
102620
|
+
|
|
102621
|
+
var paramItem={ Src:item, Index:index, Text:null, Decimal:null };
|
|
102622
|
+
if (decimal>=0) paramItem.Decimal=decimal;
|
|
102462
102623
|
|
|
102463
102624
|
if (maxIndex<index) maxIndex=index;
|
|
102464
102625
|
|
|
@@ -102495,7 +102656,13 @@ function JSAlgorithm(errorHandler,symbolData)
|
|
|
102495
102656
|
if (Array.isArray(paramItem))
|
|
102496
102657
|
{
|
|
102497
102658
|
var value=paramItem[i];
|
|
102498
|
-
if (value)
|
|
102659
|
+
if (value)
|
|
102660
|
+
{
|
|
102661
|
+
if (IFrameSplitOperator.IsNumber(paramInfo.Decimal))
|
|
102662
|
+
text=`${value.toFixed(paramInfo.Decimal)}`;
|
|
102663
|
+
else
|
|
102664
|
+
text=`${value}`;
|
|
102665
|
+
}
|
|
102499
102666
|
}
|
|
102500
102667
|
else
|
|
102501
102668
|
{
|
|
@@ -104886,6 +105053,82 @@ function JSDraw(errorHandler,symbolData)
|
|
|
104886
105053
|
|
|
104887
105054
|
return drawData;
|
|
104888
105055
|
}
|
|
105056
|
+
|
|
105057
|
+
|
|
105058
|
+
//多头建仓(买入开仓).
|
|
105059
|
+
//参数1为触发条件,参数2为标记放置位置.此函数只适用于特定版本交易模式下.
|
|
105060
|
+
//例如: BUY(CROSS(A,B),LOW),当A上穿B时,在LOW处画标记,同时突出提示或直接下单,如果LOW改为DRAWNULL,就不画标记.(分时图上不支持)
|
|
105061
|
+
this.BUY=function(condition, data, iconSymbol, color)
|
|
105062
|
+
{
|
|
105063
|
+
var iconInfo={ Color:"rgb(0,255,0)", Type:"SVG", Icon:'\ue660' };
|
|
105064
|
+
if (IFrameSplitOperator.IsString(iconSymbol)) iconInfo.Icon=iconSymbol;
|
|
105065
|
+
if (color) iconInfo.Color=color;
|
|
105066
|
+
var result=this.CalculateTradeData(condition, data, iconInfo);
|
|
105067
|
+
result.DrawType='BUY';
|
|
105068
|
+
return result;
|
|
105069
|
+
}
|
|
105070
|
+
|
|
105071
|
+
this.BUYSHORT=function(condition, data, iconSymbol, color)
|
|
105072
|
+
{
|
|
105073
|
+
var iconInfo={ Color:"rgb(0,255,0)", Type:"SVG", Icon:'\ue660' };
|
|
105074
|
+
if (IFrameSplitOperator.IsString(iconSymbol)) iconInfo.Icon=iconSymbol;
|
|
105075
|
+
if (color) iconInfo.Color=color;
|
|
105076
|
+
var result=this.CalculateTradeData(condition, data, iconInfo);
|
|
105077
|
+
result.DrawType='BUYSHORT';
|
|
105078
|
+
return result;
|
|
105079
|
+
}
|
|
105080
|
+
|
|
105081
|
+
//多头平仓(卖出平仓).
|
|
105082
|
+
//参数1为触发条件,参数2为标记放置位置.此函数只适用于特定版本交易模式下.
|
|
105083
|
+
//例如: SELL(CROSS(A,B),HIGH),当A上穿B时,在HIGH处画标记,同时突出提示或直接下单,如果HIGH改为DRAWNULL,就不画标记.(分时图上不支持)
|
|
105084
|
+
this.SELL=function(condition, data, iconSymbol,color)
|
|
105085
|
+
{
|
|
105086
|
+
var iconInfo={ Color:"rgb(255,0,0)", Type:"SVG", Icon:'\ue661' };
|
|
105087
|
+
if (IFrameSplitOperator.IsString(iconSymbol)) iconInfo.Icon=iconSymbol;
|
|
105088
|
+
if (color) iconInfo.Color=color;
|
|
105089
|
+
var result=this.CalculateTradeData(condition, data, iconInfo);
|
|
105090
|
+
result.DrawType='SELL';
|
|
105091
|
+
return result;
|
|
105092
|
+
}
|
|
105093
|
+
|
|
105094
|
+
this.SELLSHORT=function(condition, data, iconSymbol,color)
|
|
105095
|
+
{
|
|
105096
|
+
var iconInfo={ Color:"rgb(255,0,0)", Type:"SVG", Icon:'\ue661' };
|
|
105097
|
+
if (IFrameSplitOperator.IsString(iconSymbol)) iconInfo.Icon=iconSymbol;
|
|
105098
|
+
if (color) iconInfo.Color=color;
|
|
105099
|
+
var result=this.CalculateTradeData(condition, data, iconInfo);
|
|
105100
|
+
result.DrawType='SELLSHORT';
|
|
105101
|
+
return result;
|
|
105102
|
+
}
|
|
105103
|
+
|
|
105104
|
+
this.CalculateTradeData=function(condition, data, IconInfo)
|
|
105105
|
+
{
|
|
105106
|
+
var aryData=[];
|
|
105107
|
+
var aryIcon=[];
|
|
105108
|
+
var result={ DrawData:{ Data:aryData, Icons:aryIcon } };
|
|
105109
|
+
|
|
105110
|
+
if (Array.isArray(condition))
|
|
105111
|
+
{
|
|
105112
|
+
var isAryPosition=Array.isArray(data);
|
|
105113
|
+
for(var i=0;i<condition.length;++i)
|
|
105114
|
+
{
|
|
105115
|
+
aryData[i]=0;
|
|
105116
|
+
aryIcon[i]=null
|
|
105117
|
+
if (!condition[i]) continue;
|
|
105118
|
+
|
|
105119
|
+
aryData[i]=1;
|
|
105120
|
+
|
|
105121
|
+
if (isAryPosition) aryIcon[i]={ Value:data[i], Type:IconInfo.Type, Color:IconInfo.Color, Icon:IconInfo.Icon };
|
|
105122
|
+
else aryIcon[i]={ Value:data, Type:IconInfo.Type, Color:IconInfo.Color, Icon:IconInfo.Icon };
|
|
105123
|
+
}
|
|
105124
|
+
}
|
|
105125
|
+
else if (IFrameSplitOperator.IsNumber(condition) && condition>0)
|
|
105126
|
+
{
|
|
105127
|
+
|
|
105128
|
+
}
|
|
105129
|
+
|
|
105130
|
+
return result;
|
|
105131
|
+
}
|
|
104889
105132
|
}
|
|
104890
105133
|
|
|
104891
105134
|
|
|
@@ -104938,7 +105181,8 @@ JSDraw.prototype.IsDrawFunction=function(name)
|
|
|
104938
105181
|
"STICKLINE","DRAWTEXT",'SUPERDRAWTEXT','DRAWLINE','DRAWBAND','DRAWKLINE',"DRAWKLINE1",'DRAWKLINE_IF',"DRAWCOLORKLINE",'PLOYLINE',"DRAWOVERLAYKLINE",
|
|
104939
105182
|
'POLYLINE','DRAWNUMBER',"DRAWNUMBER_FIX",'DRAWICON','DRAWCHANNEL','PARTLINE','DRAWTEXT_FIX','DRAWGBK','DRAWTEXT_LINE','DRAWRECTREL',"DRAWTEXTABS","DRAWTEXTREL",
|
|
104940
105183
|
'DRAWOVERLAYLINE',"FILLRGN", "FILLRGN2","FILLTOPRGN", "FILLBOTTOMRGN", "FILLVERTICALRGN","FLOATRGN","DRAWSL", "DRAWGBK2","DRAWGBK_DIV",
|
|
104941
|
-
"VERTLINE","HORLINE","TIPICON"
|
|
105184
|
+
"VERTLINE","HORLINE","TIPICON",
|
|
105185
|
+
"BUY","SELL","SELLSHORT","BUYSHORT",
|
|
104942
105186
|
]);
|
|
104943
105187
|
if (setFunctionName.has(name)) return true;
|
|
104944
105188
|
|
|
@@ -111412,6 +111656,24 @@ function JSExecute(ast,option)
|
|
|
111412
111656
|
}
|
|
111413
111657
|
break;
|
|
111414
111658
|
|
|
111659
|
+
//交易函数
|
|
111660
|
+
case "BUY":
|
|
111661
|
+
node.Draw=this.Draw.BUY(args[0],args[1],args[2],args[3]);
|
|
111662
|
+
node.Out=node.Draw.DrawData.Data;
|
|
111663
|
+
break;
|
|
111664
|
+
case "SELL":
|
|
111665
|
+
node.Draw=this.Draw.SELL(args[0],args[1],args[2],args[3]);
|
|
111666
|
+
node.Out=node.Draw.DrawData.Data;
|
|
111667
|
+
break;
|
|
111668
|
+
case "SELLSHORT":
|
|
111669
|
+
node.Draw=this.Draw.SELLSHORT(args[0],args[1],args[2],args[3]);
|
|
111670
|
+
node.Out=node.Draw.DrawData.Data;
|
|
111671
|
+
break;
|
|
111672
|
+
case "BUYSHORT":
|
|
111673
|
+
node.Draw=this.Draw.BUYSHORT(args[0],args[1],args[2],args[3]);
|
|
111674
|
+
node.Out=node.Draw.DrawData.Data;
|
|
111675
|
+
break;
|
|
111676
|
+
|
|
111415
111677
|
default:
|
|
111416
111678
|
node.Out=this.Algorithm.CallFunction(funcName, args, node, this.SymbolData);
|
|
111417
111679
|
break;
|
|
@@ -114074,6 +114336,23 @@ function ScriptIndex(name,script,args,option)
|
|
|
114074
114336
|
hqChart.ChartPaint.push(chart);
|
|
114075
114337
|
}
|
|
114076
114338
|
|
|
114339
|
+
this.CreateTradeIcon=function(hqChart,windowIndex,varItem,id)
|
|
114340
|
+
{
|
|
114341
|
+
var chart=new ChartTradeIcon();
|
|
114342
|
+
chart.Canvas=hqChart.Canvas;
|
|
114343
|
+
chart.Name=varItem.Name;
|
|
114344
|
+
chart.ChartBorder=hqChart.Frame.SubFrame[windowIndex].Frame.ChartBorder;
|
|
114345
|
+
chart.ChartFrame=hqChart.Frame.SubFrame[windowIndex].Frame;
|
|
114346
|
+
|
|
114347
|
+
chart.Data.Data=varItem.Draw.DrawData.Data;
|
|
114348
|
+
chart.AryIcon=varItem.Draw.DrawData.Icons;
|
|
114349
|
+
chart.TradeType=varItem.Draw.DrawType;
|
|
114350
|
+
|
|
114351
|
+
if (varItem.DrawFontSize>0) chart.SVG.Size=varItem.DrawFontSize; //图标大小
|
|
114352
|
+
|
|
114353
|
+
hqChart.ChartPaint.push(chart);
|
|
114354
|
+
}
|
|
114355
|
+
|
|
114077
114356
|
this.CreateTextLine=function(hqChart,windowIndex,varItem,id)
|
|
114078
114357
|
{
|
|
114079
114358
|
let chart=new ChartTextLine();
|
|
@@ -114799,6 +115078,13 @@ function ScriptIndex(name,script,args,option)
|
|
|
114799
115078
|
case "MULTI_POINT_LINE":
|
|
114800
115079
|
this.CreateLineMultiData(hqChart,windowIndex,item,i);
|
|
114801
115080
|
break;
|
|
115081
|
+
case "BUY":
|
|
115082
|
+
case "SELL":
|
|
115083
|
+
case "SELLSHORT":
|
|
115084
|
+
case "BUYSHORT":
|
|
115085
|
+
this.CreateTradeIcon(hqChart,windowIndex,item,i);
|
|
115086
|
+
break;
|
|
115087
|
+
|
|
114802
115088
|
case SCRIPT_CHART_NAME.OVERLAY_BARS:
|
|
114803
115089
|
this.CreateStackedBar(hqChart,windowIndex,item,i);
|
|
114804
115090
|
break;
|
|
@@ -129660,7 +129946,7 @@ function ScrollBarBGChart()
|
|
|
129660
129946
|
|
|
129661
129947
|
|
|
129662
129948
|
|
|
129663
|
-
var HQCHART_VERSION="1.1.
|
|
129949
|
+
var HQCHART_VERSION="1.1.12627";
|
|
129664
129950
|
|
|
129665
129951
|
function PrintHQChartVersion()
|
|
129666
129952
|
{
|