OPEN-SOURCE SCRIPT
RSI Overbought Oversold Alert

█ OVERVIEW
A clean RSI indicator with overbought/oversold alerts that fire only once per crossing — not repeatedly while price stays in the zone.
Built to fix a common frustration: TradingView's default RSI alert keeps firing every bar while RSI stays above or below the threshold. This script uses crossover/crossunder detection so you get notified at the moment RSI crosses the level, and nothing more until it crosses again.
█ FEATURES
● Customizable overbought and oversold levels (default 70/30)
● Alerts trigger only on the crossing bar, not throughout the zone
● MA overlay on RSI (SMA, EMA, SMMA/RMA, WMA, VWMA)
● MA crossover alerts included
● Color-coded overbought, oversold, and middle zones
● All colors fully customizable
█ ALERTS (4 types)
- RSI Overbought Alert — RSI crosses above the overbought level
- RSI Oversold Alert — RSI crosses below the oversold level
- RSI Crossed Above MA — RSI crosses above its moving average
- RSI Crossed Below MA — RSI crosses below its moving average
█ RECOMMENDED ALERT SETTING
When creating an alert, set the frequency to "Once Per Bar Close."
This ensures the alert fires once per confirmed bar, not on every tick.
█ INPUTS
RSI Settings
- RSI Length: Lookback period for RSI calculation (default 14)
- Source: Price source (default close)
Moving Average Settings
- MA Type: SMA / EMA / SMMA(RMA) / WMA / VWMA
- MA Length: Lookback period for the MA (default 14)
Alert Levels
- Overbought Level: RSI threshold for overbought alert (default 70)
- Oversold Level: RSI threshold for oversold alert (default 30)
Color Settings
- All zone and line colors are individually customizable
A clean RSI indicator with overbought/oversold alerts that fire only once per crossing — not repeatedly while price stays in the zone.
Built to fix a common frustration: TradingView's default RSI alert keeps firing every bar while RSI stays above or below the threshold. This script uses crossover/crossunder detection so you get notified at the moment RSI crosses the level, and nothing more until it crosses again.
█ FEATURES
● Customizable overbought and oversold levels (default 70/30)
● Alerts trigger only on the crossing bar, not throughout the zone
● MA overlay on RSI (SMA, EMA, SMMA/RMA, WMA, VWMA)
● MA crossover alerts included
● Color-coded overbought, oversold, and middle zones
● All colors fully customizable
█ ALERTS (4 types)
- RSI Overbought Alert — RSI crosses above the overbought level
- RSI Oversold Alert — RSI crosses below the oversold level
- RSI Crossed Above MA — RSI crosses above its moving average
- RSI Crossed Below MA — RSI crosses below its moving average
█ RECOMMENDED ALERT SETTING
When creating an alert, set the frequency to "Once Per Bar Close."
This ensures the alert fires once per confirmed bar, not on every tick.
█ INPUTS
RSI Settings
- RSI Length: Lookback period for RSI calculation (default 14)
- Source: Price source (default close)
Moving Average Settings
- MA Type: SMA / EMA / SMMA(RMA) / WMA / VWMA
- MA Length: Lookback period for the MA (default 14)
Alert Levels
- Overbought Level: RSI threshold for overbought alert (default 70)
- Oversold Level: RSI threshold for oversold alert (default 30)
Color Settings
- All zone and line colors are individually customizable
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน