hqchart 1.1.14731 → 1.1.14742

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.
@@ -55762,7 +55762,6 @@ HQData.Minute_RequestMinuteData=function(data, callback)
55762
55762
 
55763
55763
  var lastPrice=stockItem.minute[stockItem.minute.length-1].price;
55764
55764
 
55765
-
55766
55765
  if (bBuySellBar) //盘口分析
55767
55766
  {
55768
55767
  var aryBuy=[];
@@ -55803,6 +55802,95 @@ HQData.Minute_RequestMinuteData=function(data, callback)
55803
55802
  }, 50);
55804
55803
  }
55805
55804
 
55805
+ HQData.Minute_RequestMinuteDataV2=function(data, callback)
55806
+ {
55807
+ data.PreventDefault=true;
55808
+ var symbol=data.Request.Data.symbol[0]; //请求的股票代码
55809
+ var callcation=data.Request.Data.callcation; //集合竞价
55810
+ console.log(`[HQData::Minute_RequestMinuteDataV2] Symbol=${symbol}`);
55811
+
55812
+ setTimeout(()=>
55813
+ {
55814
+ var fullData=HQData.GetDayMinuteDataBySymbol(symbol);
55815
+ var srcStock=fullData[0];
55816
+ var stockItem={ date:srcStock.date, minute:srcStock.minute, yclose:srcStock.yclose, symbol:symbol, name:symbol };
55817
+
55818
+ if (callcation.Before)
55819
+ {
55820
+ var TEST_BEFORE_DATA=
55821
+ [
55822
+ [8.52, 50000, 30000, 1, 200000],
55823
+ [8.53, 55000, 40000, 0, 80000],
55824
+ [8.52, 40000, 60000, 1, 80000],
55825
+ [8.55, 30000, 21000, 2, 44000],
55826
+ [8.51, 21000, 25000, 2, 40000],
55827
+ [8.50, 36000, 55000, 2, 60000],
55828
+ [8.49, 10000, 20000, 2, 33000],
55829
+ ];
55830
+
55831
+ var date=new Date(parseInt(stockItem.date/10000),(stockItem.date/100%100-1),stockItem.date%100, 9, 15, 0);
55832
+ var count=10*60; //9:15-9:25
55833
+ var before=[];
55834
+ for(var i=0;i<count;++i)
55835
+ {
55836
+ var time=date.getHours()*10000+date.getMinutes()*100+date.getSeconds();
55837
+ var testIndex=Math.floor(Math.random()*10)%TEST_BEFORE_DATA.length;
55838
+ var testData=TEST_BEFORE_DATA[testIndex];
55839
+ var item=[ time, null, null, null, null, null ];
55840
+ if (i%20==0 || i==count-1)
55841
+ {
55842
+ item=[ time, testData[0], testData[1], testData[2], testData[3], (testData[1]+testData[2])*1.5 ];
55843
+ }
55844
+ before.push(item);
55845
+ date.setSeconds(date.getSeconds()+1);
55846
+ }
55847
+
55848
+ //before.length=200;
55849
+ var beforeinfo={ totalcount:count, ver:2.0 };
55850
+
55851
+ stockItem.before=before;
55852
+ stockItem.beforeinfo=beforeinfo;
55853
+
55854
+ var TEST_AFTER_DATA=
55855
+ [
55856
+ [8.51, 40000, 30000, 1, 80000],
55857
+ [8.51, 55000, 60000, 0, 150000],
55858
+ [8.51, 30000, 60000, 1, 160000],
55859
+ [8.51, 35000, 21000, 2, 50000],
55860
+ [8.51, 21000, 35000, 2, 70000],
55861
+ [8.51, 26000, 55000, 2, 100000],
55862
+ [8.51, 30000, 10000, 2, 50000],
55863
+ ];
55864
+
55865
+ var date=new Date(parseInt(stockItem.date/10000),(stockItem.date/100%100-1),stockItem.date%100, 14, 57, 0);
55866
+ var count=3*60; //14:57-15:00
55867
+ var after=[];
55868
+ for(var i=0;i<count;++i)
55869
+ {
55870
+ var time=date.getHours()*10000+date.getMinutes()*100+date.getSeconds();
55871
+ var testIndex=Math.floor(Math.random()*10)%TEST_AFTER_DATA.length;
55872
+ var testData=TEST_AFTER_DATA[testIndex];
55873
+ var item=[ time, null, null, null, null, null ];
55874
+ if (i%10==0 || i==count-1)
55875
+ {
55876
+ item=[ time, testData[0], testData[1], testData[2], testData[3], (testData[1]+testData[2])*1.5 ];
55877
+ }
55878
+ after.push(item);
55879
+ date.setSeconds(date.getSeconds()+1);
55880
+ }
55881
+
55882
+ var afterinfo={ totalcount:count, ver:2.0 };
55883
+ stockItem.after=after;
55884
+ stockItem.afterinfo=afterinfo;
55885
+ }
55886
+
55887
+ //stockItem.minute.length=0;
55888
+
55889
+ var hqchartData={code:0, stock:[stockItem] };
55890
+ callback(hqchartData);
55891
+ }, 50);
55892
+ }
55893
+
55806
55894
  HQData.Minute_RequestPopMinuteData=function(data, callback)
55807
55895
  {
55808
55896
  data.PreventDefault=true;