Metatrader 5 Python API Connector does not give profit

 

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.

 
You should share all relevant code.