Period_Converter_Opt.mq4 shows when a new bar is going to open in the TF chart you apply it to. set the minutesbeforecandleclose to your preference.