hqchart 1.1.15111 → 1.1.15126

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.
@@ -6766,6 +6766,14 @@ JSChart.RegisterChartFrameClass=function(name, option)
6766
6766
  }
6767
6767
 
6768
6768
 
6769
+ //注册DOM对话框类
6770
+ //option:{ Create:创建类方法 }
6771
+ JSChart.RegisterDOMClass=function(name, option)
6772
+ {
6773
+ return g_JSDOMFactory.Add(name, option);
6774
+ }
6775
+
6776
+
6769
6777
  //一些公共函数
6770
6778
  JSChart.ToFixedPoint=function(value)
6771
6779
  {
@@ -14491,6 +14499,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
14491
14499
  if (IFrameSplitOperator.IsBool(windowItem.IsShowTitleArrow)) frame.IsShowTitleArrow=windowItem.IsShowTitleArrow;
14492
14500
  if (IFrameSplitOperator.IsNumber(windowItem.TitleArrowType)) frame.TitleArrowType=windowItem.TitleArrowType;
14493
14501
  if (IFrameSplitOperator.IsBool(windowItem.IsShowIndexName)) frame.IsShowIndexName=windowItem.IsShowIndexName;
14502
+ if (IFrameSplitOperator.IsBool(windowItem.IsSinlgeLine)) frame.IsSinlgeLine=windowItem.IsSinlgeLine;
14494
14503
  if (IFrameSplitOperator.IsBool(windowItem.IsShowOverlayIndexName)) frame.IsShowOverlayIndexName=windowItem.IsShowOverlayIndexName;
14495
14504
  if (IFrameSplitOperator.IsNumber(windowItem.IndexParamSpace)) frame.IndexParamSpace=windowItem.IndexParamSpace;
14496
14505
  if (IFrameSplitOperator.IsNumber(windowItem.IndexTitleSpace)) frame.IndexTitleSpace=windowItem.IndexTitleSpace;
@@ -14614,6 +14623,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
14614
14623
  if (IFrameSplitOperator.IsBool(option.IsShowTitleArrow)) subFrame.Frame.IsShowTitleArrow=option.IsShowTitleArrow;
14615
14624
  if (IFrameSplitOperator.IsNumber(option.TitleArrowType)) subFrame.Frame.TitleArrowType=option.TitleArrowType;
14616
14625
  if (IFrameSplitOperator.IsBool(option.IsShowIndexName)) subFrame.Frame.IsShowIndexName=option.IsShowIndexName;
14626
+ if (IFrameSplitOperator.IsBool(option.IsSinlgeLine)) subFrame.Frame.IsSinlgeLine=option.IsSinlgeLine;
14617
14627
  if (IFrameSplitOperator.IsBool(option.IsShowOverlayIndexName)) subFrame.Frame.IsShowOverlayIndexName=option.IsShowOverlayIndexName;
14618
14628
  if (IFrameSplitOperator.IsNumber(option.IndexParamSpace)) subFrame.Frame.IndexParamSpace=option.IndexParamSpace;
14619
14629
  if (IFrameSplitOperator.IsBool(option.IsShowXLine)) subFrame.Frame.IsShowXLine=option.IsShowXLine;
@@ -16699,6 +16709,36 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
16699
16709
  this.UpdateWindowIndexV2(aryUpdate);
16700
16710
  return true;
16701
16711
  }
16712
+
16713
+ this.TryClickLock=function(x,y)
16714
+ {
16715
+ if (!this.Frame || !IFrameSplitOperator.IsNonEmptyArray(this.Frame.SubFrame)) return false;
16716
+
16717
+ for(var i=0;i<this.Frame.SubFrame.length; ++i)
16718
+ {
16719
+ var item=this.Frame.SubFrame[i];
16720
+ var chartLock=item.Frame.LockPaint;
16721
+ if (!chartLock || !chartLock.LockRect) continue;
16722
+
16723
+ var tooltip=new TooltipData();
16724
+ if (!chartLock.GetTooltipData(x,y,tooltip)) continue;
16725
+
16726
+ tooltip.HQChart=this;
16727
+
16728
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_INDEX_LOCK);
16729
+ if (event && event.Callback)
16730
+ {
16731
+ var sendData={ FrameID:item.Frame.Identify, Data:tooltip };
16732
+ event.Callback(event,sendData,this);
16733
+ }
16734
+
16735
+
16736
+ if (tooltip.Data.Callback) tooltip.Data.Callback(tooltip);
16737
+ return true;
16738
+ }
16739
+
16740
+ return false;
16741
+ }
16702
16742
  }
