Solved, I should have used positions_get() to get opened positions. I'm going to leave this thread for the future maybe someone else get confused.
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, i have a problem with my code, it executes the order without any problem but when i try to use both orders_get() and orders_get(Symbol = "EURUSD") it returns an empty object.
Here is the code and the example (I can assure that there is an open position).
CODE:
OUTPUT:
OrderSendResult(retcode=10009, deal=2177241905, order=2202475454, volume=0.01, price=1.11039, bid=1.11039, ask=1.1104, comment='Request executed', request_id=4106088556, retcode_external=0, request=TradeRequest(action=1, magic=234000, order=0, symbol='EURUSD', volume=0.01, price=1.11039, stoplimit=0.0, sl=1.1113899999999999, tp=1.10939, deviation=20, type=1, type_filling=2, type_time=0, expiration=0, comment='python script open', position=0, position_by=0))