Looking to count time

 

Hello, I've been looking all over the forums and documentation and I cant find any information on my problem. I want to count the time in hours since a specific action was taken. I want it to be easily reset able and manipulable. Is there a particular "Count Time" function that I can use? 

I am trying to count the time since a trade was executed to use as my SMA. 

SMA = time since order + 1... Or something like this.  thanks! 

 
Nevin McKinnon:

Hello, I've been looking all over the forums and documentation and I cant find any information on my problem. I want to count the time in hours since a specific action was taken. I want it to be easily reset able and manipulable. Is there a particular "Count Time" function that I can use? 

I am trying to count the time since a trade was executed to use as my SMA. 

SMA = time since order + 1... Or something like this.  thanks! 


iBarShift

Reason: