OPEN-SOURCE SCRIPT
已更新 Trinity Multi-Timeframe CCI

Trinity Multi-Timeframe CCI Indicator
This Pine Script indicator is a powerful **multi-timeframe Commodity Channel Index (MTF CCI)** tool that displays three CCI lines on a single pane:
- **Current timeframe** (whatever chart you're viewing, e.g., 1h, 15m, etc.)
- **4-hour timeframe**
- **Daily timeframe**
All three use the same CCI length (default 20, adjustable) and are fully customizable—you can enable/disable each line, change its timeframe, color, and thickness. Horizontal levels at 0 (dashed white by default), +100 (red), and -100 (green) are also included and fully editable.
### Core Functionality & Visual Signals
The standout feature is the **dynamic coloring of the current timeframe CCI line**:
- **Green**: Strong **bullish alignment**. This occurs when **all three CCIs are above the zero line** AND the current timeframe CCI is the **highest** of the three (leading the move upward with higher-timeframe confirmation).
- **Red**: Strong **bearish alignment**. This occurs when **all three CCIs are below the zero line** AND the current timeframe CCI is the **lowest** of the three (leading the move downward with higher-timeframe confirmation).
- **Yellow**: Neutral or no clear alignment (default state when the above conditions aren't met).
An optional light background shading (green or red) highlights when the indicator is in a bullish or bearish state.
Small triangle markers appear on the pane when a new bullish or bearish alignment forms, and built-in alerts notify you of new signals or when a signal ends. These are editable to enable or disable.
### How Traders Can Use It
This indicator helps identify **high-probability trend continuations or reversals** by combining momentum (CCI) across multiple timeframes with alignment confirmation:
- **Trend-following entries**: A green current line (especially with a fresh alert) suggests strong upward momentum backed by higher timeframes—ideal for long entries or adding to positions in an uptrend.
- **Bearish entries/short setups**: A red current line signals strong downward momentum confirmed across timeframes—good for short entries or exiting longs.
- **Confluence filter**: Use it as a filter for other strategies. Only take trades in the direction of the alignment (e.g., only long if current line is green).
- **Early warning of weakness**: When the current line turns yellow after being green/red, it often signals the trend is losing multi-timeframe support—useful for tightening stops or taking partial profits.
In essence, it visually answers the question: “Is the short-term momentum not only strong, but also aligned with and leading the medium- and long-term momentum?” When the answer is yes (green or red), it highlights moments of **multi-timeframe confluence**—some of the most reliable setups in technical trading.
The alerts make it practical for active traders: you get notified the moment a strong aligned signal appears, without needing to watch the chart constantly.
It's clean, highly customizable, and focuses on one clear concept—**multi-timeframe CCI leadership**—making it excellent for trend, swing, and even intraday traders looking for higher-timeframe confirmation.
This Pine Script indicator is a powerful **multi-timeframe Commodity Channel Index (MTF CCI)** tool that displays three CCI lines on a single pane:
- **Current timeframe** (whatever chart you're viewing, e.g., 1h, 15m, etc.)
- **4-hour timeframe**
- **Daily timeframe**
All three use the same CCI length (default 20, adjustable) and are fully customizable—you can enable/disable each line, change its timeframe, color, and thickness. Horizontal levels at 0 (dashed white by default), +100 (red), and -100 (green) are also included and fully editable.
### Core Functionality & Visual Signals
The standout feature is the **dynamic coloring of the current timeframe CCI line**:
- **Green**: Strong **bullish alignment**. This occurs when **all three CCIs are above the zero line** AND the current timeframe CCI is the **highest** of the three (leading the move upward with higher-timeframe confirmation).
- **Red**: Strong **bearish alignment**. This occurs when **all three CCIs are below the zero line** AND the current timeframe CCI is the **lowest** of the three (leading the move downward with higher-timeframe confirmation).
- **Yellow**: Neutral or no clear alignment (default state when the above conditions aren't met).
An optional light background shading (green or red) highlights when the indicator is in a bullish or bearish state.
Small triangle markers appear on the pane when a new bullish or bearish alignment forms, and built-in alerts notify you of new signals or when a signal ends. These are editable to enable or disable.
### How Traders Can Use It
This indicator helps identify **high-probability trend continuations or reversals** by combining momentum (CCI) across multiple timeframes with alignment confirmation:
- **Trend-following entries**: A green current line (especially with a fresh alert) suggests strong upward momentum backed by higher timeframes—ideal for long entries or adding to positions in an uptrend.
- **Bearish entries/short setups**: A red current line signals strong downward momentum confirmed across timeframes—good for short entries or exiting longs.
- **Confluence filter**: Use it as a filter for other strategies. Only take trades in the direction of the alignment (e.g., only long if current line is green).
- **Early warning of weakness**: When the current line turns yellow after being green/red, it often signals the trend is losing multi-timeframe support—useful for tightening stops or taking partial profits.
In essence, it visually answers the question: “Is the short-term momentum not only strong, but also aligned with and leading the medium- and long-term momentum?” When the answer is yes (green or red), it highlights moments of **multi-timeframe confluence**—some of the most reliable setups in technical trading.
The alerts make it practical for active traders: you get notified the moment a strong aligned signal appears, without needing to watch the chart constantly.
It's clean, highly customizable, and focuses on one clear concept—**multi-timeframe CCI leadership**—making it excellent for trend, swing, and even intraday traders looking for higher-timeframe confirmation.
發行說明
Updated to make the current timeframe CCI a dynamic color change line when it cross above or below the other 2 CCI lines then line will change to green or red. 發行說明
You can now disable 1 timeframe and still get crossover color signals for single or 2 different time frames發行說明
Fixed a bug related to scrolling. 開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。