您现在的位置:程序化交易>> 期货公式>> 金字塔等>> 其他期货软件知识>>正文内容

请教 [金字塔]

  • 咨询内容:

    请教各位老师一个问题,如何将交易开拓者里面的佳庆摆动指标转为金字塔公式,代码如下:

     If(High > Low)
      TmpValue = ((Close - Low) - ( High - Close))/(High - Low)*Vol;
     If(CurrentBar==0)
     {
     
      ADValue = TmpValue;
     }Else
     {
      ADValue = ADValue[1] + TmpValue;
     }
     COValue = XAverage(ADValue, FastCo ) - XAverage(ADValue, SlowCo); 

     

  • 金字塔客服: currentbar是啥?

     

  • 用户回复:

    if HIGH> LOW then TmpValue := ((Close - Low) - ( High - Close))/(High - Low)*Vol;
    if CurrentBar=0 then  ADValue := TmpValue;

    else ADValue := ADValue[1] + TmpValue;
     COValue := XAverage(ADValue, FastCo ) - XAverage(ADValue, SlowCo);

    主要是修改if语句。

     

     XAverage 这个函数pel中没有,如果是要去平均值的话可以使用——AVEDEV(X,N)

    你的程序中还有些不符合的地方,程序不能拷过去直接用,如果需要可以直接写出意图,让热心人士直接完成您的程序功能。

    [此贴子已经被作者于2011-9-13 13:40:13编辑过]

     

  • 网友回复:

    主要意图就是求佳庆值COVALUE,

    ADValue = ADValue[1] + TmpValue;这句代码不知道怎么转到金字塔上来

     

  • 网友回复: 求佳庆值 的方法你最好 列出来,我不太懂怎么算。

【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容