OPEN-SOURCE SCRIPT

Visible Range Streaks of Unbroken Prior Highs/Lows [vnhilton]

Updated
(OVERVIEW)

This indicator keeps track of the number of unbroken prior highs/lows (unbroken being no price closes above/below the prior high/low). Great for entries and take profits. The indicator calculates on visible bars for convenience when looking back into the history without having to use bar replay, which those on the TradingView free plan cannot use intraday bar replay, so the visible range is a perfect work-around. The 2 minute chart above shows NKLA on Thursday 13th July, 2023, with a significant level of $1.5 leading to a breakout. Streaks lower than 10 were hidden in the chart.

(FEATURES)
- Custom minimum streak size to start displaying plots (the smaller the size the more signals)
- Ability to show/hide numbers (that keep count of unbroken streaks), text signals (for when a streak is broken), break shapes (where the prior high/low was broken), and Zig Zag (lines between break shapes)
- Customisable Zig Zag line width, style, and colours (1 colour for a positive gradient line, and another for a negative gradient line)
- Customisable text signal text
- Customisable numbers, text signal, break shape, number label & text signal label colours
- Customisable number label, text signal label and break shape styles and sizes (number and text signal label share the same size)
Release Notes
- Added toggle to count wicks as streak breaks. This has the benefit of not exiting or entering too late/far, at the expense of streaks ending earlier and more wick fake-outs.

snapshot
Indicator with wicks counted as streak breaks. Example can be seen in the orange circle drawing.
Candlestick AnalysisTrend AnalysisZig Zag Indicator

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?

Disclaimer