Is it necessary to use OrderSelect before using OrderClose? My orders are not closing. Are there other prerequisite conditions I should check for before closing an order?
- Stop Loss in Close [1]
- Close at a given time
- ea runs on my broker but not on another
Look at the function OrderClose
bool OrderClose( | int ticket, double lots, double price, int slippage, color Color=CLR_NONE) |
If you know ticket number, lot and price you don't need to use OrderSelect.
Roger wrote >>
Look at the function OrderClose
bool OrderClose( | int ticket, double lots, double price, int slippage, color Color=CLR_NONE) |
If you know ticket number, lot and price you don't need to use OrderSelect.
Thanks. Sometimes the OrderClose doesn't work in my program, but OrderSend always works. However, I think I found the solution. Its the slippage. When I put in 3 points it never closes the order, but if I put in 5 points, so far it works.

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