This script simulates the TradingView's "Bar Replay" mode. The "Bar Replay" mode works only for time-frames greater than daily in free accounts. By using this script, one can easily apply this mode on an arbitrary time-frame particularly in free accounts.
Note that to use it properly, one should turn off the main candlestick chart from symbol description tool bar. then set the number of bars they like to hide. I hope you enjoy using this script