开拓者期货期权程序化系统交易论坛

标题: 公式编写 [打印本页]

作者: swufewxr    时间: 2011-2-23 10:51:30     标题: 公式编写

分时图中的那根黄色均线 怎么用公式表示呢?谢谢。
作者: lh948    时间: 2011-2-23 14:51:43

技术指标代码如下
  1. Vars
  2.         NumericSeries baramount;
  3.         NumericSeries barvol;
  4.         numericseries dayavg;
  5. Begin
  6.         if(date!=Date[1])
  7.         {
  8.                 baramount=close*Vol;
  9.                 barvol=vol;
  10.         }else
  11.         {
  12.                 baramount = baramount[1]+close*vol;
  13.                 barvol = barvol[1]+vol;
  14.         }
  15.     dayavg = baramount / barvol;
  16.     Plotnumeric("dayavg",dayavg);
  17. End
复制代码





欢迎光临 开拓者期货期权程序化系统交易论坛 (http://bbs.tb18.net/) Powered by Discuz! X2