It is super easy and does not require any coding. Just use "BAR REPLAY" window: Bar Replay window
It does exactly what you are asking for
Having said that:
Your user account isn't marked with License verified badge. Did you purchase AmiBroker license?
Only users with License verified badge are allowed to post on this forum.
So before posting, make sure you verify your license as explained here.