Order Flow Candle Classifier [BullByte]

1 023
Order Flow Candle Classifier (OFCC) is an order flow analysis indicator designed to bring together volume participation, delta, price response and market context in a structured, candle-by-candle view.

Order flow contains several layers of information. Buy and sell volume, delta, price reaction, absorption, exhaustion and auction behaviour each describe a different aspect of market activity. Understanding how these elements relate to one another is often more useful than interpreting every measurement in isolation.

OFCC was developed to make that process more organised and accessible. It evaluates the information available from the selected data source and translates the strongest qualifying behaviour into a descriptive candle classification. The underlying measurements remain available through the chart dashboard, historical Order Flow Monitor and hover details.

The indicator is intended to help traders who are developing their familiarity with order flow analysis understand how participation and price behaviour relate. It is also designed for experienced traders who prefer a structured way to review candle behaviour alongside the surrounding market context.

OFCC does not replace detailed order flow analysis or make trading decisions on the user's behalf. Its purpose is to organise the available evidence and make it easier to interpret and review.

---

Original Design and Methodology

The defining feature of OFCC is not simply that it displays several order flow measurements. It is the way those measurements are organised into one source-aware candle classification process.

Each component has a specific role:

1. Participation: Buy volume, sell volume and delta describe directional activity as reported by the selected data source.
2. Price response: Candle direction, body, wicks, close location and price progress show how price responded.
3. Market context: Higher-timeframe direction, recent structure and auction behaviour put the current candle into perspective.
4. Classification: The engine evaluates qualifying conditions and selects the strongest descriptive candle role.
5. Evidence display: The dashboard and historical monitor retain the measurements, calculation method and contextual information associated with each candle.

A central design decision is that Estimated OHLCV and Native TradingView Footprint Data use separate calculation paths. Each source has its own evidence requirements and source-specific metrics. Measurements that cannot be established by the selected source are not presented as though they were available.

The result is a unified classification workflow in which participation, price response and context contribute to the same analytical task, rather than appearing as unrelated indicators on a chart.

---

1. Data Sources

OFCC provides two calculation modes.

A. Estimated OHLCV

スナップショット

This is the default mode. It uses chart volume and, where available, lower-timeframe price data to estimate directional participation.

Lower-timeframe directional estimate

When usable smaller candles are available, their price direction is used to allocate volume between estimated buying and selling sides.

For doji intrabars, the engine checks the change from the previous intrabar close. If the close is unchanged, it carries the last known direction. If no direction has yet been established, the intrabar volume is split evenly.

When chart volume is available, the lower-timeframe allocation is scaled to the chart candle's reported volume so the estimated buy and sell components reconcile with that reported total.

Automatic timeframe selection

Auto uses:

- 1-minute data on intraday charts.
- 5-minute data on daily charts.
- 60-minute data on weekly, monthly and other chart intervals above daily.

On sub-minute chart intervals, Auto still selects 1-minute data. Because that is not a lower timeframe, the engine uses the chart-candle close-location proxy instead. Auto never selects seconds-based intervals.

A Custom interval must be strictly lower than the chart timeframe and supported by the symbol, account plan and available historical data.

Chart-candle close-location proxy

When usable lower-timeframe directional data is unavailable, chart volume is allocated according to the candle's closing location within its own high-low range.

This is a price-derived proxy, not independent confirmation of buying or selling aggression. It does not establish the actual aggressor of individual trades and is not used as a substitute for native Footprint measurements or valid flow confirmation.

Estimated-mode metrics

The two source-specific metric fields display:

- Directional Run: Consecutive chart candles moving in the same direction. A doji resets the run.
- Close Acceptance: The closing price's location within the candle's own range, categorised as upper, middle or lower.

These are price-based measurements. They are not footprint imbalance, time-at-price or session POC statistics.

The `~` prefix identifies the estimated buy/sell allocation and the resulting delta and delta-percentage values. Total volume remains the provider-reported volume for the selected source and is not itself an estimated allocation. Directional Run and Close Acceptance are separate price-based measurements and are not estimated volume figures.

Estimated OHLCV can support interpretations of initiative, response, exhaustion, failed breaks, auction continuation and pullbacks. These classifications remain interpretations of the available OHLCV evidence, not actual bid/ask trade classification.

