PROTECTED SOURCE SCRIPT

[X342] Trend Compass

6
[X342] Trend Compass — MTF Signal System

OVERVIEW
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Trend Compass is an ATR-based trend following indicator that combines momentum analysis with optional engulfing pattern confirmation. It provides clear BUY/SELL signals with two operational modes for different trading styles.

METHODOLOGY
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The indicator uses a unique approach combining:

1. ATR-Based Dynamic Trend Line
- Calculates Average True Range over configurable period
- Creates adaptive support/resistance zones using ATR × Multiplier
- Trend direction determined by momentum indicator (MFI or RSI)

2. Momentum Classification
- Uses Money Flow Index (MFI) when volume data is available
- Falls back to RSI for instruments without volume
- Above 50 = Bullish momentum → calculates uptrend line
- Below 50 = Bearish momentum → calculates downtrend line

3. Engulfing Pattern Confirmation (Confirmed Mode)
- Detects Grade-A engulfing patterns (configurable scale)
- Validates candle size against minimum threshold
- Lookback period for pattern matching with trend signals

SIGNAL MODES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
• BASIC Mode: Signals generated on trend line crossovers only
• CONFIRMED Mode: Requires both trend crossover AND engulfing pattern

BUY Signal: Trend line crosses above its lagged value (+ engulfing in Confirmed mode)
SELL Signal: Trend line crosses below its lagged value (+ engulfing in Confirmed mode)

FEATURES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✓ Dual language support (English / Türkçe)
✓ Two signal modes for flexibility
✓ Engulfing pattern grade filtering
✓ Visual trend fill between lines
✓ Comprehensive alert conditions
✓ Info panel showing current status

SETTINGS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
General:
- Language: English / Türkçe

Trend Settings:
- Signal Mode: Basic or Confirmed
- Multiplier: ATR multiplier (default: 1.0)
- Period: Lookback period (default: 14)
- Source: Price source for calculations
- No Volume Data: Use RSI instead of MFI

Engulfing Settings:
- Engulfing Scale: Minimum size ratio (default: 1.5x)
- Min Candle Size: Absolute minimum size filter
- Lookback: Bars to search for engulfing (default: 3)

ALERTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
• BUY Signal / SELL Signal
• Confirmed BUY / Confirmed SELL
• Bullish Engulfing / Bearish Engulfing
• Price Cross (trend line cross)

BEST PRACTICES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
- Use CONFIRMED mode for higher quality signals with fewer false positives
- Use BASIC mode for more frequent signals in trending markets
- Combine with support/resistance or liquidity zones for entry refinement
- Higher multiplier values reduce sensitivity (good for volatile assets)

Disclaimer

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.