hi ,
am trying to send an order from my EA using this statment
but most of the times i am getting an error of "invalid stops" . can anyone help me ?
tazz90: but most of the times i am getting an error of "invalid stops" .
can anyone help me?
- Not adjusting 4/5 digit brokers TP, SL, AND slippage nor ECN
- Next time use this
Hi WHRoeder,
Concerning this issue sometimes I receive [invalid S/L or T/P] messages.
But I use your routine to adjust for 4/5 digit brokers. Why is that keeping happen some times ?
Other issue is what should I use in the code that is follow. pips2point or pips2dbl ?
In extern I want to say what is the distance to open an order. Should this be an int or a double ?
extern double OpenDistance = 0;
In code that's follow something could be incorrect as I'm dealing with the best way to get the order to open at the distance declared in extern as OppositeDistance.
if(Op == OP_BUY && MathAbs ((Bid + Spread) < OrderOpenPrice() - (OppositeDistance*pips2dbl)) && SellAllowed) {// while(IsTradeContextBusy()) Sleep(10); RefreshRates(); SellTicket = OrderSend(Symbol(), OP_SELL, MLots, Bid, Slippage*pips2points, 0, 0, "Open Opposite Sell Order", MagicNumber, 0, Red);
Thank you in advance for any clarification provided.
Luis
I do not know the reason, why the question was not clearly answered.
Invalid stops error you would probably receive:
if your broker does not accept anything but zero for the SL and TP arguments (this is why Raptor asks about ECN, but it is not mentioned in any guide)
or the SL or TP is too close to the order price (this is why Raptor asks about STOPLEVEL)
or the SL or TP price is not strictly rounded to fit the price grid (use NormalizeDouble() )
Nevertheless I have no idea how it is related to the digits of a broker.
I do not know the reason, why the question was not clearly answered.
Invalid stops error you would probably receive:
if your broker does not accept anything but zero for the SL and TP arguments (this is why Raptor asks about ECN, but it is not mentioned in any guide)
or the SL or TP is too close to the order price (this is why Raptor asks about STOPLEVEL)
or the SL or TP price is not strictly rounded to fit the price grid (use NormalizeDouble() )
I do not know the reason, why the question was not clearly answered.
Invalid stops error you would probably receive:
if your broker does not accept anything but zero for the SL and TP arguments (this is why Raptor asks about ECN, but it is not mentioned in any guide)
or the SL or TP is too close to the order price (this is why Raptor asks about STOPLEVEL)
or the SL or TP price is not strictly rounded to fit the price grid (use NormalizeDouble() )
Nevertheless I have no idea how it is related to the digits of a broker.
thank you so much :)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
hi ,
am trying to send an order from my EA using this statment
but most of the times i am getting an error of "invalid stops" . can anyone help me ?
thanks