PROTECTED SOURCE SCRIPT

RSI‑MA Near‑Level Alert

27
RSI‑MA Near‑Level Alert — Publication Description
Overview
RSI‑MA Near‑Level Alert plots a smoothed Relative Strength Index (RSI) line and sends automatic alerts whenever that line comes within a user‑defined distance of two key thresholds (default = 70 for overbought, 30 for oversold). It is designed for traders who want an early warning—before a classic 70/30 cross—so they can tighten stops, scale out, or prepare reversal setups.

How It Works
RSI Calculation – Uses the standard RSI (default length 14).

Smoothing – Applies a moving‑average (default Simple 10) to reduce noise.

Proximity Logic – On every bar, the script measures the absolute distance between the smoothed RSI line and each threshold.

If the distance ≤ the Proximity setting (default 1 point), the condition flips to true.

Built‑in Alert Triggers – Two alertcondition() calls are embedded:

“RSI MA near UPPER level”

“RSI MA near LOWER level”
Select either one (or both) from the TradingView alert dialog and choose your delivery method (popup, e‑mail, SMS, webhook).

Inputs
Input Default Purpose
RSI Length 14 Core momentum look‑back.
Smoothing MA Length 10 Length of the MA applied to RSI.
Upper Level 70 Overbought line.
Lower Level 30 Oversold line.
Alert Proximity (points) 1.0 How close (in RSI points) the MA must get to trigger.

All inputs are fully editable after you add the script to a chart.

Typical Use‑Cases
Pre‑emptive Exits – Get notified when momentum is stalling near 70 or 30 so you can lock in gains before a reversal.

Reversal Hunting – Combine the alert with price‑action patterns (pin bars, engulfing candles) for higher‑probability fades.

Breakout Confirmation – Increase Upper Level to 80 / Lower Level to 20 and lower Proximity to 0.5 for more aggressive trend‑following alerts.

Step‑by‑Step Alert Setup
Add the script to your chart.

Click the alarm‑clock‑plus icon (or press Alt + A).

In “Condition,” select RSI‑MA Near‑Level Alert.

Choose either RSI MA near UPPER level or RSI MA near LOWER level.

Pick Once Per Bar Close for confirmed signals or Once Per Bar for real‑time.

Select your preferred notification methods and click Create.
(Repeat for the opposite threshold.)

Customization Tips
Change Smoothing Type – Replace ta.sma() with ta.ema(), ta.rma(), etc., directly in the code if you prefer another MA.

Track Multiple Assets – Apply the indicator to each symbol in a multi‑chart layout and set independent alerts.

Narrow Range Play – Set Upper = 60, Lower = 40 and Proximity = 0.5 to monitor a quiet‑momentum band.

Disclaimer
This script is provided for educational purposes only. It does not constitute financial advice, and past performance is not indicative of future results. Always back‑test and validate on demo data before risking live capital. The author assumes no liability for trading losses or platform malfunctions.

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.