请问老师一个问题 (文华财经wh9)

投资者咨询:请问老师一个问题 (文华财经wh9)
来源:文华财经  日期:2018-8-6 21:58
公式怎么弄一下,会编译通过


 Params
Numeric Length(20);
Numeric Offset(2);
Numeric fd(5);
Vars
      NumericSeries UpLine;      //上轨
      NumericSeries DownLine;   //下轨
      NumericSeries MidLine;      //中间线
      Numeric Band;
Begin
      MidLine = AverageFC(Close,Length);
      Band = StandardDev(Close,Length,2);
      UpLine = MidLine + Offset * Band;
      DownLine = MidLine - Offset * Band;
      
If((fd<(Highest(MidLine, 12)-MidLine[1]))&&V[1]<AverageFC(V,Length))
{
buy(1,0);
}
If(fd<(MidLine[1]-1(MidLine, 12))&&V[1]<AverageFC(v,Length)) 
{
Sell(1,0);    

End
      
技术人员回复
日期:2018-8-6 22:07

参考

 

Params
   Numeric Length(20);
   Numeric Offset(2);
   Numeric fd(5);
Vars
      NumericSeries UpLine;      //上轨
      NumericSeries DownLine;   //下轨
      NumericSeries MidLine;      //中间线
      Numeric Band;
Begin
      MidLine = AverageFC(Close,Length);
      Band = StandardDev(Close,Length,2);
      UpLine = MidLine + Offset * Band;
      DownLine = MidLine - Offset * Band;
     
If((fd<(Highest(MidLine, 12)-MidLine[1]))&&ref(vol,1)<AverageFC(vol,Length))
{
buy(1,0);
}
If(fd<(MidLine[1]-Lowest(MidLine, 12))&&ref(vol,1)<AverageFC(vol,Length))
{
Sell(1,0);   
}

End