You cannot (usually) place a buy limit at ask.
In future please post in the correct section
I will move this topic to the MQL4 and Metatrader 4 section.
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 Tutorial
On some ECN type brokers the value might be zero (broker doesn't know.) Use a minimum of two (2) PIPs.

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
Hi. So I just started learning MQL4 and was testing if I could send order at Ask price on USDJPY.
However, whenever I try to run the program on MT4, I keep on getting "Error 130", although I set SL/TP far apart from Ask price.
Why is this happening??