https://docs.mql4.com/trading/errors
ERR_INVALID_STOPS 130 Stops are too close, or prices are ill-calculated...
Are you making sure stops are not too close to current bid/ask?
Are you adjusting for 4/5 digit brokers?
Tips: For current price try using OrderClosePrice().
Tips: Distance must be greater than MarketInfo ... StopLevel.
double stopLoss = NormalizeDouble(Ask + DistanceTS * Point, 4);
- Moving SL 2 pips above market (5 digit broker)
- StopLevel
- Did you OrderSelect first
- It is never necessary to normalizeDouble, ever. It's a cludge, don't use it. https://www.mql5.com/en/forum/137301
Wow!
Thank you a lot! The problem was that the minimum (SL) was bigger that I had imagined!
I solve the problem. Thank you!! :)
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
Hello!
I have a strange problem with Trailing stop. I did my own but I always get 130 error. I saw the page: https://book.mql4.com/appendix/limits and after that, I can't understand the error...
The code is:
Could ou help me?
Thank you in advance!