please have a look at this code, I can´t find the mistake by the sell operation for buy it works :confused: :confused: :confused:
Thanks a lot
Suffi
Code:
//////////////////////////// Modify first Order Take Profit und Stoploss //////////////////
OrderSelect(OrdersTotal()-1, SELECT_BY_POS);
if(MyRealOrdersTotal(Magic)==1)
if(OrderType()==OP_BUY)
if(Bid-OrderOpenPrice()>Point*Traling_Start)
if(OrderStopLoss()<Bid-Point*Traling_Stop)
{OrderModify(OrderTicket(),OrderOpenPrice(),Bid-(Point*Traling_Stop),Bid+(Point*TP),0,Blue);}
OrderSelect(OrdersTotal()-1, SELECT_BY_POS);
if(MyRealOrdersTotal(Magic)==1)
if(OrderType()==OP_SELL)
if(Ask+OrderOpenPrice()<Point*Traling_Start)
if(OrderStopLoss()>Ask+(Point*Traling_Stop))
{OrderModify(OrderTicket(),OrderOpenPrice(),Ask+(Point*Traling_Stop),Ask-(Point*TP),0,Blue);}
Suffi