While(CurrentEntries > 0 &&Close<=LastEntryPrice-ADDCT*VOLatility)
{
LastPrice = LastEntryPrice-ADDCT*VOLatility
if(Open > LastPrice) LastPrice = Open;
SellShort(1,LastPrice);//空头加仓
Commentary("空头加仓");
}
While(CurrentEntries > 0 &&Close>=LastEntryPrice+ADDCT*VOLatility)
{
LastPrice = LastEntryPrice+ADDCT*VOLatility
if(Open < LastPrice) LastPrice = Open;
BuyToCover(0,LastPrice);//空头全平
Commentary("空头平仓");
}
红框1中加仓部分本意是想最新价和上次开仓位置对比,进行盈利加仓做法,但是会出现信号闪烁,需要怎么回溯才可以避免,
if(Open < LastPrice) LastPrice = Open;
红框2是根据帮助中心的写法,但是会跳错,怎样才可以编译成功
跳错的地方找到错误原因了,麻烦老师看下信号闪烁需要怎么修改才可以