分时均线怎么表示
作者:开拓者 TB 来源:cxh99.com 发布时间:2021年02月05日
-
咨询内容:
TBQUANT:分时图里的分时均线在公式里怎么表示,有函数或者计算公式吗
来源:CXH99.COM
-
TB技术人员:
在一分钟图表里可以使用如下代码 试试
- Vars
- Series<Numeric> baramount;
- Series<Numeric> barvol;
- series<numeric> dayavg;
- Events
- onBar(ArrayRef<Integer> indexs)
- {
- if(truedate(0)!=truedate(1))
- {
- baramount=close*Vol;
- barvol=vol;
- }else
- {
- baramount = baramount+close*vol;
- barvol = barvol+vol;
- }
- dayavg = baramount / barvol;
- Plotnumeric("dayavg",dayavg);
- }
复制代码