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,
When I make a get_position I have the list of my positions opened, and I have a colum with the "type".
Type 0 is a Buy position and Type 1 is a sell position.
The result looks like this:
TradePosition(ticket=542919563, time=1653651234, time_msc=1653651234856, time_update=1653651234, time_update_msc=1653651234856, type=0, magic=234000, identifier=542919563, reason=3,
volume=0.1, price_open=1859.44, sl=0.0, tp=1862.44, price_current=1859.35, swap=0.0, profit=-0.01, symbol='GOLDmicro', comment='TP0', external_id='')
How can I retrieve the type=0 to use it after?
I want after that something like this but I want to add the "type of position".
Someone got an idea?