OPEN-SOURCE SCRIPT
RSI Pivot Breaks

█ OVERVIEW
RSI Pivot Breaks is an RSI-based indicator that detects breakout events on oscillator-based pivot levels (RSI or MA RSI).
The tool automatically plots pivot levels, tracks their breakouts, highlights momentum shifts, and generates alerts for key events (pivot breaks and OB/OS crosses).
The indicator is designed primarily for momentum strategies — pivot breakouts often precede directional price moves, making RSI Pivot Breaks a powerful tool for identifying accelerations and changes in strength.
█ CONCEPTS
The indicator analyzes local RSI extremes and transforms them into dynamic support/resistance levels.
When RSI or MA RSI breaks the last pivot, it signals a shift in momentum balance, often leading to an impulse move.
Key concepts:
- pivot highs/lows detected on RSI or MA RSI,
- pivot lines extend forward until broken,
- pivot filters restrict pivot detection to specific RSI zones,
- OB/OS levels provide contextual momentum thresholds.
█ FEATURES
Pivot Detection & Breakouts
- Detection of pivot highs and lows on RSI or MA RSI.
- Pivot filters allow you to limit pivot detection to specific RSI ranges (e.g., only bullish pivots below 50 or bearish pivots above 50).
- Pivot lines update automatically after breakout.
Background highlights:
- green on pivot-high breakouts,
- red on pivot-low breakouts.
RSI & MA RSI
- Dynamic RSI colors based on momentum direction.
- Optional MA RSI line (SMA/EMA/RMA/WMA) usable as a smoother pivot source.
OB / OS Zones
- Fully adjustable overbought/oversold levels.
- Dedicated OB/OS colors.
- Optional gradient backgrounds.
Highlights
- Instant identification of moments when RSI breaks a key pivot level.
Alerts:
- pivot high breakouts.
- pivot low breakouts.
- OB crosses.
- OS crosses.
█ HOW TO USE
Add the indicator:
Indicators → RSI Pivot Breaks.
RSI Settings
- RSI Length – core RSI period.
- RSI MA Length & Type – MA RSI smoothing parameters.
Pivot Settings
- Pivot Left / Pivot Right – number of bars required to form a pivot and also the number of bars of delay before the pivot becomes confirmed.
(Higher values produce more reliable but slower pivots.)
Pivot Filters
- Minimum/maximum allowed RSI levels for pivot Highs and Lows.
- Examples:
- detect only pivot Highs at low RSI values.
- ignore pivots during extreme momentum.
- allow only mid-range pivot detection depending on strategy.
Visualization
- Toggles for RSI and MA RSI visibility.
- Optional gradients.
- Full color and transparency customization.
OB/OS Levels
- Adjustable thresholds depending on instrument volatility and strategy style.
█ SIGNAL INTERPRETATION
BUY
- RSI breaks the latest pivot high.
- RSI crosses upward out of OS.
- Context example: pivot lows forming a rising sequence.
SELL
- RSI breaks the latest pivot low.
- RSI drops downward from OB.
- Context example: pivot highs forming a declining sequence.
Trend / Momentum
- Pivot breakouts indicate acceleration or continuation of momentum.
- MA-based pivots provide smoother and more stable momentum structure.
█ APPLICATIONS
- Momentum Trading – pivot breaks as early acceleration signals.
- Scalping & Intraday – fast RSI pivots react quickly to short-term shifts.
- Swing Trading – smoother pivots using MA RSI for higher-timeframe structure.
- Divergence Detection – pivot behavior helps reveal divergence patterns, e.g.:
- RSI pivots rising while price is falling → potential early momentum reversal.
- Custom Filtering – pivot filters allow, for example:
- blocking bullish signals near OB.
- blocking bearish signals near OS.
- detecting pivots only above/below mid-range during strong trends,
depending entirely on strategy design.
█ NOTES
- Pivot detection includes natural delay equal to the Left/Right parameters.
- Pivot filters significantly change the character of signals, allowing fine-tuning of aggressiveness for any strategy.
RSI Pivot Breaks is an RSI-based indicator that detects breakout events on oscillator-based pivot levels (RSI or MA RSI).
The tool automatically plots pivot levels, tracks their breakouts, highlights momentum shifts, and generates alerts for key events (pivot breaks and OB/OS crosses).
The indicator is designed primarily for momentum strategies — pivot breakouts often precede directional price moves, making RSI Pivot Breaks a powerful tool for identifying accelerations and changes in strength.
█ CONCEPTS
The indicator analyzes local RSI extremes and transforms them into dynamic support/resistance levels.
When RSI or MA RSI breaks the last pivot, it signals a shift in momentum balance, often leading to an impulse move.
Key concepts:
- pivot highs/lows detected on RSI or MA RSI,
- pivot lines extend forward until broken,
- pivot filters restrict pivot detection to specific RSI zones,
- OB/OS levels provide contextual momentum thresholds.
█ FEATURES
Pivot Detection & Breakouts
- Detection of pivot highs and lows on RSI or MA RSI.
- Pivot filters allow you to limit pivot detection to specific RSI ranges (e.g., only bullish pivots below 50 or bearish pivots above 50).
- Pivot lines update automatically after breakout.
Background highlights:
- green on pivot-high breakouts,
- red on pivot-low breakouts.
RSI & MA RSI
- Dynamic RSI colors based on momentum direction.
- Optional MA RSI line (SMA/EMA/RMA/WMA) usable as a smoother pivot source.
OB / OS Zones
- Fully adjustable overbought/oversold levels.
- Dedicated OB/OS colors.
- Optional gradient backgrounds.
Highlights
- Instant identification of moments when RSI breaks a key pivot level.
Alerts:
- pivot high breakouts.
- pivot low breakouts.
- OB crosses.
- OS crosses.
█ HOW TO USE
Add the indicator:
Indicators → RSI Pivot Breaks.
RSI Settings
- RSI Length – core RSI period.
- RSI MA Length & Type – MA RSI smoothing parameters.
Pivot Settings
- Pivot Left / Pivot Right – number of bars required to form a pivot and also the number of bars of delay before the pivot becomes confirmed.
(Higher values produce more reliable but slower pivots.)
Pivot Filters
- Minimum/maximum allowed RSI levels for pivot Highs and Lows.
- Examples:
- detect only pivot Highs at low RSI values.
- ignore pivots during extreme momentum.
- allow only mid-range pivot detection depending on strategy.
Visualization
- Toggles for RSI and MA RSI visibility.
- Optional gradients.
- Full color and transparency customization.
OB/OS Levels
- Adjustable thresholds depending on instrument volatility and strategy style.
█ SIGNAL INTERPRETATION
BUY
- RSI breaks the latest pivot high.
- RSI crosses upward out of OS.
- Context example: pivot lows forming a rising sequence.
SELL
- RSI breaks the latest pivot low.
- RSI drops downward from OB.
- Context example: pivot highs forming a declining sequence.
Trend / Momentum
- Pivot breakouts indicate acceleration or continuation of momentum.
- MA-based pivots provide smoother and more stable momentum structure.
█ APPLICATIONS
- Momentum Trading – pivot breaks as early acceleration signals.
- Scalping & Intraday – fast RSI pivots react quickly to short-term shifts.
- Swing Trading – smoother pivots using MA RSI for higher-timeframe structure.
- Divergence Detection – pivot behavior helps reveal divergence patterns, e.g.:
- RSI pivots rising while price is falling → potential early momentum reversal.
- Custom Filtering – pivot filters allow, for example:
- blocking bullish signals near OB.
- blocking bearish signals near OS.
- detecting pivots only above/below mid-range during strong trends,
depending entirely on strategy design.
█ NOTES
- Pivot detection includes natural delay equal to the Left/Right parameters.
- Pivot filters significantly change the character of signals, allowing fine-tuning of aggressiveness for any strategy.
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน