PROTECTED SOURCE SCRIPT

RSI AND SMA -- BUY AND SELL SIGNAL

38
RSI and SMA - Buy and Sell Signal

This script generates Buy and Sell signals using a combination of price action, RSI momentum, and SMA trend filtering to provide clean, non-repetitive entries. It is designed for clarity and simplicity, reducing signal noise through strict conditions.

📌 Signal Logic

✅ Buy Signal:
RSI is above its 5-period SMA (bullish momentum).

The entire candle (including wicks) is above the 5-period price SMA.
Candle is bullish (close > open).
No existing Buy/Sell trend is active (prevents repeated signals).


🔻 Sell Signal:
RSI is below its 5-period SMA (bearish momentum).
The entire candle is below the 5-period price SMA.
Candle is bearish (close < open).
No existing Buy/Sell trend is active.


🔁 Trend Memory Filter
Once a Buy or Sell signal is triggered, no additional signals are given until the opposite candle structure resets the trend (i.e., full candle moves in the opposite direction of current trend).

This eliminates repeated entries and helps follow a clear trend bias.


📊 Visual Elements

Buy signals are marked with a green triangle below the bar.
Sell signals are marked with a red triangle above the bar.
A 5-period SMA line is plotted in orange as a reference trend line.


⚙️ Key Features

Uses both price and RSI filters to confirm signals.
Ensures fully closed candles above or below SMA to improve reliability.
Non-repeating logic makes it trend-friendly and suitable for traders who prefer clean entries.
Great for use with trend-following strategies or momentum-based systems.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.