1Copy the scriptPress Copy script above, or the copy button on the code below.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.
Source Code
150 lines of Pine Script v5 from indicators/Zen-Gaps/zen-gaps-v5.0.txt, published under MIT. Keep the author's credit and licence lines when you reuse it.
Zen Gaps v5.0 detects bullish gaps when the current low exceeds the prior bar's high and bearish gaps when the current high falls below the prior bar's low. Strong gaps receive extra emphasis when consecutive bars maintain the same directional status. The script also plots vertical lines for tick gaps when enabled. Inputs allow toggling display of tick gaps, urgent bars, and clarity bars, along with thresholds for IBS factors, urgency percentages, body range limits, and custom colors for bullish, bearish, and strong gap types. Boxes appear directly on the chart without additional panes.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Show Tick Gaps ?
string
On
plotTickGaps
Show Urgent Bars ?
string
On
plotUrgentBars
Show Clarity?
string
On
plotClarityBars
Bull IBS Threshold
int
69
i_bullIBSfactor
Bear INS Threshold
int
31
I_bearIBSfactor
Urgency Bull %
int
15
UrgencyBullThreshold
Urgency Bear %
int
15
UrgencyBearThreshold
Body Range Limit
int
51
BodyRangeThreshold
Bullish Gap Background
color
color.rgb(76, 175, 79, 95)
bullGapBGColor
Bullish Gap Border
color
color.rgb(76, 175, 79, 100)
bullGapBorderColor
Strongly Bullish Gap Background
color
color.rgb(55, 188, 255, 80)
strongBullGapBGColor
Strongly Bullish Gap Border
color
color.rgb(66, 116, 187, 100)
strongBullGapBorderColor
Show all 19 settings
Setting
Type
Default
Variable
Bearish Gap Background
color
color.rgb(255, 82, 82, 92)
bearGapBGColor
Bearish Gap Border
color
color.rgb(255, 82, 82, 100)
bearGapBorderColor
Strongly Bearish Gap Background
color
color.rgb(55, 188, 255, 80)
strongBearGapBGColor
Strongly Bearish Gap Border
color
color.rgb(66, 116, 187, 100)
strongBearGapBorderColor
IBS Bull
int
31
ibsBullThreshold
IBS Bear
int
69
ibsBearThreshold
Lookback Period
int
8
lookbackPeriod
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
This indicator overlays up to five higher-timeframe candlestick groups on the price chart. For each enabled timeframe it requests open, high, low, and close and can show up to five candles, offset by a spacing setting. The main inputs set the candle count, the
This indicator plots optional candlestick pattern signals on the price chart. It detects engulfing bars, inside bars, HOLP and LOHP, kicker patterns, body-mass extremes, higher highs and lower lows, ATR warnings, and four-bar fractals. Optional pivot marks use
The Strat Assistant indicator identifies candlestick patterns from the STRAT methodology on the price chart. It detects inside bars, 2-candle directional bars, 3-candle outside bars, and sequences like 212 and 222 for continuations and reversals. Shapes such a
This overlay indicator highlights candles with a body smaller than 50% of their total range by coloring them white on the price chart. Simultaneously, it calculates and plots horizontal lines for open prices across multiple higher timeframes, such as daily, we
This Pine Script indicator identifies liquidity sweeps and confirms signals using a close-back candle pattern directly on the price chart. It tracks recent swing highs and lows over a customizable lookback period. A bullish signal forms when a prior bar sweeps
This overlay indicator draws 80/20 price levels and optional 40-point zone bands on the price chart. It marks repairs, cross sections, and forks with optional letter labels, and can highlight confluence when those marks sit near a level. Separate options shade