Direction Compass: RSI Trend Regime Filter

508
Direction Compass is a slow, calm trend-direction filter. It does not look for overbought or oversold points. It answers one question on every closed candle: is the market in a BULL, NEUTRAL or BEAR regime?

HOW IT WORKS
1. Source: ohlc4, the average of open, high, low and close of each candle.
2. The source is smoothed with a short EMA (default 3) to remove single-candle noise.
3. A long RSI (default 89) is calculated on the smoothed price. 50 is subtracted, so the score moves around zero.
4. A neutral band (default +/-5) splits the score into three states:
- Score above +5 = BULL
- Score below -5 = BEAR
- Between -5 and +5 = NEUTRAL

SIGNALS
- BUY: the score crosses above the upper band (BULL starts).
- EXIT: the score falls to or below the upper band (BULL ends).
- Signals are confirmed only when the candle closes. The script does not repaint and does not request data from other timeframes.

WHY IT IS DIFFERENT FROM A NORMAL RSI
A classic RSI(14) with 70/30 levels is a fast oscillator and flips very often. Direction Compass uses RSI in a different way, as a trend regime measure:
- The RSI is calculated on pre-smoothed ohlc4, not on raw close, so single wicks and closes move it less.
- The length is long (89), so the score follows the trend, not the swing.
- The zero-centered neutral band stops the state from flipping when momentum is weak.
- The BEAR state is designed as "stay out", not as a short signal.

HOW TO USE
- Built for 4h charts on liquid markets. On lower timeframes, use a longer length.
- BULL: consider holding long positions. NEUTRAL or BEAR: stay flat.
- It also works as a filter for other systems: only take long setups while the state is BULL.
- Alerts: BUY, EXIT and BEAR. Set them to "Once per bar close".

VISUALS
- Lower pane: score line with a red-to-green gradient, histogram columns, dashed band lines and a grey neutral zone.
- Price chart: candle colors and a soft background by state, plus BUY and EXIT labels.
- Info panel: direction, action, score, strength (0-100%) and how many candles the current state has lasted.
- All colors and visual parts can be turned on or off in the settings.

SETTINGS
- Source (default ohlc4)
- Smoothing EMA length (default 3)
- Momentum RSI length (default 89)
- Neutral band (default 5)

LIMITATIONS
- It is a slow trend tool. It enters after a move has started and exits after it has turned, so it always gives back part of each move.
- In sideways markets it makes many small losing signals. A low win rate with larger winners is normal for this type of tool.
- The BEAR state is not a reliable short signal on its own.
- Do not use it on Heikin Ashi, Renko or other non-standard chart types. The signals must be calculated on real candles.
- Past behavior does not guarantee future results. This is not financial advice.

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

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.