Download MetaTrader 5

order pending price

To add comments, please log in or register
Man Man Minh
174
Man Man Minh  

Hi, traders 

 

I build EA with OrderSend like this

My condition, when complete current bar : If close() > MA(11) then
 Ticket = OrderSend(Symbol(), OP_BUY, Lots, Ask, Slippage, StopLossLevel, TakeProfitLevel,.... 
 Ticket = OrderSend(Symbol(), OP_Sell, Lots, Bid, Slippage, StopLossLevel, TakeProfitLevel,.... 
And it works,
Now I want Ask = open() + 2 pips
            Bid = open() - 2 pips
I don't know how to do that? Use open() or open(-1) or open(1)?
Please help me.
thanks.
whroeder1
14785
whroeder1  
You need to read the documentation.
  1. Select the order, get the open price
  2. If you mean to open at different price, you have to use stops or limits or simply wait for price to reach what you want and then open.
Man Man Minh
174
Man Man Minh  
I did ít, thank your help. 
To add comments, please log in or register