Need help regarding pending order!

 
 

What kind of Error do you get?

 
Roger:

What kind of Error do you get?

Thanks for the reply. I really appreciate for that.

I do not get any error. What actually happened, in case of slow movement it works very well and place pending order, but in case of fast movement it does not place pending order. For example, if a current price at the moment is 1.2330, and I want to place pending order 30 pips below the current price which is 1.2300. However, in case of fast movement because of new release price changes very quickly; in fact, the price is now almost 50 pips below which is 1.2280, and pending order should have placed at 1.2300 but it did not. Now, I have to wait for when the price goes back to 1.2300, and at time when the price reverse it places pending order without any change in the code.

Here is my code.

if (NormalizeDouble (Ask,Digits) >= NormalizeDouble(OpenPriceSellLimit,Digits))
{
int TicketSellLimit = OrderSend(Symbol(),OP_SELLLIMIT,0.1,OpenPriceSellLimit,4,0,TakeProfitSellLimit,"Expert ",MAGIC,0,Green);

}

 
You can't put selllimit order with price lower then Ask, it should be sellstop.
Reason: