为什么总是提示错误号1002

总是提示,IF 字符串错误号  1002  . 请问是哪里出问题了 ?


Params

Numeric Length(9);

Numeric lots(1);

Vars

Series<Numeric>  Sma; //sma的参数



Events

OnBar(ArrayRef<Integer> indexs)

{

Range[0:DataSourceSize() - 1]

{

PlotNumeric(\"Sma\",Average(Close,Length));

}

}

If (MarketPosition <>1 and Close[1] > Close[2])

{

Buy (lots,Open)

}

If (MarketPosition <>-1 and Close[1] < Close[2])

{

    SellShort (lots,Open)

}

总是提示,IF 字符串错误号  1002  . 请问是哪里出问题了 ?



评论区
顶部