This workaround seems to solve this:
CTrade td; if(td.Buy(vol,symbol,price,0.0,0.0,"") == true) { ulong ticket =td.ResultOrder(); if(ticket > 0) { int count=0; while(PositionSelectByTicket(ticket) == false && count < 100) { Sleep(1); ++count; } } }

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,
i have the problem, that a just opened position by
is not selectable
PositionSelectByTicket(ticket)
The position is opened, ret result is 10009.
The ticket is valid but
PositionSelectByTicket
fails.
Why ?
Thank you