Learn to search before learning to code as there's virtually nothing that hasn't already been programmed and is ready for you!
=> Search in the articles: https://www.mql5.com/en/articles
=> Search in the codebase: https://www.mql5.com/en/code
=> Search in general: https://www.mql5.com/en/search or via Google with: "site:mql5.com .." (forgives typos and variants)
E.g. here you find the code to get everything from the history: https://www.mql5.com/de/code/27635
Just copy and paste what you want from that. This way you start with a working code...

Learn to search before learning to code as there's virtually nothing that hasn't already been programmed and is ready for you!
=> Search in the articles: https://www.mql5.com/en/articles
=> Search in the codebase: https://www.mql5.com/en/code
=> Search in general: https://www.mql5.com/en/search or via Google with: "site:mql5.com .." (forgives typos and variants)
E.g. here you find the code to get everything from the history: https://www.mql5.com/de/code/27635
Just copy and paste what you want from that. This way you start with a working code...
Thanks for the help!

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello coders. I am try to get how long the last closed position took in milliseconds, from entry to exit. The code below doesn't seem to produce what I want. Please advise. I am beginner in MQL5, so bear with me.