You should share all relevant code.

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 all,
When i try to get profit from my closed deals, i get 0.0 as profit even though it showes the correct profit in the Metatrader 5 application.
Here is a sample code i am using :
to_date = datetime.now()+timedelta(days=2)
yesterday = to_date - timedelta(days=2)
deals = mt5.history_deals_get(yesterday, to_date)
i tried everything but cant seem to get the profits. I am using MetaTrader5 5.0.4288 which is the latest API version.