16703
16743
 
16704
16744
  function GetDevicePixelRatio()
@@ -17353,6 +17393,7 @@ function IChartFramePainting()
17353
17393
  this.IsShowBorder = true; //是否显示边框
17354
17394
  this.IsShowTitleArrow=g_JSChartResource.IndexTitle.EnableIndexArrow; //是否显示指标信息上涨下跌箭头
17355
17395
  this.TitleArrowType=g_JSChartResource.IndexTitle.ArrowType; //指标信息上涨下跌箭头类型 0=独立颜色 1=跟指标名字颜色一致
17396
+ this.IsSinlgeLine=g_JSChartResource.IndexTitle.IsSinlgeLine;
17356
17397
  this.IsShowIndexName=true; //是否显示指标名字
17357
17398
  this.IsShowOverlayIndexName=true; //是否显示叠加指标名字
17358
17399
  //this.OverlayIndexType= { Position:0, LineSpace:5 };
@@ -20454,7 +20495,7 @@ function AverageWidthFrame()
20454
20495
 
20455
20496
  if (this.ClassName=="MinuteFrame" || this.ClassName=="KLineFrame")
20456
20497
  {
20457
- this.DivFrameToolbar=new JSDivFrameToolbar();
20498
+ this.DivFrameToolbar=g_JSDOMFactory.Create('JSDivFrameToolbar');//new JSDivFrameToolbar();
20458
20499
  this.DivFrameToolbar.HQChart=hqchart;
20459
20500
  this.DivFrameToolbar.DivHQChart=divHQChart;
20460
20501
  this.DivFrameToolbar.FrameID=frameID;
@@ -30999,9 +31040,20 @@ function IChartPainting()
30999
31040
  var x=left+width/2;
31000
31041
  var y=top+height/2;
31001
31042
 
31043
+ var bHScreen=this.ChartFrame.IsHScreen;
31044
+ if (bHScreen)
31045
+ {
31046
+ this.Canvas.save();
31047
+ this.Canvas.translate(x, y);
31048
+ this.Canvas.rotate(90 * Math.PI / 180);
31049
+ x=0,y=0;
31050
+ }
31051
+
31002
31052
  this.Canvas.textAlign="center";
31003
31053
  this.Canvas.textBaseline="middle";
31004
31054
  this.Canvas.fillText(this.NotSupportMessage,x,y);
31055
+
31056
+ if (bHScreen) this.Canvas.restore();
31005
31057
  }
31006
31058
 
31007
31059
  this.GetTooltipData=function(x,y,tooltip)
@@ -52043,6 +52095,8 @@ function ChartLock()
52043
52095
  this.IndexName; //指标名字
52044
52096
  this.IndexID; //指标ID
52045
52097
 
52098
+ this.MinWidthText=" 付费指标 "
52099
+
52046
52100
  this.SetData=function(aryData)
52047
52101
  {
52048
52102
  this.AryData=aryData;
@@ -52170,11 +52224,27 @@ function ChartLock()
52170
52224
  }
52171
52225
  }
52172
52226
 
52227
+ this.Canvas.font=this.Font;
52228
+ var minWidth=this.Canvas.measureText(this.MinWidthText).width;
52229
+
52230
+ var aryText=null;
52231
+ if (Array.isArray(this.Title)) aryText=this.Title;
52232
+ else aryText=[{Text:this.Title}];
52233
+
52234
+ var outSize={ };
52235
+ if (!this.CalculateTextSize(aryText, this.Font, outSize)) outSize=null;
52236
+ if (outSize && outSize.Width+8>minWidth) minWidth=outSize.Width+8; //确保文字可以显示
52237
+
52173
52238
  if (bHScreen)
