Bid+25*Point,Bid-25*Point
this is out
should be something like (for opsell) Ask+25, Bid-25
Hello,
I have a rather "funny" issue with Error 130. For the following code I receive always an Error 130. No exceptions. Broker distance is 0.
Ticket=OrderSend(Symbol(),OP_SELL,Macro_lots_to_trade_B,Bid,2,Bid+25*Point,Bid-25*Point," MM ",2, 0, Red);
Where as this code works fine:
Ticket=OrderSend(Symbol(),OP_SELL,Macro_lots_to_trade_B,Bid,2,0,0," MM ",2, 0, Red);
I have no idea why this happens. So your help and comments are apreciated.
Thanks.
ECN Broker?
You need to send Order without Stoploss and TP and modify order after to the SL and TP you need/want.
Bid+25*Point,Bid-25*Point
this is out
should be something like (for opsell) Ask+25, Bid-25
No, Should not.
Until the distance is big enough (MODE_STOPLEVEL i guess) you can set what you want.
No, Should not.
Until the distance is big enough (MODE_STOPLEVEL i guess) you can set what you want.
I was highlighting the fact that he has Bid x 2, this doesnt work for me in my code.
Bid+25*Point,Bid-25*Point, where as I pointed out;
Ask+25*point, Bid-25*point, the Tp is fine, the SL needs adjusted
and no you can not set what you want, if the stop is within the minimum value set by the broker, it wont work, this is 20 points for my broker, that code presented there would not work, assuming there was also a spread
for opsell, stoploss = bid+25, if spread is >=6 this makes SL <20 (roughly), too tight perhaps, certainly for my broker,so error 130 will be returned
I was highlighting the fact that he has Bid x 2, this doesnt work for me in my code.
Bid+25*Point,Bid-25*Point, where as I pointed out;
Ask+25*point, Bid-25*point, the Tp is fine, the SL needs adjusted
and no you can not set what you want, if the stop is within the minimum value set by the broker, it wont work, this is 20 points for my broker, that code presented there would not work, assuming there was also a spread
for opsell, stoploss = bid+25, if spread is >=6 this makes SL <20 (roughly), too tight perhaps, certainly for my broker,so error 130 will be returned
sorry, where you see bid*2?
Rest you are right, you must be at minimum far from price how big MODE_STOPLEVEL is.
You working with 5dig borker?
in fact, i have also an account with 4digit broker and there the code make sense, bid+25*point or bid-25*point .
best reagrds from austria, eadeveloper
I was highlighting the fact that he has Bid x 2, this doesnt work for me in my code.
Bid+25*Point,Bid-25*Point, where as I pointed out;
Ask+25*point, Bid-25*point, the Tp is fine, the SL needs adjusted
and no you can not set what you want, if the stop is within the minimum value set by the broker, it wont work, this is 20 points for my broker, that code presented there would not work, assuming there was also a spread
for opsell, stoploss = bid+25, if spread is >=6 this makes SL <20 (roughly), too tight perhaps, certainly for my broker,so error 130 will be returned
Gents, thanks for your comments.
I just had a quick chat with the HelpDesk of my broker. EADevelopers comment regarding ECN brokers is correct.
For Market Orders executed in a EA, NO SL + TPs are allowed (value = 0). Stop Loss and Take Profit have to be modified at a later stage.
So, thanks for the tip and have a nice day.
Hello,
I have a rather "funny" issue with Error 130. For the following code I receive always an Error 130. No exceptions. Broker distance is 0.
Ticket=OrderSend(Symbol(),OP_SELL,Macro_lots_to_trade_B,Bid,2,Bid+25*Point,Bid-25*Point," MM ",2, 0, Red);
Where as this code works fine:
Ticket=OrderSend(Symbol(),OP_SELL,Macro_lots_to_trade_B,Bid,2,0,0," MM ",2, 0, Red);
I have no idea why this happens. So your help and comments are apreciated.
Thanks.
sorry, where you see bid*2?
"I have a rather "funny" issue with Error 130. For the following code I receive always an Error 130. No exceptions. Broker distance is 0.
Ticket=OrderSend(Symbol(),OP_SELL,Macro_lots_to_trade_B,Bid,2,Bid+25*Point,Bid-25*Point," MM ",2, 0, Red);"

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
I have a rather "funny" issue with Error 130. For the following code I receive always an Error 130. No exceptions. Broker distance is 0.
Ticket=OrderSend(Symbol(),OP_SELL,Macro_lots_to_trade_B,Bid,2,Bid+25*Point,Bid-25*Point," MM ",2, 0, Red);
Where as this code works fine:
Ticket=OrderSend(Symbol(),OP_SELL,Macro_lots_to_trade_B,Bid,2,0,0," MM ",2, 0, Red);
I have no idea why this happens. So your help and comments are apreciated.
Thanks.