OPEN-SOURCE SCRIPT
已更新

Institutional Candle Detector [AGPro Series]

9 691
🕯️ Institutional Candle Detector [AGPro Series]

Every trader has stared at a massive candle and asked the same question: "Was that the start of a move, the end of one, or just noise?" Most indicators stop at detection — they paint the candle, drop a label, and walk away. This one keeps watching.

Institutional Candle Detector uses a dual-track engine. The body-driven track flags high-conviction candles where ATR-normalized body size and relative volume both expand together, then classifies each event by body/wick geometry. The independent absorption track captures a different signature entirely — low-body candles on extreme volume, the classic aggression-absorbed footprint that body-only detectors miss. Every detected event is then re-evaluated over the following bars to produce a measurable outcome scorecard.


🔹 OVERVIEW

The script scans each bar for two separate, mutually-exclusive institutional signatures:

• Body-driven events. Body must exceed a multiple of ATR AND volume must exceed a multiple of its rolling average. Classified by geometry into Continuation, Reversal or Exhaustion.

• Absorption events. Volume extremely elevated BUT body contained — the market paid for a big move and did not get one. Price was absorbed.

Every detected candle is then given a reaction zone projected forward, and its outcome is automatically tagged after the configured look-forward window — Follow-Through (FT), Reverse (RV) or Consolidation (CN). The panel accumulates aggregate statistics across the loaded chart so the trader can see which candle type actually works on their instrument and timeframe.


🔸 UNIQUE EDGE

What separates this tool from generic "big candle" or "volume spike" indicators:

• Dual-track detection. A single filter cannot capture both explosive moves and absorption. This script runs two engines in parallel with independent thresholds.

• Four-class geometric taxonomy, each backed by a distinct detection path. Continuation and Reversal fire from the body-driven track with different geometry. Exhaustion catches the mid-profile edge cases. Absorption runs entirely off its own volume-first track.

• Automatic after-behavior tracking. Each event is re-examined after N bars and tagged with an outcome code. This is the part most scripts omit — and it's where edge lives.

• Aggregate statistics panel. Follow-through rate, reverse rate, consolidation rate, and per-class counts are computed continuously. The panel tells you whether institutional candles on this asset actually extend, reverse, or fade.

• Forward-projected zones, colored by class. Body-driven bull/bear events use state colors. Absorption uses an indigo accent so the rarer signature is instantly recognizable. Reversal zones use the contrarian color to emphasize the expected directional flip.


🔹 METHODOLOGY

Body-Driven Track (produces CONT, REV, EXH)
– Body is measured as absolute (close − open) and required to exceed Body × ATR multiple.
– Volume is required to exceed a configurable multiple of its SMA average.
– An optional wick filter rejects candles where total wick exceeds the body beyond a given ratio, removing wide-range noise that looks institutional but is not.
– Continuation: body% ≥ configured threshold (clean directional close).
– Reversal: opposing wick% ≥ configured threshold (sharp rejection after initial push).
– Exhaustion: passes the dual-gate but falls into neither clean category — mid profile, often late in a move.

Absorption Track (produces ABS)
– Volume must exceed an independently configurable multiple (higher than body-driven default).
– Body must be small — below a max Body × ATR and below a max Body / Range.
– When absorption fires, it takes precedence over body-driven classification.

After-Behavior Layer
– After lookFwd bars, the script compares the extreme price move in each direction against the original body size.
– If same-direction extension ≥ ftPct × body → Follow-Through (FT).
– If opposite-direction retrace ≥ revPct × body → Reverse (RV).
– Otherwise → Consolidation (CN).

Aggregate counters accumulate across the loaded chart, producing a running scorecard visible in the panel.


🔸 SIGNALS, STATES & MARKERS

On-chart signals
• Institutional body recolored by class — bull/bear direction for CONT and EXH; contrarian color for REV; accent color for ABS.
• Directional triangle marker above/below the bar.
• Classification label: INST-Bull 3.2x CONT or INST-Bear 5.4xV ABS format, ASCII only. Labels offset from the candle to stay readable on dense charts.
• Reaction zone box projected forward from the candle's high-low range, color-coded by class.
• Outcome marker (FT / RV / CN) plotted lookFwd bars after the event.

