Trend Regime Engine [builtbyuba]

I built Trend Regime Engine (TRE) to bring adaptive trend direction, confirmed swing structure and nearby price levels into one overlay. Aurora is the visual layer: a smooth trail and a soft band that make the active regime easy to follow.
How I read it
I start with TRE UP / TRE DOWN, then check the trend quality, higher timeframes and confirmed swings. These readings answer different questions, so I keep them separate.

In this BTC 2H example, TRE has turned up while the confirmed swings still show a lower high and a lower low. The dashboard explicitly says “differs from TRE.” I read this as an early regime change within a structure that has not yet turned upward. The 4H and daily TRE readings are also mixed.
The dots mark closed-bar regime changes. I use them to identify a change in direction; they are not entry orders with built-in stops or targets.
What the trail adapts to
I run several ATR trails and score their recent direction-correct price movement. I group those scores into three clusters and gradually move the active factor toward the highest-scoring cluster. With the defaults, the candidates are 1.5, 2.0, 2.5 and 3.0.
The noise gate adds an optional ATR buffer to the flip rules. Aurora smoothing changes the displayed line, not the underlying direction logic.

Here the BTC 4H TRE remains down even as price rebounds. The quality reading is only 1/100: recent movement is choppy. I do not interpret low quality as a reversal signal.
I calculate trend quality from price-path efficiency and the R² of price against time, over 20 bars by default. It describes the recent move, not the probability of a profitable trade. The Q beside a pattern is a separate geometric-quality score.
Structure and higher timeframes
I include confirmed swings, supply/demand zones, BOS/CHoCH, equal highs/lows and previous day/week levels. The dashboard keeps this context visible without drawing every level across the chart. Optional pattern drawings cover reversals, triangles, wedges, flags, pennants, channels and rectangles.
My higher-timeframe chips use the same adaptive TRE engine, calculated on the last completed bar of each requested timeframe. An equal or lower timeframe is shown as a dash. This gives confirmed context, with the delay that confirmation requires.
Settings and alerts
I built the defaults around 2H/4H charts. I can switch between Desktop, Compact and Mobile views, move the dashboard, show extra structure levels or draw the top pattern. The three alerts are Trend up, Trend down and New pattern found.
TRE commits direction and structure changes on closed bars. Swings need right-hand bars for confirmation—four on 2H and three on 4H by default—and drawings are then anchored to those earlier swing points. Patterns can develop, break, expire or return inside. Live price, the price edge of the band and distances to levels can still move during the current candle. Ranges can produce repeated flips, and zones can fail.
Credits
I adapted the structure and pattern engine from my own Pattern Structure Pro. The trend-engine concept was inspired by LuxAlgo’s SuperTrend AI (Clustering), with an independent implementation. TRE is licensed under CC BY-NC-SA 4.0.
How I read it
I start with TRE UP / TRE DOWN, then check the trend quality, higher timeframes and confirmed swings. These readings answer different questions, so I keep them separate.
In this BTC 2H example, TRE has turned up while the confirmed swings still show a lower high and a lower low. The dashboard explicitly says “differs from TRE.” I read this as an early regime change within a structure that has not yet turned upward. The 4H and daily TRE readings are also mixed.
The dots mark closed-bar regime changes. I use them to identify a change in direction; they are not entry orders with built-in stops or targets.
What the trail adapts to
I run several ATR trails and score their recent direction-correct price movement. I group those scores into three clusters and gradually move the active factor toward the highest-scoring cluster. With the defaults, the candidates are 1.5, 2.0, 2.5 and 3.0.
The noise gate adds an optional ATR buffer to the flip rules. Aurora smoothing changes the displayed line, not the underlying direction logic.
Here the BTC 4H TRE remains down even as price rebounds. The quality reading is only 1/100: recent movement is choppy. I do not interpret low quality as a reversal signal.
I calculate trend quality from price-path efficiency and the R² of price against time, over 20 bars by default. It describes the recent move, not the probability of a profitable trade. The Q beside a pattern is a separate geometric-quality score.
Structure and higher timeframes
I include confirmed swings, supply/demand zones, BOS/CHoCH, equal highs/lows and previous day/week levels. The dashboard keeps this context visible without drawing every level across the chart. Optional pattern drawings cover reversals, triangles, wedges, flags, pennants, channels and rectangles.
My higher-timeframe chips use the same adaptive TRE engine, calculated on the last completed bar of each requested timeframe. An equal or lower timeframe is shown as a dash. This gives confirmed context, with the delay that confirmation requires.
Settings and alerts
I built the defaults around 2H/4H charts. I can switch between Desktop, Compact and Mobile views, move the dashboard, show extra structure levels or draw the top pattern. The three alerts are Trend up, Trend down and New pattern found.
TRE commits direction and structure changes on closed bars. Swings need right-hand bars for confirmation—four on 2H and three on 4H by default—and drawings are then anchored to those earlier swing points. Patterns can develop, break, expire or return inside. Live price, the price edge of the band and distances to levels can still move during the current candle. Ranges can produce repeated flips, and zones can fail.
Credits
I adapted the structure and pattern engine from my own Pattern Structure Pro. The trend-engine concept was inspired by LuxAlgo’s SuperTrend AI (Clustering), with an independent implementation. TRE is licensed under CC BY-NC-SA 4.0.
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。