OPEN-SOURCE SCRIPT

RSI Failure Swings & AO Divergences

Hello!

The script identifies RSI divergences, similar to other public scripts; however, RSI failure swings are also distinguished. When a failure swing is identified, the script calculates the highest RSI measurement (bottom failure swing) or the lowest RSI measurement (top failure swing) between the two RSI pivot points. A continually updating line is plotted at the "fail point" until it is penetrated for two sessions! In addition, the script displays the RSI fail point measurement. RSI bearish divergences are only distinguished when both RSI peaks form above 70. bullish divergences are only distinguished when both RSI troughs form below 30. Top failure swings require the initial RSI peak be above 70, the second RSI peak can form at any measurement. Bottom failure swings require the initial RSI trough be below 30, the second RSI trough can form at any measurement.

Included are Awesome Oscillator divergences. The indicator is a bit tricky; the oscillator does not incorporate an upper or lower extremity. Consequently, the script uses interpolated percentiles to characterize relatively high measurements and relatively low measurements. Bearish divergences that form within the 90th - 99th percentile are distinguished, and bullish divergences that form within the 1 - 10th percentile are distinguished. This can CERTAINLY be changed should you copy the source code and think of something better! For AO, white columns reflect a difference measurement >= 0; black bars reflect a difference measurement < 0
Awesome Oscillator (AO)Relative Strength Index (RSI)

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


•Access to Next-Gen Optimization Tools: kiosefftrading.com

•Discord Server: discord.gg/3cKVU28Z9Z
Also on:

Disclaimer