help with an open bars only set up and stopping every tick mode

 

Hey everyone,

This is my first post as you can probably tell and I am having some issues:

Could somebody tell me how I can create a block of code or use some kind of function (or whatever is necessary) to make my EAs operate so they only run at the opening of a new bar and don't run on every tick.

thanks for you help and support and I apologised if this is already in the forums oor if it is really easy.

Thanks again

Diarmuid

 
Search for once per bar
 

store Time[0] in a static or globalscope variable

only run the code if Time[0] != the variable

 
Thanks to everyone who has written here, it has been very helpful.
 

Can somebody write an example of this? I ahve tried a few different syntax and can't seem to get it right, the error I'm getting is to do with the array part of the code.

Thanks!

 
You have only three choices: Search for it, learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
 
fibios1:

Can somebody write an example of this? I ahve tried a few different syntax and can't seem to get it right, the error I'm getting is to do with the array part of the code.

Thanks!


We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.

you didn't show what you tried

 
that sounds fair to me. I have managed to get it to work now, thanks for all your help!