I am back testing utilizing MB trading demo. Th standard will not take into account of the commission and order swap.
Anyone had tried successful to have the trailing cease not take reductions with adverse profit?
Typical trailing stop code:
void ShortTrailingStop()
int scnt;
int stotal = OrdersTotal();
for(scnt=stotal-1; scnt gt;= 0; scnt--)
OrderSelect(scnt, SELECT_BY_POS, MODE_TRADES);
if(OrderType()lt;=OP_SELL OrderSymbol()==Symbol())
if(OrderType()==OP_SELL) // short position is started
if(TrailingStopgt;0)
if((OrderOpenPrice()-Ask)gt;(Point*TrailingStop))
if((OrderStopLoss()gt;(Ask (Point*TrailingStop)))