OPEN-SOURCE SCRIPT
Trend Health [FEELS]

A trend rarely dies suddenly. It fades first: the move gets inefficient and counter-trend candles grow heavier. Trend Health paints that fading straight onto a supertrend-style ATR trail, and tightens the stop while it happens.
The band is saturated green or red while the trend is strong. As health decays the color drains toward amber, an amber dot prints where the dying starts, and the trail contracts under price so a weak trend exits earlier than a fixed stop would.
QUICK START
Add it to a chart and read the color. Bright band: trend intact, trail at full width. Fading band: trend losing quality, stop contracting. Amber band: dying trend, elevated flip risk. Scroll the history: most flips carry an amber warning dot some bars before them. The strip along the bottom compresses the full health history into one regime line, and the label at the right edge shows direction, state and the current health score.
HOW IT WORKS
Two layers: a health score, and a trail that consumes it.
Health score, computed every bar over the Health lookback window:
1. Directional efficiency. Kaufman efficiency ratio (net move divided by the sum of absolute bar-to-bar moves), zeroed when the net move points against the active trend, normalized so a reading of 0.5 counts as fully efficient.
2. Momentum side. RSI distance from the 50 line in the direction of the trend, scaled over 25 points.
3. Impulse asymmetry. Candle bodies printed with the trend versus against it over the window. When counter-trend bodies grow, this component decays before price structure breaks.
These three form the core score (weights 0.45 / 0.30 / 0.25). The displayed health adds a fourth read, the distance between price and the trail in ATR units, at 25 percent weight. The score is EMA-smoothed and resets on every flip.
The trail is a ratchet ATR stop built from scratch. Base width is ATR times the multiplier. With Adaptive tightening on, the effective multiplier is scaled by the core score, so a healthy trend trails at full width while a dying trend gets a progressively tighter stop. The distance component is excluded from the core on purpose, otherwise tightening would lower the score and tighten further in a loop. Toggle it off and you get a classic fixed-width trail; the health engine then only drives the color.

HOW TO USE
- Color is the instruction. Enter or hold on a saturated band, tighten manually or stand aside on amber.
- The dying alert fires when health crosses under the threshold while the trend is still running. On past data many flips were preceded by exactly this transition. Treat it as a condition read, not a forecast.
- Four alerts: flip up, flip down, trend dying, trend recovered.
- Designed on 4H to 1W. Works on any symbol and timeframe; on low timeframes expect more flips, especially in ranges with adaptive mode on.

