initial stop. need help New comment hopokuk 2008.04.05 20:06 void ModifyOrder(double buyTS, sellTS) { if (Bid - OrderOpenPrice() > buyTS * Point) if (OrderStopLoss() < Bid - buyTS * Point) OrderModify(OrderTicket(), OrderOpenPrice(), Bid - buyTS * Point, OrderTakeProfit(), 0); if (OrderOpenPrice() - Ask > sellTS * Point) if (OrderStopLoss() > Ask + sellTS * Point) OrderModify(OrderTicket(), OrderOpenPrice(), Ask + sellTS * Point, OrderTakeProfit(), 0); } This function will modifyorder with trailing stop. I would like to also include an initial stop at 10 pips, instead of at 0. With 1 pip step as it is now. How to code? unexpected token error OrderModify Error 130 New comment
void ModifyOrder(double buyTS, sellTS) {
if (Bid - OrderOpenPrice() > buyTS * Point)
if (OrderStopLoss() < Bid - buyTS * Point) OrderModify(OrderTicket(), OrderOpenPrice(), Bid - buyTS * Point, OrderTakeProfit(), 0);
if (OrderOpenPrice() - Ask > sellTS * Point)
if (OrderStopLoss() > Ask + sellTS * Point) OrderModify(OrderTicket(), OrderOpenPrice(), Ask + sellTS * Point, OrderTakeProfit(), 0);
}
This function will modifyorder with trailing stop.
I would like to also include an initial stop at 10 pips, instead of at 0. With 1 pip step as it is now.