OPEN-SOURCE SCRIPT
Adaptive Gap Continuation Matrix [Pineify]

Adaptive Gap Continuation Matrix [Pineify]
Overview
This session gap indicator separates close position inside an opening gap from efficient recent travel. The ribbon and event matrix describe continuation, stall, repair and range fill in either gap direction.
Problem Definition
An opening jump does not establish price acceptance. A fixed percentage ignores recent volatility, while a filled/unfilled label hides the route taken: two unfilled gaps can contain outward travel or noisy erosion. A wick reaching the old close also differs from a close staying there. The invariant is a frozen event reference with separate current close fill and maximum range fill.
Design Rationale
Prior ATR prevents the opening jump from changing its own eligibility threshold. The last regular close excludes extended closes from the target. Recent event-only steps replace cumulative efficiency so early travel can leave the window and expose a later rebound. Frozen median volume discounts weak participation; capped ratios bound spike influence. Hysteresis reduces chatter but delays transitions. Range touch ends the event without guessing intrabar ordering.
Key Features
How It Works
On a standard 1m-1H chart, the first regular bar's close confirms its open versus the last observed regular close. Defaults require valid OHLC and positive volume over 30 prior chart bars, with a 0.35 ATR minimum gap. The event freezes ATR and median volume; path starts at the open.
X is twice the fraction of gap retained by the close minus one, clipped to [-1,1]: +100 means opening side, zero half gap, -100 old-close side. Y is gap-directed net close movement divided by absolute close-step travel over the latest eight event bars, multiplied by min(1, square root of mean RVOL). Individual RVOL ratios are capped at four.
Continuation enters at 60% retention, +0.30 flow and 0.80 mean RVOL; repair at 20% close fill, -0.30 flow and the same volume gate. Existing states use looser release boundaries; otherwise stalled is sought. Two candidate closes confirm changes. A range touch completes at close; 60 event bars, leaving regular trading or invalid data terminates further sampling.
How Multiple Indicators Work Together
ATR admits the event, position locates the close, efficiency measures its recent route and RVOL discounts thin travel while gating state entry. Removing the rolling window would hide late rebounds; removing volume would give weak participation equal support. Range fill terminates; residence counts confirmed samples.
Trading Ideas and Insights
Continuation describes efficient gap-side travel; inspect price structure before considering a trade. Repair describes inward travel with participation and does not promise completion. Left-side positive flow can show a rebound after repair even with a stalled class. A fill alert reports contact with the old close, not an executable fill price.
Unique Aspects
A static gap box lacks the rolling event-only coordinate used here. Early path steps leave the efficiency window while the target remains frozen, separating recent reversal from fill depth. Participation shrinks flow without moving the gap reference. Dwell counts and terminal range contact distinguish confirmed history, present geometry and event completion.
How to Use
Teal marks continuation, amber repair, purple range completion and gray stalled/ended states. The ribbon is the primary view. Matrix left means more close fill; up means gap-direction flow. Quadrant captions are geometric readings, not extra states. @ is the latest closed point; old dots fade and overlaps keep the newest. Use alerts once per bar close.
Customization
Baseline length sets prior ATR and volume references; minimum gap sets eligibility. Event bars cap duration, and path length controls forgetting. Flow entry, release/entry ratio, RVOL and candidate-close count control admission and persistence. Matrix, residence, preview, markers, background and summary can be disabled without removing the ribbon.
Assumptions and Limitations
Regular may mean electronic hours for futures; subsessions can lack the opening flag. Missing edge bars or changed sessions alter the gap. ATR/volume baselines include displayed extended bars and have no seasonal volume adjustment. RVOL is not order flow or a probability. Initial history needs a prior regular close and full baseline; zero/missing volume ends an active event without resumption.
States, trail and counts update only at close. Optional dots fluctuate intrabar while rails hold the last confirmation. Range contact reveals no intrabar high/low order or close acceptance. Coordinates clip extensions and matrix cells quantize to 25-point steps; only the latest bounded trail is shown. The lower residence lane shows the sampled class's share, with a gray terminal bar on timeout. Parameters, history and feed revisions can change results. Execution and profitability are not evaluated.
Conclusion
The matrix keeps gap location, recent travel, participation and observed contact distinguishable. Use these confirmed descriptions within a known session context; trade selection and execution require separate judgment.
Overview
This session gap indicator separates close position inside an opening gap from efficient recent travel. The ribbon and event matrix describe continuation, stall, repair and range fill in either gap direction.
Problem Definition
An opening jump does not establish price acceptance. A fixed percentage ignores recent volatility, while a filled/unfilled label hides the route taken: two unfilled gaps can contain outward travel or noisy erosion. A wick reaching the old close also differs from a close staying there. The invariant is a frozen event reference with separate current close fill and maximum range fill.
Design Rationale
Prior ATR prevents the opening jump from changing its own eligibility threshold. The last regular close excludes extended closes from the target. Recent event-only steps replace cumulative efficiency so early travel can leave the window and expose a later rebound. Frozen median volume discounts weak participation; capped ratios bound spike influence. Hysteresis reduces chatter but delays transitions. Range touch ends the event without guessing intrabar ordering.
Key Features
- One bounded event per qualifying regular opening.
- Gap position and participation-adjusted path rails.
- Confirmed residence counts, close/range fill and optional live dots.
- Continuation, repair, range-fill, event-end and interruption alerts.
How It Works
On a standard 1m-1H chart, the first regular bar's close confirms its open versus the last observed regular close. Defaults require valid OHLC and positive volume over 30 prior chart bars, with a 0.35 ATR minimum gap. The event freezes ATR and median volume; path starts at the open.
X is twice the fraction of gap retained by the close minus one, clipped to [-1,1]: +100 means opening side, zero half gap, -100 old-close side. Y is gap-directed net close movement divided by absolute close-step travel over the latest eight event bars, multiplied by min(1, square root of mean RVOL). Individual RVOL ratios are capped at four.
Continuation enters at 60% retention, +0.30 flow and 0.80 mean RVOL; repair at 20% close fill, -0.30 flow and the same volume gate. Existing states use looser release boundaries; otherwise stalled is sought. Two candidate closes confirm changes. A range touch completes at close; 60 event bars, leaving regular trading or invalid data terminates further sampling.
How Multiple Indicators Work Together
ATR admits the event, position locates the close, efficiency measures its recent route and RVOL discounts thin travel while gating state entry. Removing the rolling window would hide late rebounds; removing volume would give weak participation equal support. Range fill terminates; residence counts confirmed samples.
Trading Ideas and Insights
Continuation describes efficient gap-side travel; inspect price structure before considering a trade. Repair describes inward travel with participation and does not promise completion. Left-side positive flow can show a rebound after repair even with a stalled class. A fill alert reports contact with the old close, not an executable fill price.
Unique Aspects
A static gap box lacks the rolling event-only coordinate used here. Early path steps leave the efficiency window while the target remains frozen, separating recent reversal from fill depth. Participation shrinks flow without moving the gap reference. Dwell counts and terminal range contact distinguish confirmed history, present geometry and event completion.
How to Use
Teal marks continuation, amber repair, purple range completion and gray stalled/ended states. The ribbon is the primary view. Matrix left means more close fill; up means gap-direction flow. Quadrant captions are geometric readings, not extra states. @ is the latest closed point; old dots fade and overlaps keep the newest. Use alerts once per bar close.
Customization
Baseline length sets prior ATR and volume references; minimum gap sets eligibility. Event bars cap duration, and path length controls forgetting. Flow entry, release/entry ratio, RVOL and candidate-close count control admission and persistence. Matrix, residence, preview, markers, background and summary can be disabled without removing the ribbon.
Assumptions and Limitations
Regular may mean electronic hours for futures; subsessions can lack the opening flag. Missing edge bars or changed sessions alter the gap. ATR/volume baselines include displayed extended bars and have no seasonal volume adjustment. RVOL is not order flow or a probability. Initial history needs a prior regular close and full baseline; zero/missing volume ends an active event without resumption.
States, trail and counts update only at close. Optional dots fluctuate intrabar while rails hold the last confirmation. Range contact reveals no intrabar high/low order or close acceptance. Coordinates clip extensions and matrix cells quantize to 25-point steps; only the latest bounded trail is shown. The lower residence lane shows the sampled class's share, with a gray terminal bar on timeout. Parameters, history and feed revisions can change results. Execution and profitability are not evaluated.
Conclusion
The matrix keeps gap location, recent travel, participation and observed contact distinguishable. Use these confirmed descriptions within a known session context; trade selection and execution require separate judgment.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
🚀🚀🚀 Pineify - pineify.app
Essential Toolkit for Every Trader
- AI Pine Script Generator
- Finance AI Agent
- AI Stock Picker
- Pine Script Visual Editor
- Invited indicators
- Strategy Optimizer
- Trading Journal
- Backtest Report
Essential Toolkit for Every Trader
- AI Pine Script Generator
- Finance AI Agent
- AI Stock Picker
- Pine Script Visual Editor
- Invited indicators
- Strategy Optimizer
- Trading Journal
- Backtest Report
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
🚀🚀🚀 Pineify - pineify.app
Essential Toolkit for Every Trader
- AI Pine Script Generator
- Finance AI Agent
- AI Stock Picker
- Pine Script Visual Editor
- Invited indicators
- Strategy Optimizer
- Trading Journal
- Backtest Report
Essential Toolkit for Every Trader
- AI Pine Script Generator
- Finance AI Agent
- AI Stock Picker
- Pine Script Visual Editor
- Invited indicators
- Strategy Optimizer
- Trading Journal
- Backtest Report
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.