another bugy code seems to be:
PHP Code:
if(PhoenixMode==1)//Phoenix Classic
{
CheckOpenTrade();
if(CloseAfterHours != 0) CheckCloseAfterHours();
if(!StopLoss==0) CheckTrailingStop();
if(BreakEvenAfterPips != 0) CheckBreakEven();
}
so even if TrailingStop is 0 CheckTrailingStop() will be executed
and if(OrderType() == OP_SELL) the Order can be modified without serious reason because (Point * TrailingStop) == 0.
maybe its better to change to:
PHP Code:
if(PhoenixMode==1)//Phoenix Classic
{
CheckOpenTrade();
if(CloseAfterHours != 0) CheckCloseAfterHours();
if(TrailingStop !=0) CheckTrailingStop();
if(BreakEvenAfterPips != 0) CheckBreakEven();
}
regards