求助,自编指标不能通过

Discussion in 'AmiBroker' started by 捷熙1128, May 30, 2014.

  1. 我自编了一个指标,内容如下:

    Filter =Close>0.01;

    if (Close>MA(Close,26))
    CG = (Close- BBandTop( Close, 26, 2 ))/BBandTop( Close, 26, 2 )*100;
    else
    CG = (Close- BBandBot( Close, 26, 2 ))/BBandBot( Close, 26, 2 )*100;

    AddColumn(CG,"CG",1.3);


    但是我在用Explore调用时出错:Condition in IF,WHILE,FOR statements has to be Numeric or Boolean type. You can not use array here

    软件的说明书是英文的,我看了半天也看不懂,不知道怎么改,请哪位朋友帮我修改一下,万分感谢!!!
     
  2. CG = IIF(Close>MA(Close,26), (Close- BBandTop( Close, 26, 2 ))/BBandTop( Close, 26, 2 )*100, (Close- BBandBot( Close, 26, 2 ))/BBandBot( Close, 26, 2 )*100);
     
  3. 非常感谢clearpicks,非常感谢!!:)
     
  4. 再次谢谢clearpicks!!