Check Once Per Bar

 

Hey Guys,
I am trying to identify some code which will allow me to test once per bar. For example, running an if() statement at the start of a new bar.
One in which you can select a specific time frame rather than what the time frame is currently operating on.

Any ideas? I am stumped, its late and I cant find much in the directory of functions.

Thanks in advance. 

 
NewCoder47:

Hey Guys,
I am trying to identify some code which will allow me to test once per bar. For example, running an if() statement at the start of a new bar.
One in which you can select a specific time frame rather than what the time frame is currently operating on.

Any ideas? I am stumped, its late and I cant find much in the directory of functions.

Use the search . . .  this subject has been discussed many times.

In essence,  check the time of bar 1,  if it is different to what you remember you have a new bar.
Reason: