PositionSelectByTicket(ticket_id) fails New comment Eugen Funk 2024.07.10 14:42 Hi Everyone, I am having issues with the method PositionSelectByTicket(ticket_id); After I open a new position (ctrade.Buy) and a few lines later call bool res = PositionSelectByTicket(ticket_id); it returns a false. But the position is sitll there and it is visible in the table. Any ideas how I can work around this issue? Thank you very much MQL5 - How to check if Position/Order closed in EA anyone can help me with the logic? Close Position Eugen Funk 2024.07.16 18:55 #1 i had to add Sleep(200) between placing a new order and PositionSelectByTicket... New comment
Hi Everyone,
I am having issues with the method
After I open a new position (ctrade.Buy)
and a few lines later call
bool res = PositionSelectByTicket(ticket_id);
it returns a false. But the position is sitll there and it is visible in the table.
Any ideas how I can work around this issue?
Thank you very much