MQL4 如何检查订单是否达到止损?

MQL4 how can I check if the order hit SL?

我正在编写一个算法交易机器人,我如何检查订单是否在 MQL4 上达到止损?

最可靠的方法是使用其 OrderTicket(). Track this until the trade is closed (using OrderCloseTime() to determine when closed). You can then retrieve the OrderClosePrice() and check it against the OrderStopLoss().

记录然后跟踪交易