- Viktor Iassinskii: Is it because the same call can handle both Market and Limit order Close?
You close opened orders. Limit and stops are pending orders, you don't close them, you delete them.
- Viktor Iassinskii: In my case the call failed because the price was 0.0. Was some reason Bid returned 0.
No idea how that could be possible. In any case, you could have just used OrderClosePrice() and be direction and symbol independent.
-
Why did you post your MT4 question in the MT5 EA section instead of the MQL4 section, (bottom of the Root page)?
General rules and best pratices of the Forum. - General - MQL5 programming forum?
Next time, post in the correct place. The moderators will likely move this thread there soon.
-
No idea how that could be possible. In any case, you could have just used OrderClosePrice() and be direction and symbol
Hello,
I have had an interesting failure in my EA recently when closing the order that I have never seen before. The function as everyone knows is this
Close price must be the current Bid price for closing a BUY order or the current Ask price for closing a SELL order.
In my case the call failed because the price was 0.0. Was some reason Bid returned 0.
This leads me to the question - Why the call has price parameter at all? If I want to close at the market price I should not supply the price. Is it because the same call can handle both Market and Limit order Close?
Thank you
Show your actual code if you want an answer about why "the price was 0.0".
There is a close price because it can be used to control slippage, in some circumstances (market maker brokers and symbol allowing it).
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
I have had an interesting failure in my EA recently when closing the order that I have never seen before. The function as everyone knows is this
Close price must be the current Bid price for closing a BUY order or the current Ask price for closing a SELL order.
In my case the call failed because the price was 0.0. Was some reason Bid returned 0.
This leads me to the question - Why the call has price parameter at all? If I want to close at the market price I should not supply the price. Is it because the same call can handle both Market and Limit order Close?
Thank you