Alerts available
• Institutional Continuation
• Institutional Reversal
• Institutional Absorption
• Institutional Exhaustion

All four alerts fire on confirmed bars only.


🔹 KEY INPUTS

Detection Core (body-driven track)
– ATR Length (default 14)
– Volume Average Length (default 20)
– Min Body × ATR (default 2.0)
– Min Volume Multiple (default 2.5)
– Wick filter toggle and max Wick/Body ratio (default 2.5)

Absorption Track
– Enable Absorption Detection
– Absorption Min Volume Multiple (default 4.0)
– Absorption Max Body × ATR (default 1.5)
– Absorption Max Body / Range (default 0.40)

Classification
– Continuation body% threshold (default 0.60)
– Reversal opposing-wick% threshold (default 0.40)

After-Behavior
– Look-forward bars (default 5)
– Follow-through threshold as fraction of body (default 0.50)
– Reverse threshold as fraction of body (default 0.60)

Visuals
– Show/hide zones, zone projection length, opacity, max active zones
– Label size (default Small; increase if labels feel too compact)
– Institutional border width
– Outcome marker toggle

Panel
– 8-position panel placement
– Dark / Light theme
– Font size (default Normal)
– Recent events mini-list toggle


🔸 HOW TO USE

1. Start with defaults on a liquid asset. 4H is a strong baseline; 1H for active traders; Daily for swing context. On Daily, consider lowering Min Body × ATR to 1.5 if events are too rare.

2. Watch the panel accumulate events over two to four weeks on your instrument. The follow-through rate tells you whether institutional candles on this chart tend to extend or fade.

3. Trade-context usage:
– Continuation with a high historical follow-through rate on this asset → trend trades in candle direction after pullback into the zone.
– Reversal with a high historical reverse rate → fade setups at key levels.
– Absorption → aggressive flow was met by an equal or greater defender; often precedes a reversal or compression phase.
– Exhaustion → proceed with caution; frequently a late-move signature where the trend is losing clean structure.

4. Reaction zones act as provisional supply/demand. A retest of a zone with another institutional event near it is a confluence worth noting.

5. Tune thresholds per asset. High-liquidity instruments may need Body × ATR of 2.5+ to keep events selective; low-liquidity pairs can go down to 1.5. Absorption volume multiple can also be adjusted upward on already-volatile instruments.


🔹 LIMITATIONS & TRANSPARENCY

• This is an analytical indicator, not a strategy. No entry, exit, or stop logic is defined and no performance claims are made.
• Aggregate statistics are computed over the loaded chart window and will shift as more bars load or as timeframes change.
• Volume quality depends on the data feed; exchange-reported volume differs across sources for the same asset.
• Follow-through evaluation uses a fixed look-forward window; real trade management will differ.
• All results are historical and descriptive. Past behavior of any candle class does not guarantee future behavior.


🔸 RISK DISCLOSURE

Trading carries substantial risk. This tool is provided for analytical and educational purposes. Do your own research. Use position sizing and risk management appropriate to your account. Nothing in this script constitutes financial advice.
發行說明
🔧 UPDATE NOTES - V1.3

This update focuses on outcome tracking, decision clarity, visual hierarchy, and planner-style usability.

The core purpose of the script remains unchanged.
Institutional Candle Detector still identifies institutional candle events through body expansion, relative volume, wick structure, absorption behavior, and candle taxonomy.

This release improves how each detected candle is evaluated after the event, so users can read whether the candle is creating follow-through, failure risk, or a completed outcome.

This script continues to function as an analytical and visualization tool.
It does not attempt to predict price direction or provide guaranteed outcomes.


------------------------
What Changed
------------------------

• Added a 0-100 Institutional Candle Efficiency Score
The score combines body efficiency, wick control, relative volume, ATR-normalized expansion, and trend support.

