A Code block to detect A “New Candle/Bar” using bars history (very effective way)

Experts MetaTrader 5 Free

If you only want to execute your code blocks "only once per bar" it's important to check if there is new bar arrived or not.