52174
52239
  {
52175
52240
  var rtBG={ Left:border.Left, Right:border.RightEx, Top:left, Bottom:border.Bottom };
52176
52241
  rtBG.Width=rtBG.Right-rtBG.Left;
52177
52242
  rtBG.Height=rtBG.Bottom-rtBG.Top;
52243
+ if (rtBG.Height<minWidth)
52244
+ {
52245
+ rtBG.Height=minWidth;
52246
+ rtBG.Top=rtBG.Bottom-rtBG.Height;
52247
+ }
52178
52248
  this.LockRect=rtBG; //保存上锁区域
52179
52249
 
52180
52250
  if (bDraw)
@@ -52189,6 +52259,11 @@ function ChartLock()
52189
52259
  var rtBG={ Left:left, Right:border.RightEx, Top:border.TopTitle, Bottom:border.Bottom };
52190
52260
  rtBG.Width=rtBG.Right-rtBG.Left;
52191
52261
  rtBG.Height=rtBG.Bottom-rtBG.Top;
52262
+ if (rtBG.Width<minWidth)
52263
+ {
52264
+ rtBG.Width=minWidth;
52265
+ rtBG.Left=rtBG.Right-rtBG.Width;
52266
+ }
52192
52267
  this.LockRect=rtBG; //保存上锁区域
52193
52268
 
52194
52269
  if (bDraw)
@@ -52201,13 +52276,7 @@ function ChartLock()
52201
52276
  }
52202
52277
 
52203
52278
  if (!bDraw) return;
52204
-
52205
- var aryText=null;
52206
- if (Array.isArray(this.Title)) aryText=this.Title;
52207
- else aryText=[{Text:this.Title}];
52208
-
52209
- var outSize={ };
52210
- if (!this.CalculateTextSize(aryText, this.Font, outSize)) return;
52279
+ if (!outSize) return;
52211
52280
 
52212
52281
  this.Canvas.textAlign='left';
52213
52282
  this.Canvas.textBaseline='bottom';
@@ -66718,6 +66787,7 @@ function DynamicChartTitlePainting()
66718
66787
  this.IsShowIndexName=true; //是否显示指标名字
66719
66788
  this.IsShowIndexTitle=true; //是否显示指标标题信息
66720
66789
  this.IsShowNameArrow=false;
66790
+ this.IsSinlgeLine=false; //主图指标标题是否单行显示
66721
66791
  this.NameArrowConfig=CloneData(g_JSChartResource.IndexTitle.NameArrow);
66722
66792
  this.CustomLocation; //自定义位置 { IsShow:, Top:, TitleHeight: }
66723
66793
 
@@ -67456,6 +67526,7 @@ function DynamicChartTitlePainting()
67456
67526
  this.IsShowUpDownArrow=this.Frame.IsShowTitleArrow;
67457
67527
  this.TitleArrowType=this.Frame.TitleArrowType;
67458
67528
  this.IsShowIndexName=this.Frame.IsShowIndexName;
67529
+ this.IsSinlgeLine=this.Frame.IsSinlgeLine;
67459
67530
  this.IsShowOverlayIndexName=this.Frame.IsShowOverlayIndexName;
67460
67531
  this.OverlayIndexType.Position=this.Frame.OverlayIndexType.Position;
67461
67532
  this.OverlayIndexType.LineSpace=this.Frame.OverlayIndexType.LineSpace;
@@ -67862,6 +67933,7 @@ function DynamicChartTitlePainting()
67862
67933
 
67863
67934
  if ((left+textWidth+space)>right)
