Determining when Stop Loss is hit
SR
You would need to look at your Order History, something like this as a starting point
int cnt; // cnt=OrdersHistoryTotal()-1; // // while (cnt>=0) { if (OrderSelect(cnt,SELECT_BY_POS,MODE_HISTORY()) { if (OrderStopLoss() == OrderClosePrice()) Print("This Order closed by StopLoss: ", OrderTicket()); cnt--; } }
but this doesnt account for Slippage...
Good Luck
-BB-
How can an EA know when a position was closed by the stop loss?
I need some sample code or location where to find it.