OPEN-SOURCE SCRIPT
更新済 MTF Chikou Span + CCI Div

When using this strategy, we strongly recommend combining it with an external CCI indicator.
MTF Chikou Span + CCI Div
Multi-Timeframe Lagging Span + CCI Divergence
A TradingView Indicator for Visual, Informed Entry Timing
1. Overview
MTF Chikou Span + CCI Div is built around one of the most underused components of the Ichimoku Cloud system: the Lagging Span (Chikou Span). While most traders focus on the cloud, the tenkan/kijun cross, or price-to-cloud relationships, the Chikou Span offers something uniquely powerful — a direct visual comparison between current price and historical price at a fixed offset.
This indicator combines:
• Two Chikou Spans (current timeframe + higher timeframe) for multi-timeframe trend alignment
• CCI (Commodity Channel Index) for momentum-based entry timing
• CCI Divergence detection to highlight higher-confidence setups
• ATR-based Stop Loss line drawn automatically on signal
2. Understanding the Lagging Span (Chikou Span)
2.1 What it is
The Chikou Span is simply the current closing price plotted 26 bars to the left. You are visually overlaying today's price onto the price action from 26 periods ago. When the Chikou Span is above those historical candles, price has risen significantly since that point. When it sits below, it has fallen.
Despite being one of the five components of Ichimoku Kinko Hyo, the Chikou Span is rarely discussed in depth outside of Japanese trading communities. This indicator is designed to bring it to the forefront.
2.2 The Two Lines on Your Chart
Green line (Current TF Chikou): The closing price of the current timeframe, displaced 26 bars back. Shows the short-term trend direction.
Orange line (Higher TF Chikou): The closing price of a higher timeframe, displaced back proportionally. Shows the macro trend direction.
When both lines point upward and price sits clearly above the historical candles they overlap, you have a strong bullish alignment.
When the two lines conflict in direction, the indicator marks this as CONFLICT in the dashboard and withholds signals.
2.3 The Visual Gap — The Most Important Concept
The quality of a signal depends heavily on how much open space exists between the Chikou Span line and the surrounding candlesticks.
Large gap (Chikou in open space): Price has moved far from its historical reference. There is room to run. This is the ideal entry zone.
Small gap (Chikou tangled with candles): Price is near its historical levels. Resistance and support are close. Signals here carry lower follow-through.
Key Principle: The indicator generates CCI signals continuously, but YOU decide which signals to act on based on your visual inspection of the gap.
If the Chikou Span is deeply embedded in past candlestick bodies, wait. If it is floating freely in open space, that is where to pay attention.
This judgment cannot be fully automated — open space is contextual. It depends on what else is in that space: pivots, previous highs/lows, the cloud, the other Chikou line. Your eyes are the final filter.
2.4 When the Chikou Span Approaches a Candle
As price moves forward, the Chikou Span will eventually approach and touch historical candles. This is significant for two reasons:
• Support / Resistance: The candle it approaches represents a historical price memory. Market participants who acted at that level may react again.
• Forward prediction: You can visually anticipate where the Chikou Span will meet candles in the near future. A clear run of open space followed by a dense cluster of candles tells you where momentum may stall.
The orange higher-TF Chikou often reveals macro support/resistance levels that are invisible on the current timeframe alone. Watch how it behaves as you switch between timeframes.
3. Timeframe Setup
3.1 Auto-Selection
The indicator automatically selects a higher timeframe based on your current chart:
Current Chart TF Auto Higher TF
1 min 3 min
3–5 min 15 min
15 min 1 hour
30–60 min 4 hours
2–4 hours Daily
Daily Weekly
Weekly / Monthly Monthly
You can disable auto-selection and manually set both the higher and lower timeframes in the Timeframe Settings group.
3.2 Choosing the Right Timeframe for Entry
This is the core workflow:
1. Open a small timeframe chart (1m, 3m, or 5m) with the indicator applied.
2. Check the Chikou Align row in the table. If it shows CONFLICT, do not trade.
3. Visually inspect the green and orange Chikou lines. Are they floating freely, or hitting candles?
4. If the gap is insufficient, switch to a larger timeframe and repeat.
5. On the timeframe with the best gap, wait for a CCI signal aligned with both Chikou directions.
6. Check the SL line vs. your nearest target. Confirm risk/reward is acceptable.
7. Enter. Monitor the Chikou Span — if it approaches a dense cluster of historical candles, consider tightening your stop.
4. Signal Types
4.1 Signal Labels
Label Color CCI Used Meaning
BUY Green triangle Short CCI (period 5) Standard long signal
SELL Red triangle Short CCI (period 5) Standard short signal
H-BUY Blue label Long CCI (period 14) Higher-conviction long signal
H-SELL Maroon label Long CCI (period 14) Higher-conviction short signal
BUY+D Gold triangle Short CCI + Divergence CCI Long signal with CCI divergence confirmed
SELL+D Gold triangle Short CCI + Divergence CCI Short signal with CCI divergence confirmed
H-BUY+D Gold label Long CCI + Divergence CCI H-BUY with divergence confirmed
H-SELL+D Gold label Long CCI + Divergence CCI H-SELL with divergence confirmed
+D signals (gold color): Highest-priority signals. An independent Divergence CCI (period 5, separate from the trigger CCI) has confirmed that price and momentum are diverging. These should be given priority over standard signals.
4.2 HTF Alignment Switch
Under Chikou Span Settings, 'Require HTF + Current Chikou Alignment' controls whether both timeframes must agree:
• ON (default): Both higher TF and current TF Chikou must point the same direction. Fewer signals, higher conviction.
• OFF: Only current TF Chikou direction is used. More signals. Useful when you want to monitor the higher TF manually or trade a single timeframe.
5. CCI Settings
5.1 Three Independent CCI Calculations
CCI Default Period Purpose
Short CCI 5 Fast trigger for BUY/SELL. Sensitive to short-term momentum shifts.
Long CCI 14 Slower trigger for H-BUY/H-SELL. Better for sustained moves.
Divergence CCI 5 (separate) Used only for divergence detection. Independent from trigger CCI for maximum pivot sensitivity.
Important: The actual ±100 crossover trigger uses the raw CCI value, not the smoothed EMA. The EMA Smoothing value is used for override detection and dashboard display only.
6. Filters
All filters are optional and can be toggled independently. When a filter is OFF, its row is hidden from the dashboard table automatically.
Filter Default Description
EMA Trend Filter ON BUY requires EMA Fast > EMA Slow. Can be bypassed by extreme CCI EMA (override).
Lower TF Chikou Filter OFF Adds a third Chikou check using a sub-timeframe. Recommended for advanced users only.
ATR Volatility Filter OFF Only signals when current ATR > average ATR. Prevents entries in dead markets.
Volume Filter OFF Requires above-average volume at signal time.
Depth Filter (S/L-EMA) OFF Requires CCI EMA <= -30 (buy) or >= +30 (sell). Ensures signals fire after real overextension.
7. Stop Loss Line
When a signal fires, a red dashed line is drawn at:
• Long signal: entry price - ATR x multiplier (default 1.5)
• Short signal: entry price + ATR x multiplier (default 1.5)
The line disappears after 10 bars (adjustable). The current SL price appears in the dashboard table while the line is active.
The SL line is a reference tool. Always combine it with your own analysis — pivot levels, recent swing lows/highs, and the Chikou Span gap should all inform your actual stop placement.
8. Dashboard Table
The table in the top-right shows only active components. Disabled filter rows are hidden automatically.
Row Description
HTF (TF) Higher timeframe Chikou direction. Blue = up, Red = down.
Curr (TF) Current timeframe Chikou direction. Green = up, Red = down.
Chikou Align BULL ALIGN / BEAR ALIGN / CONFLICT.
LTF (TF) Lower TF Chikou. Shown only when that filter is ON.
EMA Filter BULL / BEAR / OVERRIDE. Shown when ON.
ATR Filter HIGH = above-average volatility. Shown when ON.
Volume HIGH = above-average volume. Shown when ON.
Depth Filter PASS / BLOCK. Shown when ON.
CCI DIV Bull DIV or Bear DIV when divergence is active.
CCI L-EMA Long CCI smoothed value.
CCI S-EMA Short CCI smoothed value.
Stop Loss Current SL price. Shown while SL line is active.
Signal Current signal state.
9. Parameter Reference
Parameter Default Notes
Short CCI Period 5 Raise to 9–14 for swing trading.
Short CCI EMA Smoothing 2 Raise to 3–5 to reduce noise.
Long CCI Period 14 Used for H-BUY / H-SELL signals.
Long CCI EMA Smoothing 9 Standard smoothing.
Divergence CCI Period 5 Kept short for pivot sensitivity.
Pivot Lookback Left/Right 5 / 5 Bars on each side to confirm a swing pivot.
Max Lookback Range 60 Maximum bars between pivots for valid divergence.
Min Lookback Range 5 Minimum bars between pivots.
EMA Fast / Slow 9 / 20 For EMA trend filter.
SL ATR Multiplier 1.5 Raise for wider stops, lower for tighter.
SL Line Duration 10 Bars the SL line remains visible.
Disclaimer
This indicator is provided for educational purposes only and does not constitute financial advice. Past signal performance does not guarantee future results. Always use proper risk management. Never risk more than you can afford to lose.
MTF Chikou Span + CCI Div
Multi-Timeframe Lagging Span + CCI Divergence
A TradingView Indicator for Visual, Informed Entry Timing
1. Overview
MTF Chikou Span + CCI Div is built around one of the most underused components of the Ichimoku Cloud system: the Lagging Span (Chikou Span). While most traders focus on the cloud, the tenkan/kijun cross, or price-to-cloud relationships, the Chikou Span offers something uniquely powerful — a direct visual comparison between current price and historical price at a fixed offset.
This indicator combines:
• Two Chikou Spans (current timeframe + higher timeframe) for multi-timeframe trend alignment
• CCI (Commodity Channel Index) for momentum-based entry timing
• CCI Divergence detection to highlight higher-confidence setups
• ATR-based Stop Loss line drawn automatically on signal
2. Understanding the Lagging Span (Chikou Span)
2.1 What it is
The Chikou Span is simply the current closing price plotted 26 bars to the left. You are visually overlaying today's price onto the price action from 26 periods ago. When the Chikou Span is above those historical candles, price has risen significantly since that point. When it sits below, it has fallen.
Despite being one of the five components of Ichimoku Kinko Hyo, the Chikou Span is rarely discussed in depth outside of Japanese trading communities. This indicator is designed to bring it to the forefront.
2.2 The Two Lines on Your Chart
Green line (Current TF Chikou): The closing price of the current timeframe, displaced 26 bars back. Shows the short-term trend direction.
Orange line (Higher TF Chikou): The closing price of a higher timeframe, displaced back proportionally. Shows the macro trend direction.
When both lines point upward and price sits clearly above the historical candles they overlap, you have a strong bullish alignment.
When the two lines conflict in direction, the indicator marks this as CONFLICT in the dashboard and withholds signals.
2.3 The Visual Gap — The Most Important Concept
The quality of a signal depends heavily on how much open space exists between the Chikou Span line and the surrounding candlesticks.
Large gap (Chikou in open space): Price has moved far from its historical reference. There is room to run. This is the ideal entry zone.
Small gap (Chikou tangled with candles): Price is near its historical levels. Resistance and support are close. Signals here carry lower follow-through.
Key Principle: The indicator generates CCI signals continuously, but YOU decide which signals to act on based on your visual inspection of the gap.
If the Chikou Span is deeply embedded in past candlestick bodies, wait. If it is floating freely in open space, that is where to pay attention.
This judgment cannot be fully automated — open space is contextual. It depends on what else is in that space: pivots, previous highs/lows, the cloud, the other Chikou line. Your eyes are the final filter.
2.4 When the Chikou Span Approaches a Candle
As price moves forward, the Chikou Span will eventually approach and touch historical candles. This is significant for two reasons:
• Support / Resistance: The candle it approaches represents a historical price memory. Market participants who acted at that level may react again.
• Forward prediction: You can visually anticipate where the Chikou Span will meet candles in the near future. A clear run of open space followed by a dense cluster of candles tells you where momentum may stall.
The orange higher-TF Chikou often reveals macro support/resistance levels that are invisible on the current timeframe alone. Watch how it behaves as you switch between timeframes.
3. Timeframe Setup
3.1 Auto-Selection
The indicator automatically selects a higher timeframe based on your current chart:
Current Chart TF Auto Higher TF
1 min 3 min
3–5 min 15 min
15 min 1 hour
30–60 min 4 hours
2–4 hours Daily
Daily Weekly
Weekly / Monthly Monthly
You can disable auto-selection and manually set both the higher and lower timeframes in the Timeframe Settings group.
3.2 Choosing the Right Timeframe for Entry
This is the core workflow:
1. Open a small timeframe chart (1m, 3m, or 5m) with the indicator applied.
2. Check the Chikou Align row in the table. If it shows CONFLICT, do not trade.
3. Visually inspect the green and orange Chikou lines. Are they floating freely, or hitting candles?
4. If the gap is insufficient, switch to a larger timeframe and repeat.
5. On the timeframe with the best gap, wait for a CCI signal aligned with both Chikou directions.
6. Check the SL line vs. your nearest target. Confirm risk/reward is acceptable.
7. Enter. Monitor the Chikou Span — if it approaches a dense cluster of historical candles, consider tightening your stop.
4. Signal Types
4.1 Signal Labels
Label Color CCI Used Meaning
BUY Green triangle Short CCI (period 5) Standard long signal
SELL Red triangle Short CCI (period 5) Standard short signal
H-BUY Blue label Long CCI (period 14) Higher-conviction long signal
H-SELL Maroon label Long CCI (period 14) Higher-conviction short signal
BUY+D Gold triangle Short CCI + Divergence CCI Long signal with CCI divergence confirmed
SELL+D Gold triangle Short CCI + Divergence CCI Short signal with CCI divergence confirmed
H-BUY+D Gold label Long CCI + Divergence CCI H-BUY with divergence confirmed
H-SELL+D Gold label Long CCI + Divergence CCI H-SELL with divergence confirmed
+D signals (gold color): Highest-priority signals. An independent Divergence CCI (period 5, separate from the trigger CCI) has confirmed that price and momentum are diverging. These should be given priority over standard signals.
4.2 HTF Alignment Switch
Under Chikou Span Settings, 'Require HTF + Current Chikou Alignment' controls whether both timeframes must agree:
• ON (default): Both higher TF and current TF Chikou must point the same direction. Fewer signals, higher conviction.
• OFF: Only current TF Chikou direction is used. More signals. Useful when you want to monitor the higher TF manually or trade a single timeframe.
5. CCI Settings
5.1 Three Independent CCI Calculations
CCI Default Period Purpose
Short CCI 5 Fast trigger for BUY/SELL. Sensitive to short-term momentum shifts.
Long CCI 14 Slower trigger for H-BUY/H-SELL. Better for sustained moves.
Divergence CCI 5 (separate) Used only for divergence detection. Independent from trigger CCI for maximum pivot sensitivity.
Important: The actual ±100 crossover trigger uses the raw CCI value, not the smoothed EMA. The EMA Smoothing value is used for override detection and dashboard display only.
6. Filters
All filters are optional and can be toggled independently. When a filter is OFF, its row is hidden from the dashboard table automatically.
Filter Default Description
EMA Trend Filter ON BUY requires EMA Fast > EMA Slow. Can be bypassed by extreme CCI EMA (override).
Lower TF Chikou Filter OFF Adds a third Chikou check using a sub-timeframe. Recommended for advanced users only.
ATR Volatility Filter OFF Only signals when current ATR > average ATR. Prevents entries in dead markets.
Volume Filter OFF Requires above-average volume at signal time.
Depth Filter (S/L-EMA) OFF Requires CCI EMA <= -30 (buy) or >= +30 (sell). Ensures signals fire after real overextension.
7. Stop Loss Line
When a signal fires, a red dashed line is drawn at:
• Long signal: entry price - ATR x multiplier (default 1.5)
• Short signal: entry price + ATR x multiplier (default 1.5)
The line disappears after 10 bars (adjustable). The current SL price appears in the dashboard table while the line is active.
The SL line is a reference tool. Always combine it with your own analysis — pivot levels, recent swing lows/highs, and the Chikou Span gap should all inform your actual stop placement.
8. Dashboard Table
The table in the top-right shows only active components. Disabled filter rows are hidden automatically.
Row Description
HTF (TF) Higher timeframe Chikou direction. Blue = up, Red = down.
Curr (TF) Current timeframe Chikou direction. Green = up, Red = down.
Chikou Align BULL ALIGN / BEAR ALIGN / CONFLICT.
LTF (TF) Lower TF Chikou. Shown only when that filter is ON.
EMA Filter BULL / BEAR / OVERRIDE. Shown when ON.
ATR Filter HIGH = above-average volatility. Shown when ON.
Volume HIGH = above-average volume. Shown when ON.
Depth Filter PASS / BLOCK. Shown when ON.
CCI DIV Bull DIV or Bear DIV when divergence is active.
CCI L-EMA Long CCI smoothed value.
CCI S-EMA Short CCI smoothed value.
Stop Loss Current SL price. Shown while SL line is active.
Signal Current signal state.
9. Parameter Reference
Parameter Default Notes
Short CCI Period 5 Raise to 9–14 for swing trading.
Short CCI EMA Smoothing 2 Raise to 3–5 to reduce noise.
Long CCI Period 14 Used for H-BUY / H-SELL signals.
Long CCI EMA Smoothing 9 Standard smoothing.
Divergence CCI Period 5 Kept short for pivot sensitivity.
Pivot Lookback Left/Right 5 / 5 Bars on each side to confirm a swing pivot.
Max Lookback Range 60 Maximum bars between pivots for valid divergence.
Min Lookback Range 5 Minimum bars between pivots.
EMA Fast / Slow 9 / 20 For EMA trend filter.
SL ATR Multiplier 1.5 Raise for wider stops, lower for tighter.
SL Line Duration 10 Bars the SL line remains visible.
Disclaimer
This indicator is provided for educational purposes only and does not constitute financial advice. Past signal performance does not guarantee future results. Always use proper risk management. Never risk more than you can afford to lose.
リリースノート
I've updated the chart image.リリースノート
I set the volume filter to ON by default. I changed volSmaLen to 26.オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。