Error 130 is "ERR_INVALID_STOPS 130 Invalid stops."
You are using a wrong stop loss value or your entry stop orders are wrong or the values are too close... usually have to be "MarketInfo(Symbol(),MODE_STOPLEVEL)" pips away.
Hope this helps.
The pair I'm using right now is "usd/jpy" 30 min chart. Would It be helpful If I sent the EA along? It's just a simple EMA Cross by codersguru, It was in his lession plan as "My_First_EA".
I tryed to add a StopLoss to it. The buy works but the sell doesn't.
Told ya... check your stops...
The sell routine in your EA looks like this
ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,Ask-StopLoss*Point,
Bid-TakeProfit*Point,"My EA",12345,0,Red);
The stop loss is being deducted from ask!!! with a value of 75 pips, and assuming the spread is 3 pips, the stop will be below the entry price, and that is what MT4 is complaining about.
The correct code will be
ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,Ask+StopLoss*Point,
Bid-TakeProfit*Point,"My EA",12345,0,Red);
Well, I thank you very much. That was it. I guess You can tell I don't know that much about programing.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
in terminal, under the expert window, this message:
"Error opening SELL order: 130" what does this mean?
The worthless interbankfx will not answer my question, Don't use this broker if you don't have too. The bigger they get the worst they get.
Thanks in advance
MKH