//Selecting Buy Orders if(OrderSelect(gBuyTicket, SELECT_BY_TICKET,MODE_TRADES)) //Checking if the order belongs to the current Chart if(OrderSymbol() == Symbol()) //If its a Buy Order if(OrderType() == OP_BUY) { //IF the Bid is above 200 points the OpenPrice int TP1 = 200; if(Bid > OrderOpenPrice() + Point*TP1) //Modify the Stoploss OrderModify(OrderTicket(), OrderOpenPrice(), NormalizeDouble((OrderOpenPrice() + Point*TP1),Digits), OrderTakeProfit(), 0, CLR_NONE); } //Selecting Sell Orders if(OrderSelect(gSellTicket, SELECT_BY_TICKET,MODE_TRADES)) //Checking if the order belongs to the current Chart if(OrderSymbol() == Symbol()) //If its a Sell Order if(OrderType() == OP_SELL) { int TP1 = 200; //IF the Ask is below 200 points the OpenPrice if(Ask > OrderOpenPrice() - Point*TP1) //Modify the Stoploss OrderModify(OrderTicket(), OrderOpenPrice(),NormalizeDouble((OrderOpenPrice() - Point*TP1),Digits), OrderTakeProfit(), 0, CLR_NONE); }