MultiTimeframe Candles for Full Time Frame Continuity Analysis

·

Understanding market structure across multiple timeframes is essential for traders aiming to achieve consistency and precision in their decision-making. Inspired by Rob Smith, the creator of TheStrat, this indicator—MultiTimeframe Candles—offers a visual solution for analyzing price action with full timeframe continuity. By overlaying higher timeframe candle data directly onto your current chart, it enables seamless alignment between short-term entries and long-term trends.

This powerful Pine Script tool helps traders maintain context, avoid noise-driven decisions, and stay aligned with dominant market momentum—all without switching charts or losing focus.

👉 Discover how multi-timeframe analysis can transform your trading strategy today.

How the MultiTimeframe Candles Indicator Works

The indicator leverages Pine Script’s flexibility to simulate higher timeframe candles (like daily, weekly, or monthly) directly on lower timeframe charts (such as 5-minute or hourly). This allows traders to see how current price movements relate to broader market cycles in real time.

Let’s break down its core functionality step by step.

1. User Input Configuration

At the start, the script defines two key inputs:

_timeframe_opt = input.timeframe("60", "Select Timeframe", options=["1", "3", "5", "15", "30", "60", "240", "D", "W", "M", "3M", "12M"])
_show_hl = input.bool(false, "Show Hi/Lo")

These settings make the indicator highly customizable, letting traders focus only on the timeframes that matter to their strategy.

2. Detecting a New Candle

To track changes in the selected higher timeframe, the script checks for new candle formation:

_is_new_candle = (time(timeframe_opt) != time(timeframe_opt)[1])

This line compares the current bar’s timestamp with the previous one in the chosen timeframe. If they differ, a new candle has started—triggering updates to open, high, low, and close values.

3. Initializing Key Variables

The following variables store price offsets relative to the custom timeframe:

var float open_offset = na
var float high_offset = na
var float low_offset = na
var float close_offset = na
var line ln = na

By using var, these values persist across bars until reset at the start of a new higher timeframe candle. This persistence is crucial for accurately building the synthetic candle in real time.

4. Calculating Candle Components

When a new candle begins:

As price evolves within the same higher timeframe period:

This incremental update ensures that even on fast-moving lower timeframe charts, the synthetic candle remains accurate and responsive.

5. Plotting the Custom Candle

Using plotcandle(), the script draws a visual representation of the higher timeframe candle directly on your chart:

plotcandle(
    open_offset - open_offset, high_offset, low_offset, close_offset,
    title="Custom Timeframe Candle",
    color=(close_offset >= 0 ? color.green : color.red),
    bordercolor=color.black, wickcolor=color.black
)

Note: open_offset - open_offset equals zero—this anchors all values relative to the starting point (i.e., price displacement from open).

This visual format makes it easy to assess trend strength and direction at a glance.

6. Displaying High and Low Markers

If enabled via the settings:

plot(show_hl ? high_offset : na, color=color.black, style=plot.style_circles)
plot(show_hl ? low_offset : na, color=color.black, style=plot.style_circles)

Small black circles mark the highest high and lowest low of the active higher timeframe candle. These serve as dynamic support/resistance zones forming in real time.

7. Visual Marker for New Intraday Candles

To highlight transitions between intraday periods (e.g., hourly rollovers):

if is_new_candle and timeframe.isintraday
    ln := line.new(bar_index, 2.22, bar_index, -2.22,
        xloc=xloc.bar_index, color=color.new(color.black, 45),
        style=line.style_dashed, width=1, extend=extend.both)

A semi-transparent dashed vertical line spans the chart at the start of each new intraday candle—providing an instant visual cue for session changes.

8. Timeframe Display Table

For clarity, a small table appears in the top-right corner:

var table tf_table = table.new(position = position.top_right, columns = 1, rows = 1)
if is_new_candle
    table.cell(tf_table, 0, 0, "Timeframe: " + timeframe_opt)

It dynamically shows which timeframe the indicator is tracking and refreshes only when a new candle forms—minimizing screen clutter while maintaining transparency.

👉 See how syncing multiple timeframes can improve your entry accuracy instantly.

Practical Usage Tips

To get the most out of this indicator:

This setup creates a layered view of market structure—allowing you to trade small candles with big-picture conviction.

Core Keywords

These terms reflect both technical depth and search intent—helping traders find actionable insights on aligning short-term trades with long-term trends.

Frequently Asked Questions (FAQ)

Q: Can I use this indicator on any financial instrument?
A: Yes. The MultiTimeframe Candles indicator works on stocks, forex, commodities, and cryptocurrencies—any asset available on TradingView with time-series data.

Q: Does it repaint or lag behind real-time data?
A: No. The indicator updates in real time without repainting. Values are based on confirmed price action within each bar.

Q: How do I avoid chart clutter when using multiple instances?
A: Limit usage to 3–4 key timeframes relevant to your strategy. Disable Show Hi/Lo on less critical ones and use distinct color schemes if supported.

Q: Is this compatible with backtesting strategies?
A: While primarily visual, you can extract logic from the script for custom strategy development—but note that plotcandle() itself isn’t tradable.

Q: Can I modify it to show only certain timeframes?
A: Absolutely. You can edit the options array in input.timeframe() to restrict choices or add custom intervals like "720" (12 hours).

Q: Why use offset-based plotting instead of actual prices?
A: Offset mode centers the candle at zero, emphasizing relative movement (momentum and range) rather than absolute price level—ideal for pattern recognition and psychological bias tracking.

👉 Start applying multi-timeframe clarity to your live trading environment now.