Build 500 № 9 2013.05.09
There is no need to open an order and then set the stops. Simplify your code - do it in one step. TP/SL on OrderSend has been fine for years.
Build 500 № 9 2013.05.09
can you tell me how should i replace this buyStop with OrderSend?
You don't need to use OrderSend directly, use CTrade as you did. But check you prices, an invalid stops error can be on the pending price and/or stoploss/takeprofit.
In general, the rules
to follow are the same as with MT4.
You don't need to use OrderSend directly, use CTrade as you did. But check you prices, an invalid stops error can be on the pending price and/or stoploss/takeprofit.
In general, the rules
to follow are the same as with MT4.
this error occurs with multiple execution pairs. I researched and saw that ECN accounts cannot set the STOP and start TakeProfit.
this error occurs with multiple execution pairs. I researched and saw that ECN accounts cannot set the STOP and start TakeProfit.
In general, the rules
to follow are the same as with MT4.
Alain already answered you about that.
I make this:
MqlTradeRequest neueOrder={0};
MqlTradeResult result={0};
//--- setting request
neueOrder.symbol = _Symbol;
neueOrder.type = ORDER_TYPE_BUY_STOP;
neueOrder.action = TRADE_ACTION_PENDING;
neueOrder.type_time = ORDER_TIME_GTC;
neueOrder.volume = lotSize;
neueOrder.price = pendingBuyPriceAsk;
neueOrder.sl = stopLoss;
neueOrder.tp = takeProfit;
neueOrder.magic = MagicNumber;
OrderSend(neueOrder,result);
but still giving invalid stops
this problem is happening after you open 1 order on an asset. And then try to open another order on another asset
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have a Robot that works perfectly with the backtest in just a active. However, when I put the EA to run in real mode in several pairs it is causing conflicts in the order openings. The error 'Invalid Stops' appears.
I am using the VALUTRADES ECN broker
I researched and saw that ECN accounts cannot be opened with SL and TP defined.
I use the following command line to open pending orders: trade.BuyStop(lotSize,pendingBuyPriceAsk,_Symbol,stopLoss,takeProfit,0);
what should i do to work properly? I use MQL5