Where independent lower-timeframe flow evidence is unavailable, the engine can describe directional price behaviour as UP RESPONSE or DOWN RESPONSE rather than implying that buyer or seller activity has been independently established. Estimated buyer/seller response and initiative candidates that require directional flow evidence are only used when a valid lower-timeframe sequence is available.

B. TradingView Footprint

スナップショット

For users with a TradingView Premium or Ultimate plan and a supported symbol, OFCC can use the native Footprint data returned by TradingView's `request.footprint()` function.

This mode evaluates the native footprint information available for each chart candle, including:

- Buy volume and sell volume.
- Total footprint volume.
- Volume delta and delta percentage.
- Diagonal buy/sell imbalance rows.
- Consecutive imbalance stack strength.
- Per-candle Point of Control (POC).
- Value Area High (VAH) and Value Area Low (VAL).
- Movement between adjacent candles' POCs.

Footprint-specific metrics

The two source-specific metric fields change automatically to:

- Buy/Sell Imbalance Stacks: OFCC reports two independent counts: the longest consecutive run of native buy-imbalance rows and the longest consecutive run of native sell-imbalance rows within the candle's footprint. The dashboard displays them together as `B3 / S2`, where each number is a count of adjacent price rows. These are row counts, not bullish/bearish candle counts or total numbers of imbalanced rows.
- POC Shift: The current candle's native POC movement compared with the immediately preceding candle's POC. The minimum movement is measured in the symbol's own minimum price increments (ticks). If either adjacent POC is unavailable, the result is N/A rather than comparing against an older candle.

Optional VAH and VAL chart lines are available in this mode only.

Native Footprint data enables the footprint-based initiative, buyer/seller response (absorption interpretation), balanced absorption, exhaustion and trap classification rules.

If Footprint data is unavailable for a candle, OFCC reports its unavailable status instead of silently substituting Estimated OHLCV measurements.

TradingView's native Footprint data provides a more detailed view of categorised volume within a candle. It does not represent a complete exchange order book or a direct record of every individual buyer-initiated or seller-initiated trade.

---

2. Candle Classification

The classification engine evaluates participation, price response and market context to select the strongest qualifying description.

Initiative Buying / Selling

Identifies directional participation accompanied by a corresponding price response.

In Footprint mode, the classification uses native delta strength, imbalance-stack strength, participation and price-response conditions.

In Estimated OHLCV mode, estimated initiative conditions require valid lower-timeframe directional evidence. They are not established by the chart-candle close-location proxy alone.

Buyer / Seller Response

Describes a price response occurring against the opposing side's observed or estimated participation.

In Footprint mode, the absorption interpretation evaluates native participation together with the candle's price response.

In Estimated OHLCV mode, BUYER RESPONSE or SELLER RESPONSE can be selected when estimated opposing participation coincides with the corresponding price reaction.

When independent lower-timeframe flow evidence is unavailable, directional price behaviour can instead be labelled UP RESPONSE or DOWN RESPONSE. These labels describe price behaviour only and do not imply independently established buyer or seller activity.

Absorption labels are analytical interpretations. They do not prove the presence of hidden resting orders or identify the participants behind the activity.

Buyer / Seller Exhaustion

Identifies conditions in which an extended directional move is accompanied by a weaker price response.

The interpretation considers recent auction direction, price extension, rejection characteristics and available delta behaviour. The calculation method differs between native Footprint and Estimated OHLCV modes.

Failed High / Failed Low and Traps

Identifies a move beyond a recent price extreme that closes back through the breached level.

Estimated OHLCV mode identifies failed breaks primarily from price behaviour. Footprint mode incorporates native participation and footprint-based conditions into its trap classification.

Upward / Downward Auction

Describes the broader directional state using recent price-path efficiency and directional persistence.

An upward or downward auction describes the recent market state. It does not require every individual candle to close in the same direction.

Pullback

Identifies a counter-move within an established upward or downward auction.

For example, PULL DOWN describes a downward counter-move within an upward auction. PULL UP describes an upward counter-move within a downward auction. The label describes the counter-move in relation to the broader state, not a confirmed reversal of that state.

Balance and Balanced Absorption

BALANCE appears when no dominant candle role is selected.

BALANCED ABSORPTION is a separate native Footprint classification. It identifies elevated participation with relatively balanced delta and limited directional progress. These two classifications are not interchangeable.

---

3. Market Context

A candle is easier to interpret when its surrounding market conditions are also considered. OFCC includes the following contextual measurements.

Higher-timeframe direction

