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
The MetaTrader for Python documentation shows users can only use the history_orders_get and history_deals_get functions to access historical trade data, rather than a simple history_positions_get function.
On MT5, trades are split into 5 elements;
This can be visualised better from the MT Manager View
This is fine for execution trades etc, but for users wanting to create custom account reports in python, knowing the final stop loss value when the position was closed is valuable.
On the MetaTrader for Python library, it seems we only have access to the orders and deals, and so here is all the history data I can retrieve for position 275:
MT5 Report
Technically speaking, the final stop loss SHOULD be available on the 'Out' Deal, but for some reason you cannot extract the SL or TP values from the Deals, just Orders.
I would appreciate some ideas on how to get the final stop loss price if it is possible to do this!
Thanks in advance.