67864
67935
  {
67936
+ if (this.IsSinlgeLine) break;
67865
67937
  left=newLineLeft;
67866
67938
  bottom+=lineHeight;
67867
67939
  right=this.Frame.ChartBorder.GetRight(); //第2行以后 右侧边框
@@ -67926,6 +67998,7 @@ function DynamicChartTitlePainting()
67926
67998
  var textWidth=this.Canvas.measureText(text).width+space;
67927
67999
  if ((left+textWidth)>right) //换行
67928
68000
  {
68001
+ if (this.IsSinlgeLine) break;
67929
68002
  left=newLineLeft;
67930
68003
  bottom+=lineHeight;
67931
68004
  right=this.Frame.ChartBorder.GetRight(); //第2行以后 右侧边框
@@ -81413,6 +81486,8 @@ function JSChartResource()
81413
81486
  EnableIndexArrow:true, //指标数值是否带上涨下跌箭头
81414
81487
 
81415
81488
  NameArrow:{ Color:"rgb(43,54,69)", Space:2, Symbol:'▼' },
81489
+
81490
+ IsSinlgeLine:false, //主图指标是否单行显示 false=多行显示
81416
81491
  }
81417
81492
 
81418
81493
  this.Title={
@@ -83098,6 +83173,7 @@ function JSChartResource()
83098
83173
 
83099
83174
  if (IFrameSplitOperator.IsNumber(item.ArrowType)) this.IndexTitle.ArrowType=item.ArrowType;
83100
83175
  if (IFrameSplitOperator.IsBool(item.EnableIndexArrow)) this.IndexTitle.EnableIndexArrow=item.EnableIndexArrow;
83176
+ if (IFrameSplitOperator.IsBool(item.IsSinlgeLine)) this.IndexTitle.IsSinlgeLine=item.IsSinlgeLine;
83101
83177
 
83102
83178
  if (item.NameArrow)
83103
83179
  {
@@ -90862,32 +90938,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
90862
90938
  }
90863
90939
  }
90864
90940
 
90865
- this.TryClickLock=function(x,y)
90866
- {
90867
- for(var i=0;i<this.Frame.SubFrame.length; ++i)
90868
- {
90869
- var item=this.Frame.SubFrame[i];
90870
- var chartLock=item.Frame.LockPaint;
90871
- if (!chartLock || !chartLock.LockRect) continue;
90872
-
90873
- var tooltip=new TooltipData();
90874
- if (!chartLock.GetTooltipData(x,y,tooltip)) continue;
90875
-
90876
- tooltip.HQChart=this;
90877
- var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_INDEX_LOCK);
90878
- if (event && event.Callback)
90879
- {
90880
- var sendData={ FrameID:item.Frame.Identify, Data:tooltip };
90881
- event.Callback(event,sendData,this);
90882
- }
90883
-
90884
- if (tooltip.Data.Callback) tooltip.Data.Callback(tooltip);
90885
- return true;
90886
- }
90887
-
90888
- return false;
90889
- }
90890
-
90891
90941
  this.TryClickIndexTitle=function(x,y)
90892
90942
  {
90893
90943
  for(var i in this.TitlePaint)
@@ -100694,34 +100744,6 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
100694
100744
 
100695
100745
  return false;
100696
100746
  }
100697
-
100698
- this.TryClickLock=function(x,y)
100699
- {
100700
- for(var i=0;i<this.Frame.SubFrame.length; ++i)
100701
- {
100702
- var item=this.Frame.SubFrame[i];
100703
- var chartLock=item.Frame.LockPaint;
100704
- if (!chartLock || !chartLock.LockRect) continue;
100705
-
100706
- var tooltip=new TooltipData();
100707
- if (!chartLock.GetTooltipData(x,y,tooltip)) continue;
100708
-
100709
- tooltip.HQChart=this;
100710
-
100711
- var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_INDEX_LOCK);
100712
- if (event && event.Callback)
100713
- {
100714
- var sendData={ FrameID:item.Frame.Identify, Data:tooltip };
100715
- event.Callback(event,sendData,this);
100716
- }
100717
-
100718
-
100719
- if (tooltip.Data.Callback) tooltip.Data.Callback(tooltip);
100720
- return true;
100721
- }
100722
-
100723
- return false;
100724
- }
100725
100747
  }
100726
100748
 
100727
100749
  //盘前数据
@@ -102673,6 +102695,7 @@ function KLineChartHScreenContainer(uielement)
102673
102695
  frame.RightSpaceCount=this.RightSpaceCount; //右边
102674
102696
  frame.GetEventCallback=(id)=> { return this.GetEventCallback(id); };
102675
102697
  frame.GlobalOption=this.GlobalOption;
102698
+ frame.CreateLockPaint();
102676
102699
 
