mansour afshar:
Hello dear community members,
I'm facing an issue while writing an MQL5 script to access the profit and loss values of closed trades. In short, I've been trying to use the relevant functions to retrieve the profit and loss values, but I always end up getting 0.0 as the profit or loss value.
I've tested this code so far:
If anyone has experience in this area and can offer assistance, please guide me. I would appreciate any insights or solutions you can provide.
Thank you all in advance for your help and support.
Best regards.
use "HistorySelect(0,TimeCurrent())" before you start calling the history.

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
Hello dear community members,
I'm facing an issue while writing an MQL5 script to access the profit and loss values of closed trades. In short, I've been trying to use the relevant functions to retrieve the profit and loss values, but I always end up getting 0.0 as the profit or loss value.
I've tested this code so far:
If anyone has experience in this area and can offer assistance, please guide me. I would appreciate any insights or solutions you can provide.
Thank you all in advance for your help and support.
Best regards.