Small problem whit refresh Buffer or Object
- Move lastbar globally and set it to zero in init.
Simplified bool NewBar(){ static datetime lastbar; datetime prevBar=lastbar; lastbar=Time[0]; return prevBar!=lastbar; }
- I disagree with making a new bar function, because it can only be called once
per tick. A variable can be tested multiple times.
Thanks whroeder1 !!!
Hello to everyone, I have a small problem using this code:
that helps me to read the code only once for each new bar. If time frame change, the buffers or objects are updated only after the new bar is formed, how can i fix this problem Without having to read the Tick Tick?