Bar Replay
- Utilitaires
- Okeene Rajae Chambers
- Version: 1.0
Bar Replay — Manual backtesting made simple.
Bar Replay is a chart-based replay tool for MetaTrader 5 that hides future candles past a "frozen time" you control. Step forward bar by bar, jump to any historical date, or auto-play at a custom speed — and practice your strategy as if you were trading the chart live, without any lookahead bias.
Whether you're refining a discretionary strategy, building screen time, or studying historical price action, Bar Replay turns any chart into a training ground.
Key features
- Hide future data instantly. The chart automatically scrolls so your chosen "frozen time" sits at the right edge, and a smart cover paints over any future candles that would otherwise be visible.
- Multi-timeframe sync. Attach Bar Replay to multiple charts of the same symbol (M15, H1, H4, D1, etc.) and they all share one frozen time. Step forward on H1 — your D1 chart updates too.
- Step or play. Move one bar at a time on the current timeframe with « 1B and 1B » buttons, or hit the autoplay controls (backward, pause, forward) to watch price unfold at your chosen speed.
- Editable time field. Type any date and time in YYYY.MM.DD HH:MM format and press Enter to jump straight there.
- Adjustable playback speed. Set autoplay from 0.1 to 60 seconds per bar — slow learning pace or rapid scan, your choice.
- Reset and Adjust controls. Jump back to your starting time with one click, or re-snap your view to the current frozen time after manually scrolling around.
- Configurable visual style. Cover color, opacity, optional vertical line, button position, and chart-background-matching mode all customizable through inputs.
- History persistence. Frozen time is saved automatically and survives MT5 restarts, timeframe changes, and chart reloads.
- Smart history detection. If your broker is missing data for the requested time range on the current timeframe, the time field tints amber to warn you. Optional auto-download requests the missing bars from your broker.
- Optional hotkeys. Enable arrow-key navigation (left/right = step bar, space = play/pause) for keyboard-driven backtesting.
How it works
Attach the indicator to your chart, set your starting time in the inputs, and the chart immediately hides everything past that point. Click 1B » to advance one bar, Play ▶ to autoplay forward, or type a new time directly into the field below the buttons. Open additional charts on different timeframes and the same frozen time applies everywhere — perfect for multi-timeframe analysis where you need to see, for example, what the H4 looked like at the same moment as your M15 entry.
Inputs
- InpStartTimeStr — Initial frozen time ( YYYY.MM.DD HH:MM )
- InpForceReset — Reset frozen time on attach
- InpUseChartBg — Match cover color to chart background for a clean blank look
- InpVeilColor / InpVeilAlpha — Custom cover color and opacity
- InpLineColor — Optional vertical marker at frozen time
- InpButtonX / InpButtonY — Panel position
- InpUseHotkeys — Enable arrow-key navigation
- InpPlaySpeedSeconds — Autoplay speed (seconds per bar)
- InpAutoDownloadHist — Auto-request missing history from broker
- InpPersistAcrossRestart — Save frozen time across MT5 restarts
Compatibility
- MetaTrader 5, build 3000 or later
- Works on any symbol and timeframe
- Cross-chart sync works on all charts of the same symbol simultaneously
Important notes
Bar Replay is a visual hiding tool. Built-in indicators (moving averages, RSI, etc.) calculate using all available data, so their values past the frozen time will reflect future information. If you're testing strategies that depend on indicator values, treat readings inside the covered area as untrustworthy.
For best results on lower timeframes (M1, M5, M15, M30, H1), download historical bars from your broker via the History Center ( F2 in MT5) before using Bar Replay. Some brokers limit how far back they provide intraday data.
Support
For questions, issues, or feature requests, contact Chambers Inc. through the MQL5 messaging system.
