How can i get/select the last placed order either pending or market of a specific currency pair in MQL4
Topics concerning MT4 and MQL4 have their own section.
In future please post in the correct section.
I will move your topic to the MQL4 and Metatrader 4 section.
Bill Mayheptad: Here is my initial code ??
Only you know whether that is your “initial code.”
Bill Mayheptad: Am sure OrdersTotal -1 will return the last placed other on the account
Only if you are running on one symbol.
William Roeder:
Only you know whether that is your “initial code.”
Only if you are running on one symbol.
so how do i get the last placed order of a particular symbol ??
Bill Mayheptad: so how do i get the last placed order of a particular symbol ??
Go through the list and find the highest ticket number for the symbol.
Hello traders, am building an EA that place a market order and also a pending order at the same time, once the pending order got activated and become a market order, The ea will place an opposite pending order.
But Now i want to Attach the Ea to more than one currency pair, How do i know when the last placed order on that currency pair has become a market order, so that i can placed opposite side pending order.
Here is my initial code ??
Am sure OrdersTotal -1 will return the last placed other on the account not with a specific currency pair