Simple Code for Detect A “New Bar or New Candle ” Received – EA MetaTrader 5

Simple Code for Detect  A  "New Bar or New Candle " Received - expert for MetaTrader 5
This code block detects a New Bar or a New Candle when it has received.  the basic principle of the codes is very simple. First the code stores the Time of the previous bar / Candle. (Then add 60 seconds (equals to 1 min. you can add time as you want) to the Time of