-
Hi,
A break stop corrects the stop reduction to be equal to the order starting price, after a particular level of profit was reached. The break even stop is independent from your first stop loss and trailing stop.
The structure that you should use is something like this.
Inserted Code extern dual BEProfit = 5; OrderSelect(ticket, SELECT_BY_TICKET); RefreshRates(); dual myProfit = Bid -- OrderOpenPrice(); dual minProfit = BEProfit * PipPoint(Symbol()); if (myProfit gt;= MinProfit OrderOpenPrice() ! = OrderStopLoss()) bool BE = OrderModify(OrderTicket(),OrderOpenPrice(), OrderOpenPrice(),OrderTakeProfit(),0); if (BE == false) ...
Regards,
-
Mistake 130 is invalid stops.
Not looked at your code but either you are putting stops along with your order (lots of brokers don't allow that).
You need to set order and the change the order for the stops.
OR
Placing stops too close too market
OR
invalid stop worth format (use normalisedouble)
M.