-
They can't have been the same (no spread?); possible problem with that code.
-
You can't move stops (or pending prices) closer to the market than the minimum: MODE_STOPLEVEL * _Point or SymbolInfoInteger(SYMBOL_TRADE_STOPS_LEVEL).
Requirements and Limitations in Making Trades - Appendixes - MQL4 TutorialOn some ECN type brokers the value might be zero (broker doesn't know.) Use a minimum of two (2) PIPs. You were tying to place it 0.4 PIPs.
- There is no need to create pending orders in code.
- The pending has the slight advantage, A) you are closer to the top of the queue (filled quicker,) B) there's no round trip network delay (filled quicker.)
- Don't worry about it unless you're scalping M1 or trading news.
- Humans can't watch the screen 24/7, so they use pending orders; EAs can, so no need for pending orders, have it wait until the market reaches the trigger price and just open an order.
- They can't have been the same.
-
You can't move stops (or pending prices) closer to the market than the minimum: MODE_STOPLEVEL * _Point or SymbolInfoInteger(SYMBOL_TRADE_STOPS_LEVEL).
Requirements and Limitations in Making Trades - Appendixes - MQL4 TutorialOn some ECN type brokers the value might be zero (broker doesn't know.) Use a minimum of two (2) PIPs. You were tying to place it 0.4 PIPs.
1. its a commission only broker account so they are always the same.
2. Thank you very much for the info I will review it and check whether its the cause of my problem.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
My EA tried to place a pending sell order, but it failed with the error "invalid price". Everything looks correct to me, normalised and entry price below the current price. The order values are below, as well as a screenshot showing the messages.
Order type: pending sell
Entry price: 1.19100
Stop loss: 1.19155
Take profit: 1.19040
The bid and ask price at the time were 1.19104, so was above the entry price.
Can anyone see why it would have failed with this message because I can't see anything wrong?