How to get the stoploss of the previous order?
- Need help with Order History to get the last order?
- Trailing Stop and reversing
- How select last order for one symbol in the history and get value of lots and profit?
Some parts of my EA require validation of a previous price level. The best way I can think of is getting the last order in history and check the stop loss but there is no option for getting the stop loss of the last order in history.
Hello wehsnim,
You have to use the HistorySelect function, together with other functions related to history orders, like HistoryOrderGetDouble, HistoryOrderGetInteger, etc.
In your specific question, you can get the SL price of the last order by using HistoryOrderGetDouble(ticket,ORDER_SL), through a for-loop.
Regards,
Malacarne
Hello wehsnim,
You have to use the HistorySelect function, together with other functions related to history orders, like HistoryOrderGetDouble, HistoryOrderGetInteger, etc.
In your specific question, you can get the SL price of the last order by using HistoryOrderGetDouble(ticket,ORDER_SL), through a for-loop.
Regards,
Malacarne