OPEN-SOURCE SCRIPT
Peak Reversal v3

# Peak Reversal v3
## Summary
Peak Reversal v3 adds new configurability, clearer visuals, and a faster trader workflow. The release introduces a new Squeeze Detector, expanded Keltner Channels, and streamlined Momentum signals, with no repaints and improved performance. The menus have been reorganized and simplified. Color swatches have been added for better customization. All other colors will be derived from these swatches.
## Highlights
## Overview
## Details about major features and changes
### New
### Keltner channel improvements
### Display and signals
### Reliability and performance
## Summary
Peak Reversal v3 adds new configurability, clearer visuals, and a faster trader workflow. The release introduces a new Squeeze Detector, expanded Keltner Channels, and streamlined Momentum signals, with no repaints and improved performance. The menus have been reorganized and simplified. Color swatches have been added for better customization. All other colors will be derived from these swatches.
## Highlights
- New Squeeze Detector to mark low-volatility periods and prepare for breakouts.
- New: Bands are now fully configurable with independent MA length, ATR length, and multipliers.
- Five moving average bases for bands: EMA (from v2), SMA, RMA, VMA, HMA.
- Simplified color system: three swatches drive candles, on-chart marks, and band fill.
- Reorganized menu with focused sections and tooltips for each parameter making the entire trader experience more intuitive.
- No repaints and faster performance across calculations.
## Overview
- Configuration: Pick from three color swatches and apply them to candles, plotted characters, and band fill for consistent chart context. Use the reorganized menu to reach Keltner settings, momentum signals, and squeeze detection without extra clicks; tooltips clarify each input.
- Bands and averages: Choose the band basis from EMA, SMA, RMA, VMA, or HMA to match your strategy. Configure two bands independently by setting MA length, ATR length, and band multipliers for the inner and outer envelopes.
- Signals: Select the band responsible for momentum signals. Choose wick or close as the price source for entries and exits. Control the window for extreme momentum with “Max Momentum Bars,” a setting now exposed in v3 for direct tuning.
- Squeeze detection: The Squeeze Detector normalizes band width and uses percentile ranking to highlight volatility compression. When the market falls below a user-defined threshold, the indicator colors the region with a gradient to signal potential expansion.
## Details about major features and changes
### New
- Squeeze Detector to highlight low-volatility conditions.
- Five MA bases for bands: EMA, SMA, RMA, VMA, HMA.
- “Max Momentum Bars” to cap the bars used for extreme momentum.
### Keltner channel improvements
- Refactored Keltner settings for flexible inner and outer band control.
- MA type selection added; band calculations updated for consistency.
- Removed the third Keltner band to reduce noise and simplify setup.
### Display and signals
- Gradient fills for band breakouts, mean deviations, and squeeze periods.
- “Show Mean EMA?” set to true and default “Signal Band” set to “Inner.”
- Clearer tooltips and input descriptions.
### Reliability and performance
- No more repaints. The indicator waits for confirmation before drawing occurs.
- Faster execution through targeted refactors.
- All algorithms have been reviewed and now use a consistent logic, naming, and structure.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.