hqchart 1.1.15104 → 1.1.15111
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 +435 -361
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogDrawTool.js +5 -0
- package/src/jscommon/umychart.DialogSearchIndex.js +46 -5
- package/src/jscommon/umychart.complier.js +25 -13
- package/src/jscommon/umychart.js +278 -360
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +304 -374
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +355 -379
package/package.json
CHANGED
|
@@ -1052,6 +1052,11 @@ function JSDialogModifyDraw()
|
|
|
1052
1052
|
this.HQChart.Draw();
|
|
1053
1053
|
}
|
|
1054
1054
|
|
|
1055
|
+
this.AdvancedSetting=function()
|
|
1056
|
+
{
|
|
1057
|
+
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1055
1060
|
this.GetRandomText=function(text)
|
|
1056
1061
|
{
|
|
1057
1062
|
var ARY_TEXT=["下跌形态","反转十字星","低位档五阳线","倒V型反转","双顶","持续整理形态"];
|
|
@@ -35,7 +35,7 @@ function JSDialogSearchIndex()
|
|
|
35
35
|
|
|
36
36
|
this.MaxRowCount=30; //行
|
|
37
37
|
this.ColCount=3; //列
|
|
38
|
-
this.MaxGroupCount=
|
|
38
|
+
this.MaxGroupCount=20; //分类最多个数
|
|
39
39
|
|
|
40
40
|
this.AryData=[];
|
|
41
41
|
this.AryGroup=[]; //分类
|
|
@@ -316,12 +316,14 @@ function JSDialogSearchIndex()
|
|
|
316
316
|
else if (indexItem.Type==1) //自定义脚本指标
|
|
317
317
|
{
|
|
318
318
|
var indexData={ ID:indexItem.ID, Name:indexItem.Name, Script:indexItem.Script, Args:indexItem.Args };
|
|
319
|
+
if (indexItem.Lock) indexData.Lock=indexItem.Lock;
|
|
319
320
|
this.HQChart.ChangeScriptIndex(this.OpData.WindowIndex, indexData);
|
|
320
321
|
}
|
|
321
322
|
else if (indexItem.Type==2) //api指标
|
|
322
323
|
{
|
|
323
|
-
var
|
|
324
|
-
|
|
324
|
+
var indexData={ API: { ID:indexItem.ID, Name:indexItem.Name, Args:indexItem.Args, Url:'local'} };
|
|
325
|
+
if (indexItem.Lock) indexData.Lock=indexItem.Lock;
|
|
326
|
+
this.HQChart.ChangeAPIIndex(this.OpData.WindowIndex, indexData);
|
|
325
327
|
}
|
|
326
328
|
else if (indexItem.Type==3) //指标模板
|
|
327
329
|
{
|
|
@@ -341,11 +343,13 @@ function JSDialogSearchIndex()
|
|
|
341
343
|
else if (indexItem.Type==1) //自定义脚本指标
|
|
342
344
|
{
|
|
343
345
|
var obj={ WindowIndex:this.OpData.WindowIndex, IndexName:indexItem.ID, Name:indexItem.Name, Script:indexItem.Script, Args:indexItem.Args };
|
|
346
|
+
if (indexItem.Lock) obj.Lock=indexItem.Lock;
|
|
344
347
|
this.HQChart.AddOverlayIndex(obj);
|
|
345
348
|
}
|
|
346
349
|
else if (indexItem.Type==2) //api指标
|
|
347
350
|
{
|
|
348
351
|
var obj={ WindowIndex:this.OpData.WindowIndex, API: { ID:indexItem.ID, Name:indexItem.Name, Args:indexItem.Args, Url:'local'} };
|
|
352
|
+
if (indexItem.Lock) obj.Lock=indexItem.Lock;
|
|
349
353
|
this.HQChart.AddOverlayIndex(obj);
|
|
350
354
|
}
|
|
351
355
|
else if (indexItem.Type==3) //指标模板
|
|
@@ -372,6 +376,7 @@ function JSDialogSearchIndex()
|
|
|
372
376
|
else if (indexItem.Type==2) //api指标
|
|
373
377
|
{
|
|
374
378
|
var indexData={ API: { ID:indexItem.ID, Name:indexItem.Name, Args:indexItem.Args, Url:'local'} };
|
|
379
|
+
if (indexItem.Lock) indexData.Lock=indexItem.Lock;
|
|
375
380
|
this.HQChart.AddAPIIndexWindow(indexData, this.OpData);
|
|
376
381
|
}
|
|
377
382
|
else if (indexItem.Type==3) //指标模板
|
|
@@ -795,8 +800,25 @@ JSDialogSearchIndex.GetDefaultIndexData=function()
|
|
|
795
800
|
Group:{ ID:"自定义", Name:"自定义"} ,
|
|
796
801
|
AryIndex:
|
|
797
802
|
[
|
|
798
|
-
{ Name:"收盘线(后台指标)", ID:"
|
|
799
|
-
{ Name:"高低均价(自定义脚本)", ID:"HIGH_LOW_AV", Type:1,
|
|
803
|
+
{ Name:"收盘线(后台指标)", ID:"API-DRAWTEXTREL", Type:2, Args:null },
|
|
804
|
+
{ Name:"高低均价(自定义脚本)", ID:"HIGH_LOW_AV", Type:1, Script:"均价:(H+L)/2;高:H;低:L;", Args:[ { Name:'N', Value:20}, { Name:'M', Value:6}]},
|
|
805
|
+
{
|
|
806
|
+
Name:"波段量能跟庄-波段量能", ID:"TEST_INDEX_4AE0_1", Type:1, Args:null,
|
|
807
|
+
Script:TEST_INDEX_4AE0_1,
|
|
808
|
+
Lock:{ IsLocked:true }
|
|
809
|
+
}
|
|
810
|
+
]
|
|
811
|
+
},
|
|
812
|
+
{
|
|
813
|
+
Group:{ ID:"付费指标", Name:"付费指标"} ,
|
|
814
|
+
AryIndex:
|
|
815
|
+
[
|
|
816
|
+
{ Name:"面积图(后台指标)", ID:"API-DRAWBAND", Type:2, Args:null, Lock:{ IsLocked:true } },
|
|
817
|
+
{
|
|
818
|
+
Name:"波段量能跟庄-波段量能", ID:"TEST_INDEX_4AE0_1", Type:1, Args:null,
|
|
819
|
+
Script:TEST_INDEX_4AE0_1,
|
|
820
|
+
Lock:{ IsLocked:true }
|
|
821
|
+
}
|
|
800
822
|
]
|
|
801
823
|
},
|
|
802
824
|
{
|
|
@@ -1296,5 +1318,24 @@ function JSDialogModifyIndexParam()
|
|
|
1296
1318
|
}
|
|
1297
1319
|
|
|
1298
1320
|
|
|
1321
|
+
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
1322
|
+
//测试指标
|
|
1323
|
+
|
|
1324
|
+
var TEST_INDEX_4AE0_1=`能量:=SQRT(VOL)*(((C-(H+L)/2))/((H+L)/2));
|
|
1325
|
+
平滑能量:=EMA(能量,16);
|
|
1326
|
+
能量惯性:EMA(平滑能量,16);
|
|
1327
|
+
DRAWICON(能量惯性>0 AND REF(能量惯性,1)<0,0,1);
|
|
1328
|
+
STICKLINE(能量惯性>=0,(能量惯性-能量惯性*0.05),(能量惯性-能量惯性*0.15),3,0), COLOR0000CC;
|
|
1329
|
+
STICKLINE(能量惯性>=0,(能量惯性-能量惯性*0.2),(能量惯性-能量惯性*0.35),3,0), COLOR0066FF;
|
|
1330
|
+
STICKLINE(能量惯性>=0,(能量惯性-能量惯性*0.4),(能量惯性-能量惯性*0.55),3,0),COLOR0099FF;
|
|
1331
|
+
STICKLINE(能量惯性>=0,(能量惯性-能量惯性*0.6),(能量惯性-能量惯性*0.75),3,0), COLOR00CCFF;
|
|
1332
|
+
STICKLINE(能量惯性>=0,(能量惯性-能量惯性*0.8),(能量惯性-能量惯性*0.95),3,0), COLOR00FFFF;
|
|
1333
|
+
STICKLINE(能量惯性<0,(能量惯性-能量惯性*0.05),(能量惯性-能量惯性*0.15),3,0), COLORFF3300;
|
|
1334
|
+
STICKLINE(能量惯性<0,(能量惯性-能量惯性*0.2),(能量惯性-能量惯性*0.35),3,0), COLORFF6600;
|
|
1335
|
+
STICKLINE(能量惯性<0,(能量惯性-能量惯性*0.4),(能量惯性-能量惯性*0.55),3,0), COLORFF9900;
|
|
1336
|
+
STICKLINE(能量惯性<0,(能量惯性-能量惯性*0.6),(能量惯性-能量惯性*0.75),3,0), COLORFFCC00;
|
|
1337
|
+
STICKLINE(能量惯性<0,(能量惯性-能量惯性*0.8),(能量惯性-能量惯性*0.95),3,0), COLORFFFF00;`
|
|
1338
|
+
|
|
1339
|
+
|
|
1299
1340
|
|
|
1300
1341
|
|
|
@@ -20534,7 +20534,7 @@ function ScriptIndex(name,script,args,option)
|
|
|
20534
20534
|
Name:hqChart.Name,
|
|
20535
20535
|
Data:hisData,
|
|
20536
20536
|
SourceData:hqChart.SourceData,
|
|
20537
|
-
Callback:this.RecvResultData, CallbackParam:param,
|
|
20537
|
+
Callback:(arg1, arg2)=>{ this.RecvResultData(arg1, arg2); }, CallbackParam:param,
|
|
20538
20538
|
Async:true,
|
|
20539
20539
|
MaxRequestDataCount:hqChart.MaxRequestDataCount,
|
|
20540
20540
|
MaxRequestMinuteDayCount:hqChart.MaxRequestMinuteDayCount,
|
|
@@ -23223,6 +23223,18 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
23223
23223
|
param.Self.OutVar=outVar;
|
|
23224
23224
|
param.Self.BindData(hqChart,windowIndex,hisData);
|
|
23225
23225
|
|
|
23226
|
+
var frame=this.OverlayIndex.Frame.Frame;
|
|
23227
|
+
if (this.IsLocked==false) //不上锁
|
|
23228
|
+
{
|
|
23229
|
+
frame.SetLock(null);
|
|
23230
|
+
}
|
|
23231
|
+
else //上锁
|
|
23232
|
+
{
|
|
23233
|
+
let lockData={ IsLocked:true,Callback:this.LockCallback,IndexName:this.Name ,ID:this.LockID, IndexID:this.ID,
|
|
23234
|
+
BG:this.LockBG,Text:this.LockText,TextColor:this.LockTextColor, Font:this.LockFont, Count:this.LockCount, MinWidth:this.LockMinWidth };
|
|
23235
|
+
frame.SetLock(lockData);
|
|
23236
|
+
}
|
|
23237
|
+
|
|
23226
23238
|
param.HQChart.UpdataDataoffset(); //更新数据偏移
|
|
23227
23239
|
param.HQChart.UpdateFrameMaxMin(); //调整坐标最大 最小值
|
|
23228
23240
|
|
|
@@ -25083,20 +25095,20 @@ function APIScriptIndex(name,script,args,option, isOverlay)
|
|
|
25083
25095
|
}
|
|
25084
25096
|
this.BindData(hqChart,windowIndex,hisData);
|
|
25085
25097
|
|
|
25086
|
-
|
|
25098
|
+
var frame=hqChart.Frame.SubFrame[windowIndex].Frame;
|
|
25099
|
+
if (this.IsOverlayIndex) frame=this.OverlayIndex.Frame.Frame;
|
|
25100
|
+
|
|
25101
|
+
if (this.IsLocked==false) //不上锁
|
|
25087
25102
|
{
|
|
25088
|
-
|
|
25089
|
-
{
|
|
25090
|
-
hqChart.Frame.SubFrame[windowIndex].Frame.SetLock(null);
|
|
25091
|
-
}
|
|
25092
|
-
else //上锁
|
|
25093
|
-
{
|
|
25094
|
-
let lockData={ IsLocked:true,Callback:this.LockCallback,IndexName:this.Name ,ID:this.LockID,
|
|
25095
|
-
BG:this.LockBG,Text:this.LockText,TextColor:this.LockTextColor, Font:this.LockFont, Count:this.LockCount, MinWidth:this.LockMinWidth };
|
|
25096
|
-
hqChart.Frame.SubFrame[windowIndex].Frame.SetLock(lockData);
|
|
25097
|
-
}
|
|
25103
|
+
frame.SetLock(null);
|
|
25098
25104
|
}
|
|
25099
|
-
|
|
25105
|
+
else //上锁
|
|
25106
|
+
{
|
|
25107
|
+
let lockData={ IsLocked:true,Callback:this.LockCallback,IndexName:this.Name ,ID:this.LockID,IndexID:this.ID,
|
|
25108
|
+
BG:this.LockBG,Text:this.LockText,TextColor:this.LockTextColor, Font:this.LockFont, Count:this.LockCount, MinWidth:this.LockMinWidth };
|
|
25109
|
+
frame.SetLock(lockData);
|
|
25110
|
+
}
|
|
25111
|
+
|
|
25100
25112
|
hqChart.UpdataDataoffset(); //更新数据偏移
|
|
25101
25113
|
hqChart.UpdateFrameMaxMin(); //调整坐标最大 最小值
|
|
25102
25114
|
|