102677
102700
  frame.HorizontalMax=20;
102678
102701
  frame.HorizontalMin=10;
@@ -102861,6 +102884,7 @@ function MinuteChartHScreenContainer(uielement)
102861
102884
  frame.XPointCount=243;
102862
102885
  frame.HQChart=this;
102863
102886
  frame.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
102887
+ frame.CreateLockPaint();
102864
102888
 
102865
102889
  var DEFAULT_HORIZONTAL=[9,8,7,6,5,4,3,2,1];
102866
102890
  frame.HorizontalMax=DEFAULT_HORIZONTAL[0];
@@ -109547,7 +109571,7 @@ function JSDivFrameToolbar()
109547
109571
  {
109548
109572
  var item=aryButton[i];
109549
109573
  if (!item.ID || !item.ClassName) continue;
109550
- var newItem={ ID:item.ID, ClassName:item.ClassName, Span:null,Div:null, TooltipSpan:null };
109574
+ var newItem={ ID:item.ID, ClassName:item.ClassName, Span:null,Div:null, TooltipSpan:null, SpanText:item.SpanText };
109551
109575
  if (item.Tooltip && item.Tooltip.Text) newItem.Tooltip={ Text:item.Tooltip.Text };
109552
109576
 
109553
109577
  this.AryButton.push(newItem);
@@ -109578,7 +109602,7 @@ function JSDivFrameToolbar()
109578
109602
  if (!frame && this.FrameID>=0 && this.FrameID<this.HQChart.Frame.SubFrame.length)
109579
109603
  frame=this.HQChart.Frame.SubFrame[this.FrameID].Frame;
109580
109604
 
109581
- var aryDefaultButton=JSDivFrameToolbar.GetDfaultButtons();
109605
+ var aryDefaultButton=JSDivFrameToolbar.GetDfaultButtons(frame);
109582
109606
  var aryButton=[];
109583
109607
  for(var i=0;i<aryDefaultButton.length; i++)
109584
109608
  {
@@ -109636,8 +109660,6 @@ function JSDivFrameToolbar()
109636
109660
  this.SetToolbar(aryButton); //重新设置按钮
109637
109661
  }
109638
109662
 
109639
-
109640
-
109641
109663
  this.Destroy=function()
109642
109664
  {
109643
109665
  if (this.DivToolbar)
@@ -109705,6 +109727,7 @@ function JSDivFrameToolbar()
109705
109727
  var spanDom=document.createElement("span");
109706
109728
  spanDom.className=item.ClassName;
109707
109729
  spanDom.onmousedown=(e)=>{ this.OnClickButton(e, item); };
109730
+ if (item.SpanText) spanDom.innerText=item.SpanText;
109708
109731
  item.Span=spanDom;
109709
109732
  btnDiv.appendChild(spanDom);
109710
109733
 
@@ -109789,7 +109812,7 @@ function JSDivFrameToolbar()
109789
109812
  }
109790
109813
  }
109791
109814
 
109792
- JSDivFrameToolbar.GetDfaultButtons=function()
109815
+ JSDivFrameToolbar.GetDfaultButtons=function(frame)
109793
109816
  {
109794
109817
  var aryButton=
109795
109818
  [
@@ -109813,12 +109836,50 @@ JSDivFrameToolbar.GetDfaultButtons=function()
109813
109836
  ID:JSCHART_BUTTON_ID.CLOSE_INDEX_WINDOW, ClassName:"UMyChart_FrameToolbar_Span_Button icon iconfont icon-close", Tooltip:{ Text:"关闭窗口"},
109814
109837
  Span:null,Div:null, TooltipSpan:null
109815
109838
  },
109839
+
109840
+ /*
109841
+ {
109842
+ ID:"TEST_8889", ClassName:"UMyChart_FrameToolbar_Span_Text", Tooltip:{ Text:"测试按钮提示"}, SpanText:"测试按钮",
109843
+ Span:null, Div:null, TooltipSpan:null
109844
+ },
109845
+ */
109816
109846
  ];
109817
109847
 
109818
109848
  return aryButton
109819
109849
  }
109820
109850
 
109821
109851
 
