Hello everyone,
I am trying to solve the issue with setorder in my code and I don't know whre can be the error!
The code:
The output:
Can you help me please? The same code for OP_SELL and OP_BUY works me fine!
Thank you in advance!
Where is the code line that output this :
2015.01.08 08:33:28.102 #FDXH5,M1: err=130, col=3145645, type=4, price=9668.8, lot=0.01, invalid stops
Please post a complete sequence of code.
Yes, sorry.
I don't know where can be the error. The code is:
int ticket = OrderSend(Symbol(), type, lot, price, 0, 0, 0, CustomComment, Magic, 0, col); Print("PUT ORDER: " + IntegerToString(type), ", price=", DoubleToStr(price, _Digits), ", lot=", DoubleToStr(lot, DecimalPoints)); int err = GetLastError(); if (ticket == -1 && err > 0) Print("err=", IntegerToString(err), ", col=" + IntegerToString(col), ", type=" + IntegerToString(type), ", price=", DoubleToStr(price, _Digits), ", lot=", DoubleToStr(lot, DecimalPoints), ", ", ErrorDescription(err)); return (ticket);
Yes, sorry.
I don't know where can be the error. The code is:
Type=4 is a BUYSTOP. You are trying to place a buystop at 9668.8, what is the current price (Bid/Ask) ?
Yes, I put it here:
Ask: 9739.0 Bid: 9737.0
The logger:
The problem is that the error occurs, but inmediatly, when I tried to do it manually, the order works perfectly. I've tried with SELLSTOP/BUYSTOP and SELLLIMIT/BUYLIMIT and the result was the same: error 130.
Please, I need help to solve it.
Thank you in advance
Yes, I put it here:
The logger:
The problem is that the error occurs, but inmediatly, when I tried to do it manually, the order works perfectly. I've tried with SELLSTOP/BUYSTOP and SELLLIMIT/BUYLIMIT and the result was the same: error 130.
Please, I need help to solve it.
Thank you in advance
A BUY_STOP needs to be place at a higher price than market price, not lower.
Is your price calculated ? You have to normalize your price in this case.
A BUY_STOP needs to be place at a higher price than market price, not lower.
Is your price calculated ? You have to normalize your price in this case.
Hello,
I've detected the same problem.
Broker: GKFX (DE)
Symbol AALUK_
SYMBOL_TRADE_CALC_MODE = 2
MODE_MARGINCALCMODE = 1
MODE_PROFITCALCMODE = 1
Tooltip on Symbol says : Calculation: Futures.
Manual opening of any order-type is no problem. Opening with OrderSend() fails.
(Invalid S/L or T/P). Tested with and without S/L and T/P parameters.
Please let me know, if you have a solution for it of if we made a mistake with OrderSend() on this symbol-type.
Thank you!
Hello,
I've detected the same problem.
Broker: GKFX (DE)
Symbol AALUK_
SYMBOL_TRADE_CALC_MODE = 2
MODE_MARGINCALCMODE = 1
MODE_PROFITCALCMODE = 1
Tooltip on Symbol says : Calculation: Futures.
Manual opening of any order-type is no problem. Opening with OrderSend() fails.
(Invalid S/L or T/P). Tested with and without S/L and T/P parameters.
Please let me know, if you have a solution for it of if we made a mistake with OrderSend() on this symbol-type.
Thank you!
- 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 everyone,
I am trying to solve the issue with setorder in my code and I don't know whre can be the error!
The code:
The output:
Can you help me please? The same code for OP_SELL and OP_BUY works me fine!
Thank you in advance!