Error 130 or 136 happen sometime but not other times

Been using this for a week on a demo account and noticed error 130 or 136 from time to time.
It seems that these error happens sometime but not other time.
Pairs, alert setting is the same.
How can I make sure that these don’t happen?
Tradingview alert to MT4

SELL EURUSD Q=0.4% P=Market TT=200 TD=200 TS=20 MN=83311
130 Invalid stops - Check your stop loss and take profit
then later on I have
SELL EURUSD Q=0.4% P=Market TT=200 TD=200 TS=20 MN=83311

It happens on GBPUSD, EURJPY, AUDNZD, USDCAD, GBPJPY, XAUUSD, USDJPY, NZDUSD, BTCUSD, XAGUSD etc… and really happens on any of the pairs.
Same for the error 136.

Anyone has this problem?

Hello @sannexus

This error is a response from your broker telling you something is wrong.

Error 130 means Invalid stops. This implies a value in your TP, SL, or P is incorrect while error 136 means Off quotes. This means that the price you requested to be filled at has already changed.

When I check the sample commands you have shared, you have the wrong parameter P. If you decide to use the P parameter for limit orders, then it must be the price value you want to enter and not the type of trade.

If you want to execute market orders, then, SELL EURUSD Q=0.4% TT=200 TD=200 TS=20 is the correct command.

Off quotes error may be solved by migrating to a broker with a better server or hosting your MT4 in a better VPS.


Thank you this is very helpful.
Will re-set the command and see how it goes!

1 Like

You are welcome.

Keep us updated.