I know the issue already. It was just the misunderstanding of PositionGetTicket() function. When the PositionGetTicket() is execute, it
means that the position is automatically selected. There is no need to execute OrderSelect() anymore. I deleted OrderSelect(ticket) from
my code and it works. Thank you.
PositionGetDouble.
Tanitsak Jirawuttanakit #:
I know the issue already. It was just the misunderstanding of PositionGetTicket() function. When the PositionGetTicket() is execute, it means that the position is automatically selected. There is no need to execute OrderSelect() anymore. I deleted OrderSelect(ticket) from my code and it works. Thank you.
I know the issue already. It was just the misunderstanding of PositionGetTicket() function. When the PositionGetTicket() is execute, it means that the position is automatically selected. There is no need to execute OrderSelect() anymore. I deleted OrderSelect(ticket) from my code and it works. Thank you.
Hi, Jirawuttanakit!
I would like just to thank you. Your doubt, but especially your comment above, helped me a lot to understand what I was doing wrong.
Best regards.

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
I'm trying to get open price from ticket number and I'm using CTrade library to open position. I can open the position with no problem, but I think I cannot select the openned position by the ticket I have. I have tried OrderSelect() function, but it return false with error code 4754 which mean "Order not found". I don't know why.
Below is my code.
From the result, I openned 2 positions manually. You can see that it can get ticket number, but the open price are 0.
Please Help. Appreciate :)