MultiTimeframe Candles for Full Time Frame Continuity Analysis

·

Inspired by Rob Smith (R.I.P), creator of TheStrat, this indicator visually represents price levels and movements across higher timeframes—ensuring full timeframe continuity in trading analysis. Below is a refined breakdown of its functionality and application.


How the Script Works

1. User Input Configuration

_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")_

2. New Candle Detection

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

3. Variable Initialization

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

4. Candle Value Calculation

if is_new_candle
  open_offset := open
  high_offset := high - open_offset
  low_offset := low - open_offset
  close_offset := close - open_offset
else
  high_offset := math.max(high - open_offset, high_offset[1])
  low_offset := math.min(low - open_offset, low_offset[1])
  close_offset := close - open_offset

5. Plotting Custom Candles

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, editable=true
)

6. High/Low Markers

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

7. Dashed Line for Intraday Candles

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
  )

8. Timeframe Display Table

var table tf_table = table.new(position = position.top_right, columns = 1, rows = 1, frame_color = color.gray, frame_width = 1, border_width = 1)
if is_new_candle
  table.cell(
    tf_table, 0, 0, "Timeframe: " + timeframe_opt,
    text_color = color.white, text_halign = text.align_center
  )

How to Use It

  1. Lower-Timeframe Analysis: Ensure alignment with higher timeframes (e.g., hourly, daily, weekly).
  2. Indicator Placement: Add the indicator once per monitored timeframe (e.g., 4 instances for hourly/daily/weekly/monthly).
  3. Timeframe Selection: Customize each instance via the dropdown menu.

👉 Master MultiTimeframe Trading with this indicator for seamless market analysis.


FAQ

Q1: Why is timeframe continuity important?

A1: Aligning lower and higher timeframes reduces false signals and confirms trend strength.

Q2: Can I use this for crypto trading?

A2: Yes! The flexible timeframe options suit volatile assets like Bitcoin.

Q3: How do I avoid cluttering my chart?

A3: Limit to 3–4 key timeframes and adjust transparency/colors for clarity.

👉 Optimize Your Strategy Today—unlock higher timeframe insights effortlessly.