if(((Bid - OrderOpenPrice()) > (Point*TrailingStart)) && (OrderStopLoss() < Bid - Point*TraillingStop )) { int ticket=OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(Bid-Point*TraillingStop,Digits),OrderTakeProfit(),0,Blue); if(ticket <= 0) return; }
You normalize the SL when you set it, but you don't normalize when you check it.
OrderModify returns a bool, not an int.
Topics concerning MT4 and MQL4 have their own section.
In future please post in the correct section.
I have moved your topic to the MQL4 and Metatrader 4 section.
Hi,
I have written the code below for trailing stoploss. it does work but on the other end it seems to keep spamming lots of error in the log too. which makes me confuse.