Forum on trading, automated trading systems and testing trading strategies
getting error "Invalid Price Length 13" when placing an order
Fernando Carreiro, 2023.06.17 23:15
Also pay attention to the following ... courtesy of Vladimir Karputov

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
This of course cannot be done using a market order due to spread between ask and bid.
However, as the candle closes and the next one opens, placing a limit order automatically where the last close was causes errors with my EA (pineconnector).
The market bid/ask can often be on the wrong side of the limit order.
Why doesn't the MT5 accept the limit order thats on the wrong side of the market?
For example, buy limit above market price should trigger and give me a better price. But this is not possible in mt5. Also if I use buy stop, then the problem occurs when the market price is slightly above buy stop order.
Why isnt there a simple, straightforward way to say I want to enter at this price, if bid/ask hits it, enter, if not, no trade. Is there a way to achieve this or not? Thanks!