
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
Hey I am trying to get the history of the values when my trade was closed.
I am using this to get the ticket from the history. It is sometimes correct but there are times when it gives me the wrong value.
With the below function I get this:
TradeOrder(ticket=113690916, time_setup=1616627110, time_setup_msc=1616627110606, time_done=1616627110, time_done_msc=1616627110866, time_expiration=0, type=1, type_time=0, type_filling=1, state=4, magic=0, position_id=113690828, position_by_id=0, reason=3, volume_initial=0.1, volume_current=0.0, price_open=0.0, sl=0.0, tp=0.0, price_current=1.18164, price_stoplimit=0.0, symbol='EURUSD', comment='', external_id=''))
The "price_current" on MT5 history is actually 1.18163 but the function gives me back 1.18164
position_history_orders = mt5.history_orders_get(position="113690828")
Can you explain to me what I did wrong or if there is a issue with the system?