The higher-timeframe regime uses the previous completed higher-timeframe candle and its EMA 20 and EMA 50 relationship.

- Bullish: Higher-timeframe close above EMA 20, with EMA 20 above EMA 50.
- Bearish: Higher-timeframe close below EMA 20, with EMA 20 below EMA 50.
- Balanced: Conditions that do not meet either directional definition.

Auto HTF derives the higher timeframe from the chart interval and selected multiplier. A manual higher timeframe can also be selected, provided it is strictly higher than the chart timeframe.

Recent market structure

Recent highs and lows are used to identify whether the current close is above, below or within the selected structural lookback. This provides additional context for evaluating price responses and failed extensions.

Auction behaviour

The auction engine measures the efficiency of the recent price path and the persistence of directional closes. These measurements are used to identify upward and downward auction states and their counter-moves.

Higher-timeframe alignment

The dashboard indicates whether directional behaviour agrees with or opposes the higher-timeframe regime, remains neutral, or is identified separately as an absorption case.

---

4. Confirmed Pivot-to-Pivot Delta Divergence

OFCC includes a separate confirmed pivot-to-pivot price-versus-delta divergence calculation. It compares distinct confirmed swing highs or swing lows instead of testing every new rolling high or low.

Two independent settings control swing identification:

- Pivot Left Bars: 3 by default. Completed candles used to establish the left side of a candidate swing.
- Pivot Right Bars: 2 by default. Additional completed candles required before that swing is confirmed.

High pivots are compared only with the immediately preceding confirmed high pivot. Low pivots are compared only with the immediately preceding confirmed low pivot. The high and low sequences are maintained independently; they do not need to alternate.

- Bearish Delta Divergence: A confirmed pivot high is higher than the preceding confirmed pivot high, while its signed Delta % is lower.
- Bullish Delta Divergence: A confirmed pivot low is lower than the preceding confirmed pivot low, while its signed Delta % is higher.

The comparison uses signed Delta %, not absolute delta volume. Both exact pivot candles must have valid flow evidence in the selected data source.

Every confirmed price pivot replaces the previous reference, even when its flow data is unavailable. The engine does not skip a pivot with missing flow evidence to compare against an older pivot. If one confirmation candle identifies both a pivot high and a pivot low, both references are updated but divergence is suppressed for that event.

A pivot is not known until the configured right-side candles have closed. Therefore, the DIV BEAR or DIV BULL marker and its alert appear on the confirmation candle, not retrospectively on the earlier pivot candle. The confirmation candle itself does not need a Footprint reading when both actual pivot candles already passed the flow-evidence requirement. The marker tooltip shows the two pivot times, prices, signed Delta % readings and confirmation delay.

Divergence remains a secondary event. It can appear alongside the primary candle classification without replacing it. Confirmed pivot divergence identifies a difference between price extremes and delta behaviour; it is not a reversal prediction.

---

5. Cumulative Volume Delta (CVD) Trend

OFCC calculates a daily-reset cumulative delta series and evaluates its EMA direction when valid flow data is available.

The CVD module is designed to avoid presenting incomplete or price-only proxy data as reliable cumulative flow confirmation.

Its availability follows these rules:

- It requires valid native Footprint or lower-timeframe directional flow data.
- The chart-candle close-location proxy is excluded from CVD confirmation.
- It requires a complete sequence of valid deltas during the daily session.
- If a chart candle within the session has unavailable flow data, the CVD sequence becomes incomplete and remains unavailable until the next daily reset.
- It is unavailable above the 1-day timeframe because a multi-day chart candle cannot reproduce the daily reset.
- On a daily chart, one aggregate candle per session cannot provide an intraday CVD direction.
- The first valid candle after the daily reset does not have a previous same-session value from which to calculate an EMA slope.

When available, CVD direction is compared with the balance of recent BULL and BEAR classifications within the configured flow-confirmation lookback. Other candle roles and bars without valid flow evidence occupy a position in the lookback but do not contribute to either directional count.

If the dominant classified direction conflicts with the CVD trend, OFCC can report a flow-confirmation warning. This warning is available in the dashboard hover details, chart-label hover details and the universal alert message. It is not displayed as a permanent dashboard row.

N/A is intentional in these circumstances. It means the required data is not available for a meaningful calculation.

---

6. Dashboard and Historical Order Flow Monitor

OFCC uses two complementary information displays. The chart dashboard and the separate-pane Order Flow Monitor can be shown or hidden independently.

