OPEN-SOURCE SCRIPT

[CT] Kurutoga MTF Histogram

47
What is [CT] Kurutoga MTF Histogram?

The Kurutoga MTF Histogram is a multi-time-frame momentum and mean-deviation tool.
It measures how far the current close is trading away from a rolling midpoint of price and then displays that deviation as a color-coded histogram.

Instead of looking only at one lookback, this version plots three Kurutoga “leads” at the same time:

  • Kurutoga Lead (x1) – base length


  • Kurutoga Lead 2x – slower, 2 × base length


  • Kurutoga Lead 4x – slowest, 4 × base length


Each lead is calculated both on the chart’s timeframe (LTF) and on a Higher Time Frame (HTF) of your choice, so you can see short-term deviation inside a higher-time-frame structure.

4-color Kurutoga scheme

Each Kurutoga lead uses a 4-color MACD-style scheme:

For a given lead:

  • Up Light – divergence ≥ 0 and rising compared to the previous bar


  • Up Dark – divergence ≥ 0 and falling (positive but losing momentum)


  • Down Light – divergence < 0 and falling (bearish momentum increasing)


  • Down Dark – divergence < 0 and rising (negative but contracting)


By default the same four teal / red hues are shared across x1, x2, and x4. The only difference between the leads is transparency:

  • x1 = strongest (least transparent)


  • x2 = medium opacity


  • x4 = faintest


This lets you see all three layers at once without the chart becoming a solid block of color.

The HTF areas use the same palette but with an extra transparency offset applied, so they appear as soft background bands rather than competing with the histograms.

Inputs and how to use them

1. Base Length
Defines the lookback for the main Kurutoga Lead.
The script automatically creates:

  • len1 = baseLength


  • len2 = baseLength × 2


  • len3 = baseLength × 4


Smaller base lengths → faster, more reactive histograms.
Larger base lengths → smoother, trend-focused behavior.

2. Higher Time Frame
This is the HTF used for the area plots and HTF midpoints.
Examples:

  • 5-minute chart with HTF = 30 or 60 minutes


  • 15-minute chart with HTF = 4H or 1D


The idea is to trade on the lower timeframe while seeing how far price is stretched relative to a higher-time-frame range midpoint.

3. Show / Hide toggles

Under “Show / Hide” you can independently turn on/off:

  • Kurutoga Lead (x1)


  • Kurutoga Lead 2x


  • Kurutoga Lead 4x


  • HTF Lead, HTF Lead 2x, HTF Lead 4x


This lets you:

  • Run only a single Kurutoga if you want a clean panel, or


  • Stack multiple leads for a “multi-speed” view of extension and mean reversion.


4. Color Scheme (4-color Kurutoga)

  • Up Light / Up Dark / Down Light / Down Dark – base hues used for every lead.


  • Lead opacity (x1, 2x, 4x) – sets how strong or faint each lead appears.


  • x1 is usually your primary “trading speed.”


  • x2 and x4 can be faded so they act as context.


  • Extra transparency for HTF areas – additional opacity applied on top of each lead’s opacity when drawing HTF areas. This keeps the HTF layer subtle.


You can fine-tune the exact teal/red values here to match your personal palette.

Practical reading & trade ideas

Trend alignment

  • When all three Kurutoga leads (x1, 2x, 4x) are above zero, price is trading above its rolling mid-range on multiple speeds → bullish environment.


  • When all three are below zero, you have a multi-speed bearish environment.


  • Mixed readings (e.g., x1 above zero, x4 below zero) can signal transition or mean-reversion areas.


Momentum vs exhaustion

  • Up Light / Down Light (light colors) show momentum expanding in that direction.


  • Up Dark / Down Dark (dark colors) show momentum contracting – price still on that side of zero, but the push is weakening.


  • After a run of Up Light bars, a shift to Up Dark may hint at a stall or pullback.


  • After a run of Down Light bars, a shift to Down Dark may hint at short covering / bounce potential.


Multi-time-frame confluence

  • Use the HTF areas as a backdrop:


  • If LTF Kurutoga leads are above zero while the HTF area is also positive (and ideally expanding), that’s strong bullish alignment.


  • If LTF leads are trying to flip up while HTF divergence is still deeply negative, you may be looking at a counter-trend bounce rather than a true trend change.


Example setups

  • Trend-following entries:


  • Look for x2 & x4 leads on the same side of zero as the HTF area, then use x1 color shifts (from Down Dark → Up Light or vice versa) to fine-tune entries in the direction of that higher-time-frame bias.


Mean-reversion fades:

  • Watch for extreme Kurutoga values where x1/x2 are strongly extended beyond zero while color flips from Light to Dark (momentum stalling) against an opposing HTF backdrop
.

Notes

  • The indicator is non-directional by itself – it measures distance from a rolling midpoint rather than trend structure or order flow. It works best when combined with your existing price action/trend tools (moving averages, HLBO, structure zones, etc.).


  • Because HTF values are brought down via request.security, choose HTF settings that make sense for your product and session (for example, don’t use very high HTFs on thin intraday markets).


Use the Kurutoga MTF Histogram as a visual scanner for extension, momentum regime, and multi-speed alignment, then layer your own entry/exit rules on top.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.