OPEN-SOURCE SCRIPT

TF: Trend Phases Ribbon (TPR)

450
TradingFlow: Trend Phases Ribbon (TPR)

Most trend indicators put the market into one of two boxes: bullish or bearish. Price rarely moves that neatly. Bullish trends have pullbacks, bearish trends have rallies, and a change of direction usually passes through an uncertain stage first.

Trend Phases Ribbon keeps those stages visible on the chart. It shows the prevailing direction while also telling you whether the current move is supporting that direction, pushing against it, or moving into transition.

How it works

TPR uses two ALMA-smoothed trend paths. The thicker path responds more quickly to price, while the thinner path follows the broader trend. The model reads their direction and separation in the context of recent price movement, then assigns one of five phases. A separate short-term reading allows a pullback or rally to appear without immediately reversing the broader trend.

A crossover is only one part of the picture and does not decide the phase on its own.

Phase changes and event markers are confirmed when the bar closes. On the open bar, the responsive path can still move with price while the last confirmed phase remains in place.

Reading the colors

Green: Bullish
The broader trend and the shorter-term move are both bullish.

Light green: Bullish Pullback
The broader trend is still bullish, but the shorter-term move is pulling back against it.

Blue-gray: Transition
The previous directional phase has weakened, while a new bullish or bearish phase has not yet been confirmed. Price may continue in the new direction, return to the previous one, or spend some time without a clear bias.

Light pink: Bearish Rally
The broader trend is still bearish, but the shorter-term move is rallying against it.

Red: Bearish
The broader trend and the shorter-term move are both bearish.

Reading the ribbon

The thick line is the responsive trend path; the thin line is the broader trend path. When both slope in the same direction and the ribbon opens up, the move is becoming more clearly separated in that direction. When the ribbon narrows or the paths begin to turn toward each other, the trend is losing alignment and may be approaching a different phase.

Ribbon width shows the distance between the two paths. It is best read together with the color and slope rather than as a strength value on its own.

Markers and settings

A green circle with "U" appears when a bearish phase ends and an upward transition begins. A red circle with "D" marks the opposite change: a bullish phase has ended and a downward transition has started. These are early transition points. The next confirmed regime may appear later, or the market may return to its previous direction.

For a more detailed chart, the Display settings can show diamonds at confirmed bullish or bearish regime starts. Smaller pale circles can also mark the beginning of bullish pullbacks and bearish rallies. Both are hidden by default so the main ribbon stays clean. Alerts are available for these phase events and for any change in state.

Balanced is the general-purpose default. Fast follows shorter swings more closely, while Slow gives more weight to persistent trends. Custom mode is available when a symbol or timeframe needs a different response.

Practical use

Start with the ribbon color to identify the current phase, then look at its slope and width for context. Strong colors show that the broader trend and shorter-term move agree. Pale colors show a temporary move against the prevailing trend. Blue-gray tells you that the old phase has faded and the next one is still being decided.

TPR is designed for standard time-based charts and can be used across different symbols and chart timeframes.

---

TradingFlow: Trend Phases Ribbon (TPR)

很多趨勢指標只把行情分成多頭或空頭,但實際走勢通常不會一次翻面。多頭裡會有回調,空頭裡也會有反彈;真正換方向之前,往往還會先走過一段不明朗的過渡期。

Trend Phases Ribbon 想做的事情很直接:先看目前的大方向,再分辨眼前這一段是在順勢推進、逆勢回檔,還是已經進入轉換。

運作方式

TPR 以兩條經過 ALMA 平滑的趨勢線作為基礎。粗線對價格反應較快,細線則用來觀察較長一段的方向。判斷階段時,模型不只看兩條線有沒有交叉,也會參考線條的方向、距離,以及近期價格的變化,再把行情歸入五種狀態。

短線走勢另有一層判讀,所以多頭中的回調、空頭中的反彈,可以先反映在色帶上,不必因為一小段逆向波動就把主趨勢整個翻面。TPR 的判斷方式也因此和一般快線/慢線交叉指標不同。

階段切換和事件標記都在收 K 後確認。即時 K 線尚未收盤時,反應較快的粗線仍會跟著價格移動,但色帶會保留上一個已確認的階段。

顏色怎麼看

綠色:Bullish
主趨勢向上,短線走勢也在配合多頭方向。

淺綠色:Bullish Pullback
主趨勢仍然向上,但短線正在回調。這時看到的是多頭趨勢裡的逆向段落。

藍灰色:Transition
原本的方向已經轉弱,新的多頭或空頭階段則還沒確認。行情可能繼續換方向,也可能回到原來的趨勢,或者先橫行一段時間。

淺粉紅色:Bearish Rally
主趨勢仍然向下,但短線正在反彈。這是空頭趨勢裡的逆向段落。

紅色:Bearish
主趨勢向下,短線走勢也在配合空頭方向。

色帶怎麼看

粗線是反應較快的趨勢線,細線代表較長一段的方向。兩條線同時往上或往下,而且距離逐漸拉開,通常表示行情正朝該方向展開。色帶開始收窄,或兩條線轉向彼此靠近時,代表原本的配合正在減弱,接下來可能切換到另一個階段。

色帶寬度只是兩條趨勢線之間的距離。閱讀時要連同顏色和斜率一起看,不需要把寬度單獨當成強弱分數。兩線交叉也不會直接決定多空,最後仍以收 K 後確認的色帶階段為準。

標記與設定

綠色圓點和「U」表示空頭階段告一段落,行情開始進入向上的轉換;紅色圓點和「D」則表示多頭階段結束,向下的轉換剛開始。它們是階段交接的早期提示。之後可能確認新的趨勢,也可能繞一圈回到原來的方向。

想看得更細,可以在 Display 裡開啟菱形標記。它會標出多頭或空頭趨勢正式確認的位置。另一組淺色小圓點則用來標示多頭回調和空頭反彈的起點。這兩組標記預設關閉,畫面會比較乾淨;各種階段事件與狀態切換也都可以設定提示。

Balanced 是一般情況下的預設選擇。Fast 比較貼近短線擺動,Slow 偏向保留較持久的趨勢。若個別商品或週期需要不同反應,也可以使用 Custom 自行調整。

實際看盤

先看顏色,知道行情目前在哪一個階段,再看色帶的方向和寬窄。深色代表主趨勢與短線走勢同向;淺色代表價格正在逆著主趨勢走一段;變成藍灰色,則表示上一個階段已經淡出,下一個方向還在形成。

TPR 為標準時間型圖表而設,可套用在不同商品和圖表週期。

Pernyataan Penyangkalan

Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.