PARAMETERS
- ATR length / ATR multiplier: trail geometry at full health.
- Adaptive tightening: health-driven contraction of the trail, on by default.
- Health lookback: window for the efficiency, momentum and asymmetry reads.
- Health smoothing: EMA on the raw score.
- Dying threshold: below this level the trend counts as dying; drives the amber floor, the warning dot, the label and the alert.
- Display toggles: trend fill, bar coloring, flip markers, dying warnings, health ribbon, status label.
- Sizing: marker size, label size and trail width are adjustable.
NOTES
- The trail state confirms at bar close. On the live bar the level and color can update until close.
- Health describes the present condition of the trend. It does not predict future prices.
- A dying warning is a condition mark, not an exit signal: health can recover and the trend can resume. Sharp reversals can flip a trend straight from high health without any warning printed.
- Adaptive mode trades later giveback for earlier exits, so in choppy ranges it flips more often than a fixed trail. That is the design, not a defect.
ORIGINALITY
The ratchet ATR trail is a classic public-domain concept reimplemented from scratch. What is original here is the three-component health model, the gradient mapping of that score onto the trail, bars and ribbon, and the feedback of the score into the stop width itself, which makes the flip points measurably different from a standard fixed-factor trail. RSI and the efficiency ratio are not displayed as separate indicators; they exist only as inputs to one scoring model. This is a single system, not a mashup.
The band is saturated green or red while the trend is strong. As health decays the color drains toward amber, an amber dot prints where the dying starts, and the trail contracts under price so a weak trend exits earlier than a fixed stop would.
QUICK START
Add it to a chart and read the color. Bright band: trend intact, trail at full width. Fading band: trend losing quality, stop contracting. Amber band: dying trend, elevated flip risk. Scroll the history: most flips carry an amber warning dot some bars before them. The strip along the bottom compresses the full health history into one regime line, and the label at the right edge shows direction, state and the current health score.
HOW IT WORKS
Two layers: a health score, and a trail that consumes it.
Health score, computed every bar over the Health lookback window:
1. Directional efficiency. Kaufman efficiency ratio (net move divided by the sum of absolute bar-to-bar moves), zeroed when the net move points against the active trend, normalized so a reading of 0.5 counts as fully efficient.
2. Momentum side. RSI distance from the 50 line in the direction of the trend, scaled over 25 points.
3. Impulse asymmetry. Candle bodies printed with the trend versus against it over the window. When counter-trend bodies grow, this component decays before price structure breaks.
These three form the core score (weights 0.45 / 0.30 / 0.25). The displayed health adds a fourth read, the distance between price and the trail in ATR units, at 25 percent weight. The score is EMA-smoothed and resets on every flip.
The trail is a ratchet ATR stop built from scratch. Base width is ATR times the multiplier. With Adaptive tightening on, the effective multiplier is scaled by the core score, so a healthy trend trails at full width while a dying trend gets a progressively tighter stop. The distance component is excluded from the core on purpose, otherwise tightening would lower the score and tighten further in a loop. Toggle it off and you get a classic fixed-width trail; the health engine then only drives the color.
HOW TO USE
- Color is the instruction. Enter or hold on a saturated band, tighten manually or stand aside on amber.
- The dying alert fires when health crosses under the threshold while the trend is still running. On past data many flips were preceded by exactly this transition. Treat it as a condition read, not a forecast.
- Four alerts: flip up, flip down, trend dying, trend recovered.
- Designed on 4H to 1W. Works on any symbol and timeframe; on low timeframes expect more flips, especially in ranges with adaptive mode on.
PARAMETERS
- ATR length / ATR multiplier: trail geometry at full health.
- Adaptive tightening: health-driven contraction of the trail, on by default.
- Health lookback: window for the efficiency, momentum and asymmetry reads.
- Health smoothing: EMA on the raw score.
- Dying threshold: below this level the trend counts as dying; drives the amber floor, the warning dot, the label and the alert.
- Display toggles: trend fill, bar coloring, flip markers, dying warnings, health ribbon, status label.
- Sizing: marker size, label size and trail width are adjustable.
NOTES
- The trail state confirms at bar close. On the live bar the level and color can update until close.
- Health describes the present condition of the trend. It does not predict future prices.
- A dying warning is a condition mark, not an exit signal: health can recover and the trend can resume. Sharp reversals can flip a trend straight from high health without any warning printed.
- Adaptive mode trades later giveback for earlier exits, so in choppy ranges it flips more often than a fixed trail. That is the design, not a defect.
ORIGINALITY
The ratchet ATR trail is a classic public-domain concept reimplemented from scratch. What is original here is the three-component health model, the gradient mapping of that score onto the trail, bars and ribbon, and the feedback of the score into the stop width itself, which makes the flip points measurably different from a standard fixed-factor trail. RSI and the efficiency ratio are not displayed as separate indicators; they exist only as inputs to one scoring model. This is a single system, not a mashup.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
💰Free Channel — t.me/FeelsStrategy
🤵For more info contact — t.me/VolodymyrFeels
🔗 Links — feelsstrategy.com/links
🤵For more info contact — t.me/VolodymyrFeels
🔗 Links — feelsstrategy.com/links
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
💰Free Channel — t.me/FeelsStrategy
🤵For more info contact — t.me/VolodymyrFeels
🔗 Links — feelsstrategy.com/links
🤵For more info contact — t.me/VolodymyrFeels
🔗 Links — feelsstrategy.com/links
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.