PROTECTED SOURCE SCRIPT

Ichimoku Horizon v.3

29
Ichimoku Horizon v3 – Multi-TF Ichimoku with auto-map & TF legend

Ichimoku Horizon v3 plots classic Ichimoku on your current chart timeframe and projects up to 3 higher timeframes (TF1 / TF2 / TF3) on the same chart. The goal is to keep one clean chart while still seeing Daily / Weekly / Monthly Ichimoku context.

On the current chart timeframe, the script plots:

Tenkan-sen, Kijun-sen
Senkō Span A & B (Kumo)
Chikō Span

An optional Kumo Midline (midpoint between SSA and SSB)

Note: the Kumo Midline is not part of the original Ichimoku, it is just an additional visual helper.
It is calculated as the simple average of the two cloud boundaries:
Midline = (SSA + SSB) / 2.
You can turn it ON/OFF globally and per timeframe.


The same logic (including the optional Midline) is applied to TF1 / TF2 / TF3 and projected onto your main chart.
Auto-map & presets
You control how TF1 / TF2 / TF3 are selected with:

Auto-map TF from chart (ON/OFF)

When ON, the script automatically chooses a profile based on your chart TF (Scalp / Intraday / Swing / Long Term / Investment / Macro).
TF1 / TF2 / TF3 are always higher than the chart timeframe in a consistent way.

Preset Time Frame (when Auto-map = OFF)

When OFF, you pick a fixed preset such as:
Scalp S — 1m / 5m / 15m
Intraday L — 1H / 4H / 1D
Swing — 1D / 1W / 1M
Investment — 1M / 3M / 6M
Macro — 3M / 6M / 12M

If you choose Custom, you manually set TF1 / TF2 / TF3 via the three “Timeframe selection” inputs in the TF1 / TF2 / TF3 sections.

This lets you switch between scalp / intraday / swing / macro profiles without editing the code.
TF legend (banner) & display options
The indicator includes an optional TF banner (panel) that acts as a legend:
Shows the active profile name (Scalp, Intraday M, Intraday XL, Swing, Long Term, Macro, Custom).

Displays the three mapped timeframes (TF1 / TF2 / TF3) in short form (5m, 1H, 4H, 1D, 1W, 1M, etc.).
Shows TK / KJ plus small colored squares for Tenkan and Kijun for each TF, matching the line colors on the chart.

You can control:

Show / hide the banner.
Position: Top/Bottom Left, Center, Right.
Text color, background, text size.

Each block (Chart, TF1, TF2, TF3) also has its own toggles for Tenkan, Kijun, Chikō, SSA, SSB, Kumo fill and Kumo Midline, so you can keep only what you really need (for example: just HTF Kijun + HTF Kumo).

Color design

A specific effort has been made on the color design:
Each timeframe uses its own color family (warm for the chart, green for TF1, blue for TF2, neutral/grey for TF3) so it stays readable even when all TFs are displayed.
Kumo fills are semi-transparent to give context without hiding price action.
Defaults are tuned for light charts, and every color can be customized if you prefer another palette.

Built-in alerts

The script includes a small set of ready-to-use alerts, controlled by a global Enable alerts switch and a built-in cooldown to avoid spam. Available conditions:

TK>KJ (UP) – Tenkan crosses above Kijun on the chart timeframe (filtered by bullish HTF bias).
TK<KJ (DOWN) – Tenkan crosses below Kijun (filtered by bearish HTF bias).
Kumo Breakout (UP) – Close breaks above the cloud (with bullish HTF filter).
Kumo Breakout (DOWN) – Close breaks below the cloud (with bearish HTF filter).
All TF Bullish – Chart + TF1 + TF2 + TF3 all show Tenkan > Kijun (full bullish alignment).
All TF Bearish – Chart + TF1 + TF2 + TF3 all show Tenkan < Kijun (full bearish alignment).
HTF Confirms (BULL) – Bullish TK cross on the chart, with HTF support and price above the cloud.
HTF Confirms (BEAR) – Bearish TK cross on the chart, with HTF support and price below the cloud.

Just add an alert on the indicator, choose one of these conditions, and use “Once per bar close” for cleaner signals.

No-repaint logic
Higher-timeframe data is fetched with request.security() using:
barmerge.gaps_off
barmerge.lookahead_off

There is no artificial lookahead and no repainting, apart from the normal forward shift of the Ichimoku cloud, which is how standard Ichimoku works by design.

If the panel/labels stick to the left

On some devices or after layout changes, TradingView can bug and draw tables/labels stuck on the left or misaligned.
If you see the TF banner or right-side labels not updating correctly:
Clear the TradingView app cache (or restart the app/browser),
Then reload the chart.

This usually forces TradingView to redraw all tables and labels correctly and fixes the “stuck on the left” display issue.

Disclaimer
This script is provided for educational and informational purposes only.
It does not constitute financial or investment advice, and it should not be used as a signal provider on its own.
Always do your own analysis and use proper risk management before taking any trade.


Thanks for using Ichimoku Horizon v3

Aviso legal

As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.