Chart OFCC Dashboard

The chart dashboard appears on the main price chart and summarises:

- Current candle classification.
- Classification explanation and status.
- Buy and sell volume.
- Delta and delta percentage.
- The selected source-specific measurements.
- Higher-timeframe direction.
- Supporting checks and CVD context.

Its position and text size can be customised.

スナップショット

The main classification and status cells provide detailed hover information, including higher-timeframe direction, structure, auction state, alignment, CVD status, divergence, flow warning and supporting checks.

The footer distinguishes a confirmed candle from a developing candle. Its six supporting checks are descriptive conditions. They can overlap and are not independent observations, probabilities or statistical confidence measurements.

Historical Order Flow Monitor

スナップショット

The Order Flow Monitor occupies the indicator's separate pane and provides a candle-by-candle historical view. It includes:

- Bar number and candle time.
- Buy volume and sell volume.
- Delta and delta percentage.
- The two source-specific metrics.
- Higher-timeframe direction.
- Primary candle classification.

The monitor also provides detailed hover information:

- TIME cell: Full OHLC values, chart and selected volume, body percentage, close location, buy/sell volume, delta, delta percentage, source-specific metrics, higher-timeframe direction, classification, alignment, CVD status, calculation method and secondary divergence.
- ROLE cell: Classification, higher-timeframe direction, alignment, CVD status, divergence and calculation method.
- Metric headings: Explanations of Directional Run, Close Acceptance, both sides of the Buy/Sell Imbalance Stacks, and POC Shift.

The monitor offers two layouts:

- Compact: Displays the latest five completed candles.
- Full: Displays a configurable history of 5 to 30 completed candles. The default is 18.

The two source-specific metric columns change automatically with the selected data source. In Footprint mode, the imbalance cell shows both buy and sell stack counts together (for example, `B3 / S2`). In Estimated OHLCV mode, it shows Directional Run instead. This keeps the historical view consistent without presenting estimated price measurements as native Footprint statistics.

Historical candle times use the symbol's exchange timezone.

---

7. Chart Labels and Alerts

Primary candle labels and separate divergence markers are created on confirmed chart candles. Pivot divergence markers are placed on the confirmation candle, not on the earlier pivot candle.

Hover over dashboard metric labels or values to see explanations of their calculations and meaning. Hover over a chart candle marker to inspect its detailed candle-level information, including OHLC, body and close location, buy/sell volume, delta, source-specific metrics, HTF, role, CVD, divergence, selected data source and volume units.

スナップショット

The dashboard can show developing information on the open candle, but the historical monitor stores completed candles. A developing classification should not be treated as final until the candle closes.

OFCC provides individual alert conditions for its supported candle classifications and bullish/bearish confirmed pivot-to-pivot delta divergence.

It also includes a universal alert message containing:

- Symbol and timeframe.
- Primary candle role, or an unavailable Footprint note if the confirmation candle has no Footprint reading.
- Classification status when applicable.
- Confirmed divergence direction and its pivot comparison details.
- Selected delta and delta percentage.
- Selected data source.
- Any applicable flow-confirmation warning.

To use the universal notification, select Any alert() function call when creating the TradingView alert. Alternatively, select the individual OFCC alert conditions to receive only the events you follow.

A neutral BALANCE classification by itself does not generate an alert. BALANCED ABSORPTION is a separate classification and has its own alert condition. Use one alert route per event unless duplicate notifications are intentional.

Worked Example : Reading a Footprint Sequence

The example below illustrates how OFCC connects candle classifications, price behaviour and native Footprint evidence. It shows an upward auction, a failed upside extension, a seller response and pullback, followed by a buyer response and renewed upward movement.

スナップショット

---

8. Important Settings

The settings are organised by calculation purpose.

Data Source

Choose between Estimated OHLCV and TradingView Footprint.

Estimated OHLCV Engine

Choose Auto or Custom for the intrabar timeframe. A Custom interval must be strictly lower than the chart interval and supported by available data.

Footprint Engine

When native Footprint mode is selected, adjust:

- Footprint ticks per row.
- Value Area percentage.
- Diagonal imbalance threshold.
- Separate buy- and sell-imbalance stack readings in the dashboard and monitor.
- Stack-strength scale for initiative confirmation.
- Minimum movement for adjacent-candle POC Shift.

Optional VAH and VAL chart lines can also be enabled in this mode.

Character Engine

