INVITE-ONLY SCRIPT
已更新 Bullish Trend Structure & Streak Tracker

Bullish Trend Structure & Streak Tracker
The Bull Trend Structure & Streak Tracker combines three user-defined exponential moving averages with a trend ribbon, timeframe-specific EMA breakdown markers, and historical price-persistence statistics.
The indicator is designed to help traders evaluate the current Bull Trend structure, identify consecutive closes below the intermediate EMA, and compare the current duration of price strength with historical trend persistence.
Bull Trend Structure
The indicator uses three independently configurable EMAs:
• EMA 1 — Fast EMA
• EMA 2 — Intermediate EMA
• EMA 3 — Slow EMA
The EMA lengths can be customized for any market or timeframe.
A bullish EMA structure occurs when:
EMA 1 > EMA 2 > EMA 3
A bearish EMA structure occurs when:
EMA 1 < EMA 2 < EMA 3
Trend Ribbon
The area between EMA 2 and EMA 3 is shaded according to the confirmed EMA trend structure.
Bullish Trend
When EMA 1 is above EMA 2 and EMA 2 is above EMA 3, the ribbon displays the selected bullish color.
Bearish Trend
When EMA 1 is below EMA 2 and EMA 2 is below EMA 3, the ribbon displays the selected bearish color.
During transitional periods when the three EMAs are not fully aligned, the ribbon retains the most recently confirmed bullish or bearish trend state.
This provides a visual representation of the broader EMA structure while allowing the user to monitor the individual EMA lines directly.
Bullish Trend Breakdown Signals
The indicator identifies closes below EMA 2 using the timeframe currently selected on the chart.
The signals are therefore timeframe-specific.
For example:
• On a 5-minute chart, signals are based on 5-minute closes.
• On a 1-hour chart, signals are based on 1-hour closes.
• On a daily chart, signals are based on daily closes.
• On a weekly chart, signals are based on weekly closes.
Orange Triangle
An orange downward triangle appears below a bar when that bar closes below EMA 2 and the immediately preceding bar did not close below EMA 2.
This identifies the first consecutive close below EMA 2.
Red Triangle
A red downward triangle appears below a bar when that bar closes below EMA 2 and the immediately preceding bar also closed below EMA 2.
This identifies the second consecutive close below EMA 2.
The signals are based on confirmed bar closes and automatically adapt to the chart's current timeframe.
Price Streak Tracker
Following a bullish EMA transition, the indicator tracks how many consecutive bars price remains above EMA 2.
Tracking begins when either EMA 1 or EMA 2 crosses above EMA 3 while both EMA 1 and EMA 2 are positioned above EMA 3.
Once tracking begins, each bar that closes above EMA 2 adds one bar to the current streak.
The streak ends when price closes below EMA 2 as long as the bullish trend structure is intact.
This provides a measurement of trend persistence following a bullish EMA structure.
Historical Streak Statistics
The dashboard displays four measurements:
Current
The number of consecutive bars price has remained above EMA 2 during the active tracking period.
Median
The median length of completed historical price-above-EMA-2 streaks.
Average
The average length of completed historical streaks.
Max
The longest completed streak recorded within the available chart history.
These statistics provide historical context for the duration of the current trend.
Dashboard
The on-chart dashboard displays the current streak along with the historical median, average, and maximum streak.
The dashboard can be positioned in:
• Top Right
• Top Left
• Bottom Right
• Bottom Left
User Inputs
EMA Settings
EMA 1 Length
Defines the period used for the fast-moving average.
EMA 2 Length
Defines the period used for the intermediate moving average. EMA 2 is also the reference EMA for the price-persistence calculation and consecutive-close breakdown signals.
EMA 3 Length
Defines the period used for the slow moving average.
All three EMA lengths are independently configurable.
Ribbon Settings
Bullish Ribbon Color
Sets the color displayed when the EMA structure is bullish.
Bearish Ribbon Color
Sets the color displayed when the EMA structure is bearish.
Dashboard
Dashboard Position
Controls the location of the statistical dashboard on the chart.
How to Use
The indicator can be used as a bullish trend-structure and trend-persistence analysis tool.
The EMA ribbon provides an immediate visual representation of the broader EMA relationship. The three EMA lines allow the user to evaluate the underlying trend structure directly.
The EMA 2 breakdown markers provide an additional visual reference when price begins closing below the intermediate EMA:
• Orange triangle: first close below EMA 2
• Red triangle: second consecutive close below EMA 2
Because the signals use the current chart timeframe, the same indicator can be applied across multiple timeframes without changing the underlying signal logic.
The streak dashboard provides additional historical context by comparing the current duration of price strength above EMA 2 with previously completed streaks.
Important Notes
EMA calculations are inherently lagging and should not be interpreted as predictions of future price movement.
Historical streak statistics depend on the symbol, timeframe, EMA settings, and amount of historical data available on the chart. Changing the EMA lengths or chart timeframe will change the resulting statistics.
The indicator is an analytical tool and does not constitute financial advice or a recommendation to buy or sell any security or derivative.
The Bull Trend Structure & Streak Tracker combines three user-defined exponential moving averages with a trend ribbon, timeframe-specific EMA breakdown markers, and historical price-persistence statistics.
The indicator is designed to help traders evaluate the current Bull Trend structure, identify consecutive closes below the intermediate EMA, and compare the current duration of price strength with historical trend persistence.
Bull Trend Structure
The indicator uses three independently configurable EMAs:
• EMA 1 — Fast EMA
• EMA 2 — Intermediate EMA
• EMA 3 — Slow EMA
The EMA lengths can be customized for any market or timeframe.
A bullish EMA structure occurs when:
EMA 1 > EMA 2 > EMA 3
A bearish EMA structure occurs when:
EMA 1 < EMA 2 < EMA 3
Trend Ribbon
The area between EMA 2 and EMA 3 is shaded according to the confirmed EMA trend structure.
Bullish Trend
When EMA 1 is above EMA 2 and EMA 2 is above EMA 3, the ribbon displays the selected bullish color.
Bearish Trend
When EMA 1 is below EMA 2 and EMA 2 is below EMA 3, the ribbon displays the selected bearish color.
During transitional periods when the three EMAs are not fully aligned, the ribbon retains the most recently confirmed bullish or bearish trend state.
This provides a visual representation of the broader EMA structure while allowing the user to monitor the individual EMA lines directly.
Bullish Trend Breakdown Signals
The indicator identifies closes below EMA 2 using the timeframe currently selected on the chart.
The signals are therefore timeframe-specific.
For example:
• On a 5-minute chart, signals are based on 5-minute closes.
• On a 1-hour chart, signals are based on 1-hour closes.
• On a daily chart, signals are based on daily closes.
• On a weekly chart, signals are based on weekly closes.
Orange Triangle
An orange downward triangle appears below a bar when that bar closes below EMA 2 and the immediately preceding bar did not close below EMA 2.
This identifies the first consecutive close below EMA 2.
Red Triangle
A red downward triangle appears below a bar when that bar closes below EMA 2 and the immediately preceding bar also closed below EMA 2.
This identifies the second consecutive close below EMA 2.
The signals are based on confirmed bar closes and automatically adapt to the chart's current timeframe.
Price Streak Tracker
Following a bullish EMA transition, the indicator tracks how many consecutive bars price remains above EMA 2.
Tracking begins when either EMA 1 or EMA 2 crosses above EMA 3 while both EMA 1 and EMA 2 are positioned above EMA 3.
Once tracking begins, each bar that closes above EMA 2 adds one bar to the current streak.
The streak ends when price closes below EMA 2 as long as the bullish trend structure is intact.
This provides a measurement of trend persistence following a bullish EMA structure.
Historical Streak Statistics
The dashboard displays four measurements:
Current
The number of consecutive bars price has remained above EMA 2 during the active tracking period.
Median
The median length of completed historical price-above-EMA-2 streaks.
Average
The average length of completed historical streaks.
Max
The longest completed streak recorded within the available chart history.
These statistics provide historical context for the duration of the current trend.
Dashboard
The on-chart dashboard displays the current streak along with the historical median, average, and maximum streak.
The dashboard can be positioned in:
• Top Right
• Top Left
• Bottom Right
• Bottom Left
User Inputs
EMA Settings
EMA 1 Length
Defines the period used for the fast-moving average.
EMA 2 Length
Defines the period used for the intermediate moving average. EMA 2 is also the reference EMA for the price-persistence calculation and consecutive-close breakdown signals.
EMA 3 Length
Defines the period used for the slow moving average.
All three EMA lengths are independently configurable.
Ribbon Settings
Bullish Ribbon Color
Sets the color displayed when the EMA structure is bullish.
Bearish Ribbon Color
Sets the color displayed when the EMA structure is bearish.
Dashboard
Dashboard Position
Controls the location of the statistical dashboard on the chart.
How to Use
The indicator can be used as a bullish trend-structure and trend-persistence analysis tool.
The EMA ribbon provides an immediate visual representation of the broader EMA relationship. The three EMA lines allow the user to evaluate the underlying trend structure directly.
The EMA 2 breakdown markers provide an additional visual reference when price begins closing below the intermediate EMA:
• Orange triangle: first close below EMA 2
• Red triangle: second consecutive close below EMA 2
Because the signals use the current chart timeframe, the same indicator can be applied across multiple timeframes without changing the underlying signal logic.
The streak dashboard provides additional historical context by comparing the current duration of price strength above EMA 2 with previously completed streaks.
Important Notes
EMA calculations are inherently lagging and should not be interpreted as predictions of future price movement.
Historical streak statistics depend on the symbol, timeframe, EMA settings, and amount of historical data available on the chart. Changing the EMA lengths or chart timeframe will change the resulting statistics.
The indicator is an analytical tool and does not constitute financial advice or a recommendation to buy or sell any security or derivative.
發行說明
Change 1: Updated the Dashboard to show whether the current bullish trend structure is expanding or contracting. The dashboard will show a green up arrow for expanding or a red down arrow for contracting.僅限邀請腳本
只有作者授權的用戶才能訪問此腳本。您需要申請並獲得使用許可。通常情況下,付款後即可獲得許可。更多詳情,請按照下方作者的說明操作,或直接聯絡Squatch_Trader。
TradingView不建議在未完全信任作者並了解其運作方式的情況下購買或使用腳本。您也可以在我們的社群腳本中找到免費的開源替代方案。
作者的說明
Please message the Author directly for access pending subscription based access.
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
僅限邀請腳本
只有作者授權的用戶才能訪問此腳本。您需要申請並獲得使用許可。通常情況下,付款後即可獲得許可。更多詳情,請按照下方作者的說明操作,或直接聯絡Squatch_Trader。
TradingView不建議在未完全信任作者並了解其運作方式的情況下購買或使用腳本。您也可以在我們的社群腳本中找到免費的開源替代方案。
作者的說明
Please message the Author directly for access pending subscription based access.
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。