打印本文打印本文 关闭窗口关闭窗口

分时均线怎么表示

作者:开拓者 TB 来源:cxh99.com 发布时间:2021年02月05日
  • 咨询内容: TBQUANT:分时图里的分时均线在公式里怎么表示,有函数或者计算公式吗

     

     来源:CXH99.COM

  • TB技术人员: 在一分钟图表里可以使用如下代码 试试
    1. Vars
    2.         Series<Numeric> baramount;
    3.         Series<Numeric> barvol;
    4.         series<numeric> dayavg;
    5. Events
    6.     onBar(ArrayRef<Integer> indexs)
    7.     {   
    8.             if(truedate(0)!=truedate(1))
    9.             {
    10.                     baramount=close*Vol;
    11.                     barvol=vol;
    12.             }else
    13.             {
    14.                     baramount = baramount+close*vol;
    15.                     barvol = barvol+vol;
    16.             }
    17.         dayavg = baramount / barvol;
    18.         Plotnumeric("dayavg",dayavg);
    19.     }
    复制代码
打印本文打印本文 关闭窗口关闭窗口