if((ticket=HistoryDealsTotal())>0)
- HistoryDealsTotal does not return a ticket.
- That is potentially confusing. Is that an assignment or a comparison, or a typo? Prefer clear code.
ticket=HistoryDealsTotal(); if(ticket>0)
As a side note that may help you, read the following thread as well ... Retrieve profit by position, best practice?
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 friends.
I have this code I wrote. I tried getting all the closed profits by magic number over a period of time. But it's not getting the right value.
It works perfectly for mt4, but mt5 is not so clear, because if the concept of IN and OUT. The IN part has the magic number but the OUT part doesn't, so its a problem when getting information about the closed trades.
Please help.
Below are my lines of code.
Thanks