Adjust the initiative delta threshold, elevated participation threshold, trap breakout lookback and auction-state settings.

The Minimum Classifier Score and Exhaustion Delta Velocity Threshold settings apply only to the native Footprint classification engine. Estimated OHLCV uses its own source-specific classification conditions.

The Minimum Classifier Score controls scored Footprint candidates. Balanced Absorption is a separate fixed-score rule, while auction continuation and pullback classifications are state-based fallbacks. The score is not a probability.

Delta Divergence

- Pivot Left Bars: Default 3; controls the left-side swing requirement.
- Pivot Right Bars: Default 2; controls confirmation delay. Increasing this value requires more completed candles before a pivot can produce a divergence event.

Confirmation delay is measured in chart bars. For example, two right-side bars represent 2 minutes on a 1-minute chart, 10 minutes on a 5-minute chart and 30 minutes on a 15-minute chart, subject to the market's trading session.

Trend Context

Choose automatic higher-timeframe selection or specify a manual higher timeframe. The selected higher timeframe must be strictly higher than the chart timeframe.

CVD and Flow Confirmation

Adjust the CVD EMA length and recent flow-confirmation lookback.

Display

Choose Compact or Full history, adjust the Full history count, show or hide candle labels and tooltip markers, enable the chart dashboard and the separate Order Flow Monitor independently, customise the chart dashboard position and text size, and optionally display native VAH/VAL lines.

Settings allow the analysis to be adapted to different instruments and chart intervals. They do not guarantee that one configuration will be suitable for every market or data feed.

---

9. Data Handling and Limitations

Please consider the following before interpreting the results:

- Chart compatibility: OFCC requires a standard time-based chart using actual OHLC prices. Synthetic or calculated-price chart types, including Heikin-Ashi, Renko, Line Break, Kagi and Point & Figure, are not supported.
- Estimated data: Estimated OHLCV values are derived from lower-timeframe candle direction or chart-candle close location. They are not equivalent to native Footprint data or actual bid/ask trade classification.
- Price-derived proxy: Close-location volume allocation comes from the same candle's price and cannot independently confirm its own buying or selling pressure.
- Native Footprint: TradingView Footprint data depends on account access, symbol support and data availability for each candle. Missing Footprint data is reported as unavailable.
- Footprint resource usage: Native Footprint mode processes price-row data for each chart candle. Smaller Footprint ticks-per-row settings create more price rows and can increase memory and processing requirements, particularly with extensive historical data or long Bar Replay sessions. Depending on the symbol, timeframe and available history, TradingView may report a "Memory limits exceeded" error. If this occurs, increase Footprint ticks per row to reduce the number of rows, use a shorter Replay range, or switch to Estimated OHLCV. This is a possible platform resource limitation, not an error that occurs on every chart.
- Market interpretation: Absorption, exhaustion and trap classifications are interpretations of observed participation and price response. They do not prove hidden orders, participant identity or institutional activity.
- Divergence: Both the current pivot candle and its immediately preceding same-type pivot must have valid flow evidence. The calculation does not substitute an older reference when the selected pivot lacks valid data. Markers and alerts occur only after the configured right-side bars have closed.
- CVD: CVD is intentionally unavailable when the daily sequence is incomplete or the chart timeframe cannot support the daily-reset calculation.
- Volume units: Reported units depend on the symbol, exchange, broker and data provider. TradingView identifies volume types as base currency, quote currency, tick (number of transactions) or unspecified. Tick volume is not equivalent to base-currency volume, quote-currency volume or contract quantity.
- Historical coverage: Lower-timeframe data availability and historical coverage depend on the symbol, data feed and TradingView account. Provider revisions can change earlier estimates after a chart reload.
- Classification score: The classifier score and six supporting checks are descriptive ranking aids. They are not probabilities, win rates, forecasts or statistical confidence measurements.
- Confirmation: Chart labels and alerts use confirmed chart candles. This avoids reporting a final classification before the candle closes, but it cannot guarantee immutable historical data. Historical values may change if the underlying provider revises its data.

---

Intended Use

Order Flow Candle Classifier is an analytical and educational indicator intended to help traders organise and interpret volume participation, delta, price response and auction behaviour.

It is not a standalone buy/sell system, does not predict market outcomes and does not guarantee trading results. Its classifications should be considered alongside price structure, broader market conditions and independent risk management.

For informational and educational purposes only. Trading involves substantial risk.

免責事項

これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。