Download MetaTrader 5
To add comments, please log in or register
Publish your article. Millions of traders are looking for good ideas!
Man Man Minh
162
Man Man Minh 2015.03.30 02:18 

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
13596
whroeder1 2015.03.30 13:01  
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
162
Man Man Minh 2015.03.31 06:34  
I did ít, thank your help. 
/
To add comments, please log in or register