I am a new Trading View user. I am trying to gain some reputation so that I can start contributing more to the community and start learning more. Therefore I have written this very simple pine script that simply adds a label to the first bar of the day if there is a gap between 2% and 8% or a gap between -2* and -8%.

1) Lots of missing candlesticks e.g. at 16:30 and 08:00 meaning the candlestick may not of truely gapped up or down. Why are there missing bars? Is it because I have the free version? Are there any missing candlesticks on the paid for version?
2) Does the Gap filter always look at the first bar of the day and compare it to the last bar the previous day? (assuming you select 1d above the filters).
3) How does the Gap filter work if you select 1w above the filters?
4) The filter columns save for me, however the filter values do not. For example, if I select the Gap filter and select the values 'between 2% and 6%', then the column is saved but the values are not. Is this correct?
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 a publication is governed by House Rules. You can favorite it to use it on a chart.


The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?