The order of trades in history is not sorted, You must find the last one buy comparing it's timestamp. See also Could EA Really Live By Order_History Alone? (ubzen) - MQL4 forum
sorry i'm newbie in mql and programming. and i don't get the conversation out there.
what is the fastest way to get the last closed order type?
thanks
WESTSUN:
what is the fastest way to get the last closed order type?
The fastest way, is to hire someone to code it for you at the Freelance section.
The cheapest way, is to learn how to code it properly, which will obviously take time and patience and require a lot of reading and following examples:
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi guyz
This is a piece of my code
but i think its not optimized, i think its start from the 1st trade and count them one by one until get the last one and do the job.
all i need is the last order type. how i should stop it and directly select the last one in history?
thanks