Consequent Encroachment
By LuxAlgoJun 20, 2026
Consequent Encroachment is an indicator on Vela, our next-generation charting platform, written in Pine Script®.
Consequent Encroachment is the definitive clean build for consequent encroachment levels: the 50% line of each fair value gap and, optionally, of a prominent candle wick. Each confirmed three-candle gap gets its midpoint drawn from the middle candle and tracked bar by bar (touched, closed through, or fully filled), while qualifying wicks contribute dotted midpoints of their own. Defaults keep the last 10 levels of each type.
How to Trade the Consequent Encroachment?
- CE tested: price touches a gap midpoint: half the imbalance has been rebalanced, the spot midpoint-based entries watch for a reaction.
- CE breached: a close through the midpoint turns the line dashed; the gap no longer reads as respected and expectation shifts toward a full fill.
- Wick CE revisited: price returns to a prominent wick's midpoint, the half-revisit that level anticipates, which completes it.
Each event carries a bullish and a bearish alert, so the levels slot into a wider Smart Money Concepts workflow without chart-watching.
Consequent Encroachment Settings
- Minimum Gap Width (default 0): ignores gaps under this multiple of the 14-period ATR; 0 marks every gap.
- Show Last (default 10): levels kept per type, oldest removed first.
- Remove Completed CEs (default on): deletes a level after a full fill or wick revisit; disable to keep it frozen and recolored.
- Wick Midpoints (default on): also tracks the 50% line of prominent wicks.
- Minimum Wick % (default 50): share of the candle range a wick must occupy; when both qualify, only the longer is used.
- Minimum Wick Size (default 0): optional additional ATR filter on the wick's span.
- Style inputs govern gap-zone shading, CE tags, line width and the bullish, bearish and completed colors.
Frequently Asked Questions
Free to use
Run it on Vela. Go further with a paid plan.
- Up to 500 Custom Alerts, with webhook automation
- Up to 10× the chart history of Free
- Orderflow lookback up to full history
- More Quant usage to customize it, plus extra usage when you need it
- Futures data alongside crypto, stocks, forex and commodities
Related indicators
Run it on Vela. Make it yours with Quant.
Open this indicator free on Vela, our next-generation charting platform. Then ask Quant, our coding agent built into Vela, to retune it or turn it into a backtested strategy of your own.





