OPEN-SOURCE SCRIPT
Soothing Trades – Trend

What it shows
Two adaptive trend lines built from bar OHLC with ATR-based rails and an MFI-gated regime switch:
Short-term Trend — a stair-style line that “locks” in the current regime.
• If bullish (MFI ≥ 55), it tracks a rising floor based on low − ATR × Multiplier.
• If bearish (MFI ≤ 45), it tracks a falling ceiling based on high + ATR × Multiplier.
• Slope color: rising = Bull Color, falling = Bear Color.
• Optional Band Fill shows a second line offset by N bars with a shaded band.
Long-term Trend — same logic with fixed parameters (Coeff 12, Period 24) and fully customizable style (line, breaks, step, circles, columns, histogram).
How to use
Choose Visualization: single slope-colored line or two-line band with fill.
Tune Multiplier and Common Period to your symbol/timeframe’s volatility.
Use the Long-term line as a higher-order filter (e.g., trade in its direction) and the Short-term line for timing/structure.
Signals are informational; confirm with your own process (price action, volume, levels, etc.).
House-Rules & transparency
This script uses bar data only (OHLC, ATR, MFI). It does not access or claim historical tick data.
Values update intrabar; final states are determined at bar close.
No promises of performance or future results. Educational use only.
Notes
MFI thresholds (55/45) form a simple state machine; feel free to test alternative gates for your market.
The band option is visual—signals do not depend on the fil
Two adaptive trend lines built from bar OHLC with ATR-based rails and an MFI-gated regime switch:
Short-term Trend — a stair-style line that “locks” in the current regime.
• If bullish (MFI ≥ 55), it tracks a rising floor based on low − ATR × Multiplier.
• If bearish (MFI ≤ 45), it tracks a falling ceiling based on high + ATR × Multiplier.
• Slope color: rising = Bull Color, falling = Bear Color.
• Optional Band Fill shows a second line offset by N bars with a shaded band.
Long-term Trend — same logic with fixed parameters (Coeff 12, Period 24) and fully customizable style (line, breaks, step, circles, columns, histogram).
How to use
Choose Visualization: single slope-colored line or two-line band with fill.
Tune Multiplier and Common Period to your symbol/timeframe’s volatility.
Use the Long-term line as a higher-order filter (e.g., trade in its direction) and the Short-term line for timing/structure.
Signals are informational; confirm with your own process (price action, volume, levels, etc.).
House-Rules & transparency
This script uses bar data only (OHLC, ATR, MFI). It does not access or claim historical tick data.
Values update intrabar; final states are determined at bar close.
No promises of performance or future results. Educational use only.
Notes
MFI thresholds (55/45) form a simple state machine; feel free to test alternative gates for your market.
The band option is visual—signals do not depend on the fil
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.