• Added planner-style action states
The panel now shows READY, MONITOR, REVIEW RISK, CONFIRMED, INVALIDATED, EXPIRED, or WAIT depending on the active event lifecycle.

• Added follow-through corridor logic
Each qualified candle can now project a forward follow-through corridor with centered text inside the zone.

• Added invalidation shelf logic
Each active event now has an ATR-buffered invalidation shelf so the failure reference is visually clear.

• Added failure-risk review behavior
The script can flag a review state before final invalidation when adverse movement becomes elevated.

• Refined publication defaults after screenshot review
Detection thresholds are more balanced, corridor height is capped, risk shelf text is quieter, and stale events no longer dominate the main panel state.

• Balanced Daily and 4H visual density
The default detection is more responsive for higher-timeframe charts, while event markers and invalidation shelves are hidden by default to keep intraday charts cleaner.

• Updated the panel to match the roadmap requirement
The panel now focuses on Candle Type, Efficiency, Follow-Through, Failure Risk, and Action.


------------------------
Visual Improvements
------------------------

• Improved chart readability with cleaner follow-through corridors and invalidation shelves

• Added centered corridor labels for a more premium visual structure

• Softened invalidation shelf text from a heavy warning-style visual into a quieter risk-reference marker

• Disabled tiny event markers by default because labels and corridors already carry the main visual story

• Reduced dashboard-style statistics and moved the interface toward a decision-engine layout

• Kept labels compact and offset away from candles to avoid burying them inside price bars

• Preserved the AGPro merged blue header row standard with only the script name in the first panel row


------------------------
Interface & Usability
------------------------

• Added panel show / hide control with the panel enabled by default

• Kept panel location, theme, panel font size, and label font size configurable

• Kept the public indicator title without an AG Pro prefix while preserving AG Pro only in the panel title

• Added a compact recent-events block under the required five planner rows

• Added alert conditions for READY, failure-risk review, invalidation, and final outcome events


------------------------
Behavior Notes
------------------------

This update does not turn the script into Candle Expansion Readiness.

The script still remains focused on institutional candle classification and post-event outcome tracking.

The new score and action state are designed to help users interpret the candle lifecycle after detection, not to create automatic entries or directional predictions.

Users should interpret outputs the same way as before, but with clearer risk, target, and follow-through references.


------------------------
Limitations Reminder
------------------------

The script remains a rule-based analytical tool.

Market conditions such as volatility, liquidity, timeframe differences, and volume feed quality may affect how institutional candles appear and how outcomes are classified.

Outputs should always be interpreted within broader market context.


------------------------
Risk Reminder
------------------------

This script is for educational and analytical purposes only.

It does not provide financial advice or guaranteed trading outcomes.

Users remain responsible for their own decisions.
發行說明
UPDATE NOTES - v1.4

This update focuses on readability and visual clarity.

The core purpose of the script remains unchanged. This release improves how the
existing institutional candle detection is presented, organized, and interpreted
on the chart.

This script continues to function as an analytical and visualization tool. It
does not attempt to predict price direction or provide guaranteed outcomes.


------------------------
What Changed
------------------------

- Compact event labels
Event labels are now condensed to class and score (for example "CONT 95",
"ABS 65"). The candle direction is conveyed by color and label position, so the
tags read clearly without the extra wording. Full detail still lives in the
tooltip and the panel.

- Removed duplicate corridor text
The follow-through corridor no longer repeats the class and score inside the
box, since the same information already sits on the event label. The corridor
now reads as a clean, subtle target zone.

- Softer corridor zones
Corridor fill and borders were lightened so several zones can coexist on the
chart without turning into heavy overlapping blocks.

- Optional guide lines
The precise dashed invalidation line and dotted target line are now optional
and off by default, for a cleaner first-glance chart. They can be enabled when
exact levels are needed.

- Lower default chart density
The default event-label cooldown was increased and the maximum number of
retained on-chart objects was reduced, so labels and zones are spaced out and
no longer pile on top of each other.


------------------------
Visual Improvements
------------------------

