OU Trend Channel Pro
Adaptive trend channel with coloured bars, trap markers and a status table.

Overview
A trend channel whose width adapts to volatility and money flow. Bars are coloured by trend state, cross markers flag failed breakouts (traps), and a compact table summarises the stretch from the mean. Graphs runs the original Pine Script on live candles.
How it is built
- 1
Build a baseline from a ribbon of moving averages (exponential and Hull), averaged into one smooth trend line.
- 2
Measure money flow and volatility to set the width of the bands around the baseline, so the channel breathes with the market.
- 3
Score how far price is from the baseline in standard units, in the spirit of an Ornstein–Uhlenbeck mean-reversion model.
- 4
Colour bars by position relative to the baseline and bands, and confirm the trend against a higher timeframe.
- 5
Flag traps: breakouts beyond a band that close back inside within a few bars.
How to read it
- Bar colour gives the trend state; the channel edges are adaptive, not fixed levels.
- A cross marks a breakout that reversed; on its own it is context, not an entry rule.
- The table shows the current stretch from the mean in standard units.
Limits
- Trend filters lag by construction: the colour changes after the turn, not before.
- In a tight range the channel flips often; read the stretch, not each flip.
Data
- Binance candles (BTC, ETH), live, from 15 minutes to daily.
- The Pine Script is executed in your browser.
