Download MetaTrader 5

Invalid stops

To add comments, please log in or register
David Mkheidze
183
David Mkheidze  

Hi, Im getting error 130 for a pending order. All the numbers seem correct, I don't understand why Im getting the error.

See attachment

Red upward arrow indicates the candle whose open is the time when Im trying to place BuyStop order. Lower line is the stoploss, upper one is the take profit and the middle one is the pending price.

The numbers on the upper left corner of the screen are: Price, SL, TP, Lots

Can anyone help?

Thanks

Ian Flanagan
549
Ian Flanagan  
Check the type of pending order you are use (stop vs limit) and make sure your TP and SL are on the correct sides of the pending price, for that order
David Mkheidze
183
David Mkheidze  
Thanks for quick reply. Ive checked them already, its correct, both are on the correct sides. In the indicated example the OrderType() is 4 = BuyStop.
Carl Schreiber
7226
Carl Schreiber  
mkheidzedavid:
Thanks for quick reply. Ive checked them already, its correct, both are on the correct sides. In the indicated example the OrderType() is 4 = BuyStop.

Could it be that accidental the new EntryPrice == OrderOpenPrice() of the PendingOrder and therefore StopLoss and ProfitTarget wouldn't change?

gooly

David Mkheidze
183
David Mkheidze  
gooly:

Could it be that accidental the new EntryPrice == OrderOpenPrice() of the PendingOrder and therefore StopLoss and ProfitTarget wouldn't change?

gooly



In the code I have that comparison, so that case is excluded. Weird...
Ian Flanagan
549
Ian Flanagan  
Is the broker ECN? If not, did you check the stoplevel?
David Mkheidze
183
David Mkheidze  
Russian broker - InstaForex. StopLevel is written on the screen: the second number - 1.3241
Tjipke de Vries
6373
Tjipke de Vries  
mkheidzedavid:
Russian broker - InstaForex. StopLevel is written on the screen: the second number - 1.3241


that is not Stoplevel that is your StopLoss setting

looks like you try to open a pendingtrade to tight at level Bid or Ask

check the distance between orderopenprice with bid or ask also

David Mkheidze
183
David Mkheidze  
deVries:


that is not Stoplevel that is your StopLoss setting

looks like you try to open a pendingtrade to tight at level Bid or Ask

check the distance between orderopenprice with bid or ask also



And what should be the distance with the current bid/ask and the pending price? Spread?
Tjipke de Vries
6373
Tjipke de Vries  
mkheidzedavid:


And what should be the distance with the current bid/ask and the pending price? Spread?

(see Requirements and Limitations in Making Trades).
Ian Flanagan
549
Ian Flanagan  

Also you can't discuss brokers on this forum.. but after you mention that name, I'd say check ForexPeaceArmy before you open a live account :|

In fact, just don't open a live account.

12
To add comments, please log in or register