Could someone please help me with some code. I am looking to implement a timer to be used as a pause method within certain parts of my indicator and work in the same way as using Thread.Sleep() without the unsuaitable side effects. e.g One use is that I want to hold up the transition from State=DataLoaded to State=Historical to allow some code in dataloaded to fully complete before I move on to the next state.
I've look at the code in the guide linked below however that appears specfic to starting and stoping some other methd and allowing it time to complete. I just want to use a timer and be able to insert it as a "pause" step wherever I need it, then move on to the next line of my script whatever that may be.
The only way I can think of to make a timer work in this way is to have the script start the timer and then go into some sort of loop until the timer triggers then break; or continue; out of it? I'm not sure if this is the most effecient (or safest) way of creating a pause or how it would look as code so reaching out for some assistance.
Thanks
Comment