Hi
It is not good practice to have a program sitting waiting for an event. You can just put your initialisation routine in the start procedure and when a new candle opens kick it off on a one shot basis. By that I mean use a boolean to say initialisation is done and don't do it again. That way the code will be entered on every tick until a new candle occurs but nothing will happen until your initialisation has been executed. I think that's what you want.
Hi
It is not good practice to have a program sitting waiting for an event. You can just put your initialisation routine in the start procedure and when a new candle opens kick it off on a one shot basis. By that I mean use a boolean to say initialisation is done and don't do it again. That way the code will be entered on every tick until a new candle occurs but nothing will happen until your initialisation has been executed. I think that's what you want.
Makes perfect sense Ruptor !! Thanks a zillion.
what is the easiest way to ascertain that a new Bar has formed in the start routine ? Is there a predefined function for that or I should go by the pinging the Bar count standard variable ??

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi Gurus,
I seem to be running in to Timed Out issues !! Now my question -
Are there any thresholds, like you should not have your start function running for more than so long ?
What if I want my init function to wait until the moment a new bar has just formed and then start it's INITIALIZATION stuff ? Would init certainly get timed out if it was a 5 / 15 / 30 minute chart ? What about a 1 minute chart ?
As always, all help is appreciated.
regards
S K