130 error
-
Hi, can anyone help me troubleshoot this 130 error? It is occurring whenever I set s/l, t/p or trailing stop on an order or even when I add modify block after the buy block. I am a newbie and this is my first ea so any help would be much appreciated

-
http://docs.mql4.com/constants/errors
This error message means that the requested SL/TP levels are not suitable - wrong or below the broker's limits. How big are your SL and TP?
-
thanks for your quick reply - I have set them above the broker limits (>100). From what I was reading, it seems like ECN broker issue relating to setting s/l when trade first opens as you described here:
viewtopic.php?f=2&t=1922&p=2584&hilit=ecn+broker#p2584but I even put the modify block after the buy and still get same error? Would you be willing to log in to my pc and look at MT4 strategy tester output? I am happy to pay you for your time (and subscribe to full account) but I really want to see this work first and I am reaching frustration point. Thank you

-
So the SL and TP are fine, but still there is an error? There was a report like this some time ago, but I'm not sure what it can be. If you got this every time, it will be good for me to see it in action. It this is ok for you, now I'm available.
-
that would be great as I am really excited about using (and recommending) fxdreema. I will send you logmein info shortly...
-
logmein invite sent to contact@fxdreema.com
-
Hi, I'm stuck again on same ea from yesterday - trailing stops don't work. I think it has to do with how I am notating pip values. Would you be able to login to my pc again?
-
On the lower left angle of the chart there is a spread meter. There is no matter what is the Point format, what is important is to put SL/TP at normal levels. For example, if the spread is 10, then trying to put SL=11 will surely give this error.
Otherwise for the Trailing stop block is enough to be connected in such a way that it is executed on every tick (or when it's needed). What this block does is, it checks the difference between the current price and SL (for all the trades from this EA, one after another) and when this distance is big enough - it moves SL.
-
I see the spread meter in lower left of mt4 chart but I don't see how to set SL/TP levels there. Do you mean to adjust SL/TP in source code?
-
what do you mean by "normal levels"?
-
Well, try with different SL levels - far away from the open price or very close to the open price. This error 130 does not come from fxDreema, it comes from the server and it means "Invalid stops".
-
it works if I set SL to 100 but then open price is 1597.90 and SL is set to 1497.90. I want SL to be set to 1597.40 (50 pips) but if I change SL to 0.50 it gives me the 130 error.
-
For EURUSD 1 pip = 0.0001 even when the broker uses 5 digits format. Obvously 0.5 pip is too small to be placed, but I can't help for that, you can ask your broker

-
there seems to be a relationship between point format and SL/TP values but I don't understand it. For gold, the point format in mt4 is 0.01 which would equal 1 pip, correct? So if I want a stop loss of 50 pips, then SL should be set to .50, right? It doesn't work. Even if I set it to 50 or 5 it throws the 130 error. The only thing that works is setting point format to 0.001 and setting SL to 50 (actually 20 is the lowest that worked) but this creates distance of 200 pips between opening price and SL. Is it not possible to set stop loss of 50 pips or 20 pips (mt4 says 15 pips minimum)?
-
for gold 1 pip = 0.001 even though broker uses 2 digit format?
-
I'm not sure for Gold. But it does not matter, these are only numbers and at the end it's something personal. My point is that even if the broker says that there is no min limit, there is some. At least now I tried to open EURUSD with SL and TP half a pips, but it failed, even when my "Stops level" is 0 and the broker is 5-digits.
-
got it, thanks. I tested out the limits and it looks like 180 pips is miminum stop limit.