- Improved chart readability by shortening labels and removing duplicated text.

- Reduced visual clutter so the institutional candles and their zones are easier
to interpret at first glance.

- Refined visual hierarchy so the active event and its corridor stand out more
clearly.

- Kept labels offset above or below candles instead of buried inside them.


------------------------
Interface & Usability
------------------------

- Optimized the default chart layout for a clearer information flow.

- Improved label readability for better chart interaction.

- Adjusted default visual settings (label density, corridor opacity, guide
lines) for a more balanced appearance.

- Enhanced overall user experience without changing core logic.


------------------------
Behavior Notes
------------------------

This update does not change the core analytical logic of the script.

The goal is to improve clarity and usability, not to introduce new predictive
behavior. Candle detection, the 0-100 efficiency score, follow-through tracking,
failure-risk evaluation, the action state, and the panel all behave exactly as
before.

Users should interpret outputs the same way as before, but with improved visual
structure.


------------------------
Limitations Reminder
------------------------

The script remains a rule-based analytical tool.

Market conditions such as volatility, liquidity, and timeframe differences may
affect how events appear. Outputs should always be interpreted within broader
market context.


------------------------
Risk Reminder
------------------------

This script is for educational and analytical purposes only.

It does not provide financial advice or guaranteed trading outcomes. Users
remain responsible for their own decisions.
發行說明
🔧 UPDATE NOTES - v1.5

This update focuses on adding a follow-through proof and unifying label contrast.

The core purpose of the script remains unchanged.
This release adds a historical follow-through proof to the panel, makes every
on-chart badge contrast-safe, and hardens the ATR baseline. It does not change the
candle taxonomy, scoring, or outcome logic.

This script continues to function as an analytical and visualization tool.
It does not attempt to predict price direction or provide guaranteed outcomes.


------------------------
What Changed
------------------------

• Proof row added to the panel
After each detected institutional candle, the planner measures whether price
followed through in the expected direction (1.5 ATR) before reversing against it
(1.0 ATR), evaluated on confirmed closes from the event bar. It reports the
follow-through share with the sample count, e.g. "54% (180)", and reads
"Building (n)" until at least 6 resolved samples exist. This proof is measured
independently of the on-chart corridor and outcome labels, on a fixed, symmetric
ATR reference, so it is not inflated by the candle-edge invalidation geometry.

• Unified label contrast
Event labels, outcome labels, and the invalidation-shelf text now derive their
text color from each fill brightness, so continuation, reversal, absorption,
exhaustion, and outcome badges all stay legible.

• Hardened ATR baseline
The ATR used for body normalization, corridors, shelves, targets, and label
spacing now falls back to true range and a minimum tick on early or illiquid bars.


------------------------
Visual Improvements
------------------------

• Improved badge and outcome-label readability across all event colors

• Kept follow-through corridors, glow, shelves, and guide lines unchanged

• Maintained controlled label density and above/below-candle placement


------------------------
Interface & Usability
------------------------

• Panel now reads Candle Type, Efficiency, Follow-Through, Failure Risk, Action,
and Proof, with the Recent Events ledger below

• The new Proof row adds a single honest follow-through readout above the ledger

• Enhanced overall user experience without changing the core detection


------------------------
Behavior Notes
------------------------

This update does not change the candle classification, scoring, or outcome logic.

The Proof row is a historical, descriptive follow-through statistic measured on a
fixed symmetric ATR reference at confirmed closes. It is not a
forecast, win rate, or trade instruction, and it is symbol- and timeframe-dependent.

Users should interpret outputs the same way as before, now with an added
follow-through context read.


------------------------
Limitations Reminder
------------------------

The script remains a rule-based analytical tool.

Market conditions such as volatility, liquidity, and timeframe differences may
affect how events resolve and how the proof rate reads.

Outputs should always be interpreted within broader market context.


------------------------
Risk Reminder
------------------------

This script is for educational and analytical purposes only.

It does not provide financial advice or guaranteed trading outcomes.

Users remain responsible for their own decisions.

免責聲明

這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。