Counting the number of candles that have passed since order was opened

 

I'm trying to keep track of the number of candles that passed since a trade opened.  ie. - a trade opens at 12:05.  it is now 15:10, the lmit has not been reached yet, so the trade is still open.  This is a thirty minute chart, so 6 candles has passed since the trade was opened.

Can someone point me in the right direction?  Thanks!!

 
mpr:

I'm trying to keep track of the number of candles that passed since a trade opened.  ie. - a trade opens at 12:05.  it is now 15:10, the lmit has not been reached yet, so the trade is still open.  This is a thirty minute chart, so 6 candles has passed since the trade was opened.

Can someone point me in the right direction?  Thanks!!

iBarShift()  with the time that the trade was opened, OrderOpenTime(), will give you the bar number of the candle when the trade was opened.
 
RaptorUK:
iBarShift()  with the time that the trade was opened, OrderOpenTime(), will give you the bar number of the candle when the trade was opened.


thanks!!!