OPEN-SOURCE SCRIPT

Soothing Trades – Trend

90
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

إخلاء المسؤولية

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.