hi petra and thanks for your time and answer
i ve tried what you suggest but i got an error of inconsistent series. i've added the new part here:
// generate equity curve including phantom trades
vars EquityCurve = series(EquityLong+EquityShort, -LookBack);
if(NumOpenLong+NumOpenShort > 0) shift(EquityCurve,EquityLong+EquityShort,LookBack);
vars EquityLP = series(LowPass(EquityCurve,200),-LookBack);
if(NumOpenLong+NumOpenShort > 0) shift(EquityLP,LowPass(EquityCurve,200),LookBack);
if(EquityCurve[0] < EquityLP[0])
setf(TradeMode,TR_PHANTOM); // drawdown -> phantom trades
else
resf(TradeMode,TR_PHANTOM); // profitable -> normal trades
seems quite hard obtain this thing
this is the error message that i get in the log. Seems that when algo opens the first trade it goes on error
[1034: Mon 17-03-06 07:00] 0000 +0.19 1/0 (1.05996)
Error 041: Inconsistent series!
Bar 1033: 6 - bar 1034: 7
thanks to all of you that want to help. Have a nice day and sorry for my english