Stop Loss in Close [1]

 
Hi.
it is possible to close an order on the basis of close [1]?

if((Close [1] < supbb) && (CurrentProfit/Point > 20))
{ ticket=OrderSend(Symbol(),OP_BUY,lotsi,Ask,Slippage,SL,TP,TradeComment,MagicNumber,White);
gle=GetLastError();}

I enter an operation calculating on the basis of bar = 0.
Particulary, close [0] > supbb (and supbb is calculating in bar 0)

Thanks.
 
To close an order use OrderClose()
 

To close an order use OrderClose()




Thanks, i pasted an Ordersend instead of OrderClose().
With an orderclose(), is possible close the order using "close[1]" or i must use close[0]?

Thanks.
 
To close an open order on the market you must use the relevant price. BUY order should be closed witn Bid and SELL order should be closed with Ask.
 
Thanks Rosh.
Reason: