a code block to detect a "new candle/bar" using bars history (very effective way)
in previous code i used thetimeto detect a new bar. this time let's use the bars countto detect a new bar. it's waylighter and fasterthan using the time method.declare the variable...














