109852
+
109853
+ //DOM工厂类
109854
+ function JSDOMFactory()
109855
+ {
109856
+ //[key:name, { Create:function(divElement) { return new class(divElement); }} ]
109857
+ this.DataMap=new Map(
109858
+ [
109859
+ ["JSDivFrameToolbar", { Create:function(option) { return new JSDivFrameToolbar(option); } }],
109860
+ ]);
109861
+
109862
+ this.Create=function(name, option)
109863
+ {
109864
+ if (!this.DataMap.has(name))
109865
+ {
109866
+ JSConsole.Chart.Warn(`[JSDOMFactory::Create] can't find class=${name}.`);
109867
+ return null;
109868
+ }
109869
+
109870
+ var item=this.DataMap.get(name);
109871
+ return item.Create(option);
109872
+ }
109873
+
109874
+ this.Add=function(name, option)
109875
+ {
109876
+ this.DataMap.set(name, { Create:option.Create } );
109877
+ }
109878
+ }
109879
+
109880
+ var g_JSDOMFactory=new JSDOMFactory();
109881
+
109882
+
109822
109883
  function JSToolbarTooltip()
109823
109884
  {
109824
109885
  this.DivTooltip=null;
@@ -164605,7 +164666,7 @@ function JSDialogSearchIndex()
164605
164666
  var indexItem=cellItem.IndexItem;
164606
164667
  if (indexItem.Type==0 ) //系统指标
164607
164668
  {
164608
- this.HQChart.ChangeIndex(this.OpData.WindowIndex, indexItem.ID );
164669
+ this.HQChart.ChangeIndex(this.OpData.WindowIndex, indexItem.ID, indexItem);
164609
164670
  }
164610
164671
  else if(indexItem.Type==4 || indexItem.Type==5) //五彩K线
164611
164672
  {
@@ -164636,6 +164697,7 @@ function JSDialogSearchIndex()
164636
164697
  if (indexItem.Type==0) //系统指标
164637
164698
  {
164638
164699
  var obj={ WindowIndex:this.OpData.WindowIndex, IndexName:indexItem.ID };
164700
+ if (indexItem.Lock) obj.Lock=indexItem.Lock;
164639
164701
  this.HQChart.AddOverlayIndex(obj);
164640
164702
  }
164641
164703
  else if (indexItem.Type==1) //自定义脚本指标
@@ -165100,11 +165162,7 @@ JSDialogSearchIndex.GetDefaultIndexData=function()
165100
165162
  [
165101
165163
  { Name:"收盘线(后台指标)", ID:"API-DRAWTEXTREL", Type:2, Args:null },
165102
165164
  { Name:"高低均价(自定义脚本)", ID:"HIGH_LOW_AV", Type:1, Script:"均价:(H+L)/2;高:H;低:L;", Args:[ { Name:'N', Value:20}, { Name:'M', Value:6}]},
165103
- {
165104
- Name:"波段量能跟庄-波段量能", ID:"TEST_INDEX_4AE0_1", Type:1, Args:null,
165105
- Script:TEST_INDEX_4AE0_1,
165106
- Lock:{ IsLocked:true }
165107
- }
165165
+ { Name:"指标异常(后台指标)", ID:"API_ERRORMESSAGE", Type:2, Args:null,}
165108
165166
  ]
165109
165167
  },
165110
165168
  {
@@ -165112,11 +165170,8 @@ JSDialogSearchIndex.GetDefaultIndexData=function()
165112
165170
  AryIndex:
165113
165171
  [
165114
165172
  { Name:"面积图(后台指标)", ID:"API-DRAWBAND", Type:2, Args:null, Lock:{ IsLocked:true } },
165115
- {
165116
- Name:"波段量能跟庄-波段量能", ID:"TEST_INDEX_4AE0_1", Type:1, Args:null,
165117
- Script:TEST_INDEX_4AE0_1,
165118
- Lock:{ IsLocked:true }
165119
- }
165173
+ { Name:"波段量能跟庄-波段量能", ID:"TEST_INDEX_4AE0_1", Type:0, Lock:{ IsLocked:true } },
165174
+ { Name:"飞龙八级进-主图", ID:"TEST_INDEX_4AE0_2", Type:0, Lock:{ IsLocked:true } }
165120
165175
  ]
165121
165176
  },
165122
165177
  {
@@ -165619,6 +165674,7 @@ function JSDialogModifyIndexParam()
165619
165674
  /////////////////////////////////////////////////////////////////////////////////////////////
165620
165675
  //测试指标
165621
165676
 
165677
+
165622
165678
  var TEST_INDEX_4AE0_1=`能量:=SQRT(VOL)*(((C-(H+L)/2))/((H+L)/2));
165623
165679
  平滑能量:=EMA(能量,16);
165624
165680
  能量惯性:EMA(平滑能量,16);
@@ -165635,6 +165691,111 @@ STICKLINE(能量惯性<0,(能量惯性-能量惯性*0.6),(能量惯性-能量惯
165635
165691
  STICKLINE(能量惯性<0,(能量惯性-能量惯性*0.8),(能量惯性-能量惯性*0.95),3,0), COLORFFFF00;`
165636
165692
 
165637
165693
 
165694
+ var TEST_INDEX_4AE0_2=`
165695
+ MA3:MA(CLOSE,3),COLORWHITE;
165696
+ MA17:MA(CLOSE,17),COLORYELLOW;
165697
+ QQ:=0,COLORWHITE;
165698
+ MA1:=MA(CLOSE,3);
165699
+ MA2:=MA(CLOSE,17);
165700
+ JG:=CROSS(MA1,MA2);
165701
+ VOLUME:=VOL,VOLSTICK;
165702
+ MAVOL1:=MA(VOLUME,3);
165703
+ MAVOL2:=MA(VOLUME,17);
165704
+ NL:=CROSS(MAVOL1,MAVOL2);
165705
+ DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
165706
+ DEA:=EMA(DIF,9);
165707
+ MACD:=(DIF-DEA)*2,COLORSTICK;
165708
+ NA:=CROSS(DIF,DEA);
165709
+ RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
165710
+ K:=SMA(RSV,9,1);
165711
+ D:=SMA(K,9,1);
165712
+ J:=3*K-2*D;
165713
+ KD:=CROSS(K,D) AND CROSS(J,D);
165714
+ 飞龙八级进:DRAWTEXT((JG AND NL AND NA) OR (JG AND NL AND KD) OR
165715
+ (JG AND NA AND KD) OR (NL AND NA AND KD),L*0.95,' 飞龙八级进'),COLORYELLOW;
165716
+ X:=LLV(J,2)=LLV(J,8);
165717
+ Y:=IF(CROSS(J,REF(J+0.01,1)) AND X AND J<20,30,0);
165718
+ DRAWTEXT(CROSS(J,REF(J+0.01,1)) AND X AND J<20,LOW*0.98,''),COLORLIMAGENTA;
165719
+ 空:=EMA(C,5);
165720
+ 均衡:=EMA(空,5),COLORWHITE;
165721
+ 中轨:=HHV(MA(H,13),13),COLORRED,LINETHICK2;
165722
+ VAR5:=FILTER(均衡>REF(均衡,1)AND 中轨<REF(中轨,1)AND C>REF(C,1),11);
165723
+ DRAWTEXT(VAR5,L*0.98,''),COLORYELLOW;
165724
+ PT:=XMA(H,20);
165725
+ PAN:=XMA(CLOSE,7),COLORBROWN;
165726
+ RUO:=MEMA(CLOSE,3),COLORLIBLUE;
165727
+ STICKLINE(CLOSE> REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORRED;
165728
+ STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR000055;
165729
+ STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR000077;
165730
+ STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR000099;
165731
+ STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLOR0000BB;
165732
+ STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLOR0000DD;
165733
+ STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLOR0000FF;
165734
+ STICKLINE(CLOSE= REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORWHITE;
165735
+ STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR555555;
165736
+ STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR777777;
165737
+ STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR999999;
165738
+ STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORBBBBBB;
165739
+ STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORDDDDDD;
165740
+ STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORFFFFFF;
165741
+ STICKLINE(CLOSE< REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORCYAN;
165742
+ STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR990000;
165743
+ STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLORCC0000;
165744
+ STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLORFF4400;
165745
+ STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORFF8800;
165746
+ STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORFFCC00;
165747
+ STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORCYAN;
165748
+ 高:=REF(HHV(H,80),3);
165749
+ 低:=REF(LLV(L,80),3);
165750
+ H19:=高-(高-低)*0.191;
165751
+ H38:=高-(高-低)*0.382;
165752
+ H中:=高-(高-低)*0.5;
165753
+ H61:=高-(高-低)*0.618;
165754
+ H80:=高-(高-低)*0.809;
165755
+ 顶点:REFDATE(高,DATE),COLORWHITE;
165756
+ REFDATE(H19,DATE),COLORYELLOW;
165757
+ REFDATE(H38,DATE),COLORMAGENTA;
165758
+ REFDATE(H中,DATE),COLORRED;
165759
+ REFDATE(H61,DATE),COLORMAGENTA;
165760
+ REFDATE(H80,DATE),COLORYELLOW;
165761
+ 低点:REFDATE(低,DATE),COLORWHITE;
165762
+ DRAWTEXT(ISLASTBAR,低点,''),COLORWHITE;
165763
+ `
165764
+
165765
+
165766
+ //添加测试系统指标
165767
+ AddTestSystemIndex=function()
165768
+ {
165769
+ var aryIndex=[];
165770
+
165771
+ aryIndex.push(
165772
+ {
165773
+ ID:"TEST_INDEX_4AE0_1",
165774
+ Name: '波段量能跟庄-波段量能',
165775
+ Script:TEST_INDEX_4AE0_1,
165776
+ Args: null,
165777
+
165778
+ });
165779
+
165780
+
165781
+ aryIndex.push(
165782
+ {
165783
+ ID:"TEST_INDEX_4AE0_2", //指标ID
165784
+ Name:'飞龙八级进-主图', //指标名称
165785
+ Description:'飞龙八级进', //描述信息
165786
+ IsMainIndex:true, //是否是主图指标
165787
+ Condition: { Period:[CONDITION_PERIOD.KLINE_DAY_ID], Message:"指标(飞龙八级进-主图)只支持日线周期" },
165788
+ Args:null, //指标参数
165789
+ Script:TEST_INDEX_4AE0_2,
165790
+ });
165791
+
165792
+ JSIndexScript.AddIndex(aryIndex);
165793
+ }
165794
+
165795
+
165796
+ AddTestSystemIndex();
165797
+
165798
+
165638
165799
 
165639
165800
 
165640
165801
  ///////////////////////////////////////////////////////////////////////////////////
@@ -165758,7 +165919,7 @@ function HQChartScriptWorker()
165758
165919
 
165759
165920
 
165760
165921
 
165761
- var HQCHART_VERSION="1.1.15110";
165922
+ var HQCHART_VERSION="1.1.15125";
165762
165923
 
165763
165924
  function PrintHQChartVersion()
165764
165925
  {
@@ -165888,6 +166049,8 @@ export default {
165888
166049
  IChartDrawPicture:IChartDrawPicture, //画图工具
165889
166050
  DynamicTitleData:DynamicTitleData, //指标标题数据
165890
166051
 
166052
+ JSDivFrameToolbar:JSDivFrameToolbar, //div指标工具条
166053
+
165891
166054
  CONDITION_PERIOD:CONDITION_PERIOD, //指标周期条件枚举
165892
166055
 
165893
166056
  //内部图形导出
@@ -165925,6 +166088,7 @@ export default {
165925
166088
  JSCHART_MENU_ID:JSCHART_MENU_ID,
165926
166089
  JSCHART_TRADE_STATUS_ID:JSCHART_TRADE_STATUS_ID, //交易状态
165927
166090
  JSCHART_CORSSCURSOR_STATUS_ID:JSCHART_CORSSCURSOR_STATUS_ID, //十字光标状态
166091
+ CONDITION_PERIOD:CONDITION_PERIOD, //指标周期条件枚举
165928
166092
  },
165929
166093
 
165930
166094