MrChuckW:
https://www.mql5.com/en/forum/218962#comment_6019043How do I code my EA to collect the last closed order's profit/loss?
I can track the p/l for live orders, and if I close the order, I can collect the data... but if the system closes the order... for whatever reason... I don't know how to collect the data.
Chuck

MT5 back tester -- how to capture final trade when "position closed due end of test"
- 2017.11.06
- www.mql5.com
When backtesting, I often have an ongoing trade when the tester ends. It shows up with the message "end of test." So far so good...
How do I code my EA to collect the last closed order's profit/loss?
I can track the p/l for live orders, and if I close the order, I can collect the data... but if the system closes the order... for whatever reason... I don't know how to collect the data.
Chuck