order pending price

 

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.
 
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.
 
I did ít, thank your help.