OPEN-SOURCE SCRIPT

HTF Power of Three Pro

1 290
HTF Power of Three Pro

Overview

Power of Three (PO3) is a Smart Money Concepts framework developed by ICT / Inner Circle Trader. It models every higher-timeframe candle as a three-stage institutional campaign: Accumulation (price consolidates near the open), Manipulation (a liquidity sweep in one direction), and Distribution (expansion and close in the opposite direction). Recognising this structure on higher timeframes gives traders a narrative for where price has been and where it is likely to go within the current candle.

This indicator renders the HTF PO3 candle directly on your lower-timeframe chart as a body box with full wicks, a live countdown timer, and a projection panel to the right of price. Beyond the basic candle, it integrates real footprint delta data from `request.footprint()` to flag whether the net order flow inside each candle supports its directional move — separating candles with genuine institutional conviction from those that closed in a direction without confirming buy or sell pressure.

How It Works

The indicator requests OHLC and time data from a user-selected higher timeframe using `request.security()` with `lookahead_on` so the open is always known at the start of each HTF candle. On each lower-timeframe bar, it accumulates the running high, low, close, and footprint delta. When the HTF candle closes, the completed candle is drawn as a body box with wick lines and a delta label. A live box redraws on every tick to show the in-progress candle.

For footprint data, each lower-timeframe bar requests a `footprint` object via `request.footprint()`. The indicator sums all row deltas to obtain the bar's net delta, then classifies each bar as belonging to the lower or upper half of the current HTF range based on bar midpoint vs. HTF midpoint:

Pine Script®
footprint fp = request.footprint(i_fpTicks, i_fpVa, i_fpImb) float barDelta = na float barLHD = na // lower-half delta accumulator float barUHD = na // upper-half delta accumulator if not na(fp) array<volume_row> rows = fp.rows() float totalD = 0.0 for row in rows totalD += row.delta() barDelta := totalD htfMid = (htfH + htfL) / 2.0 barMid = (high + low) / 2.0 if barMid < htfMid barLHD := totalD barUHD := 0.0 else barLHD := 0.0 barUHD := totalD


At the end of each HTF candle, the indicator tests for Volume Concentration Conviction: for a bullish candle, the indicator checks whether a configurable percentage of delta came from bars in the lower half of the range (smart money accumulating below before distributing up). For a bearish candle, it checks whether the majority of sell delta came from the upper half. Candles that pass this test receive a glow halo and a highlighted border, and their delta label is stamped with a concentration percentage badge.

Colour Coding

  • Body box — bullish: configurable fill (default semi-transparent green) with grey border.
  • Body box — bearish: configurable fill (default semi-transparent red) with black border.
  • Conviction highlight — bull: cyan glow halo and border (default #00e5ff) indicating buy delta concentrated in the lower half of range.
  • Conviction highlight — bear: amber glow halo and border (default #ff9800) indicating sell delta concentrated in the upper half of range.
  • Delta label — positive: lime green text showing net buy delta.
  • Delta label — negative: red text showing net sell delta.
  • Macro windows: yellow fill boxes marking 20-minute ICT macro windows around hourly pivots (EST).
  • Session boxes: user-defined colour fills for up to three intraday sessions.


Inputs

PO3 Settings

  1. Timeframe — the higher timeframe whose candle the indicator models. Must be strictly above the chart timeframe; a runtime error fires otherwise. Default: 180 (3-hour).
  2. Use NY Midnight — replaces the regular session open with the 00:00 EST candle open for Daily and Weekly timeframes, aligning with ICT's NY Midnight concept. Default: off.


HTF PO3 Appearance

  1. Body (Bull / Bear) — fill colours for bullish and bearish HTF candle bodies. Default: semi-transparent green / red.
  2. Border (Bull / Bear) — border colours for the body box. Default: grey / black.
  3. Wick (Bull / Bear) — wick line colours. Default: semi-transparent grey for both.


Projection Panel

  1. Show Projection Panel — toggles the mini-panel drawn to the right of the last bar showing the live candle alongside recent closed candles. Default: on.
  2. Candles to Show — number of historical HTF candles to display in the panel, not counting the live candle. Range: 1–10. Default: 3.
  3. Right Offset (Bars) — gap in bars between the last chart bar and the left edge of the panel. Increase this if labels overlap price. Default: 15.
  4. Candle Width — width in bars of each panel candle slot. Range: 2–30. Default: 6.
  5. Gap — spacing in bars between candle slots. Range: 1–30. Default: 10.
  6. Show OHLC Labels — prints O/H/L/C price labels to the right of each panel candle. Default: on.
  7. Show Delta Labels — prints the net delta below each panel candle, with a conviction badge where applicable. Default: on.


LTF Projections (Live PO3)

  1. OHLC Price — shows O/H/L/C price labels beside the live HTF candle on the main chart. Toggle and colour configurable. Default: on, silver.
  2. Mode — switches OHLC labels between absolute price and percentage of the current HTF range. "% Range" is useful on instruments with large nominal prices. Default: Normal.
  3. Open Line — draws a dashed line at the HTF open price extending 50 bars to the right. Toggle, colour, and width configurable. Default: on, grey, width 1.
  4. L/H Lines — draws dashed lines at the running HTF high and low extending to the right. Toggle, colour, and width configurable. Default: on, teal, width 1.
  5. Label & Text Size — governs the size of all labels and table text. Options: Auto, Tiny, Small, Normal, Large, Huge. Default: Small.


LTF Projections (Previous PO3)

  1. Show Previous PO3 — draws the prior HTF candle's open, high, low, and equilibrium (midpoint) as persistent lines across the chart. Default: on.
  2. Prev Open Style / Colour / Width — line style, colour, and width for the previous candle's open level. Default: Dashed, orange, width 1.
  3. Prev H/L Style / Colour / Width — line style, colour, and width for the previous candle's high and low. Default: Dashed, yellow, width 1.
  4. Prev EQ Style / Colour / Width — line style, colour, and width for the previous candle's equilibrium (50% level). Default: Dotted, semi-transparent white, width 1.
  5. Extend Previous Opens — projects the open price of up to 10 past HTF candles as faded dotted lines across the chart, useful for identifying historical open-price magnets. Default: off.


Dealing Range

  1. Show Dealing Range — draws the four premium/discount quadrant levels of the live HTF candle: High, Q3 (75%), EQ (50%), Q1 (25%), Low. Default: off.
  2. H/L Style / Colour / Width — appearance of the High and Low boundary lines. Default: Solid, white, width 1.
  3. EQ Style / Colour / Width — appearance of the 50% equilibrium line. Default: Dashed, semi-transparent white, width 1.
  4. Q1/Q3 Style / Colour / Width — appearance of the 25% and 75% quartile lines. Default: Dotted, semi-transparent grey, width 1.
  5. Show Level Labels — annotates each dealing range line with its name (DR High, Q3 75%, etc.). Default: on.


Weekly Profile

  1. Show Weekly Profile — when the HTF timeframe is set to W, draws individual daily candle body boxes inside the weekly range, coloured by day of week. Best used alongside a Weekly timeframe setting. Default: off.
  2. Mon / Tue / Wed / Thu / Fri — fill colours for each day's body box in the weekly profile. Defaults: blue, purple, orange, teal, red (all semi-transparent).


Time & Price

  1. Mode — selects the time-and-price overlay. Off: no overlay. Macros: draws 8 ICT 20-minute macro windows around hourly EST pivots as coloured boxes. Session: draws up to 3 user-defined intraday sessions as coloured boxes. Day of Week: groups weekdays into two PO3-style candles (Group A: Mon–N, Group B: remaining days). Default: Off.
  2. Macro Color / Border — fill and border colours for ICT macro window boxes. Default: semi-transparent yellow fill, solid yellow border.
  3. Session 1 / 2 / 3 — enable toggle, start time (HH:MM, 24h, exchange timezone), end time, and fill colour for each session. Sessions may cross midnight. Defaults: Session 1 08:30–12:00 blue; Session 2 12:00–16:00 green; Session 3 disabled.
  4. Group A: Days 1–N — the number of weekdays (counting from Monday) that form Group A in Day of Week mode. Range: 1–4. For example, 4 groups Mon–Thu together; Friday becomes Group B alone. Default: 4.
  5. Group A / Group B Colour — fill colours for the two day-of-week candle groups. Default: blue / red (semi-transparent).


Footprint Delta

  1. HTF Delta Labels — prints net delta text below each completed HTF candle drawn on the main chart. Default: on.
  2. Live Delta Label — prints the running net delta below the live HTF candle, updating on every tick. Default: on.
  3. Ticks per Row — the price range of each footprint row passed to `request.footprint()`. Smaller values (e.g. 1–2) produce finer row granularity; larger values (e.g. 10+) produce coarser rows and faster execution. Match this to your instrument's typical tick structure. Default: 4.
  4. VA Percent — the Value Area percentage passed to `request.footprint()` for POC/VA calculations. Range: 1–100. Default: 70.
  5. Imbalance % — the ask/bid ratio threshold passed to `request.footprint()` for identifying imbalanced rows. Default: 300.
  6. Positive / Negative Delta Colour — text colours for positive and negative delta labels. Default: lime / red.


Volume Concentration

  1. Show Conviction Highlight — enables the glow halo and border highlight on candles where delta is concentrated in the directionally correct half of the HTF range. Disable to suppress all conviction visuals without changing other settings. Default: on.
  2. Concentration Threshold % — the minimum percentage of total half-range delta that must come from the conviction zone to qualify a candle. At 51% any slight lean qualifies; at 80%+ only strongly concentrated candles qualify. Range: 51–100. Default: 60.
  3. Bull Conviction / Bear Conviction Colour — glow and border colours for bullish and bearish conviction candles. Default: cyan (#00e5ff) / amber (#ff9800).
  4. Highlight Border Width — border width of the conviction glow box and body border. Range: 1–4. Default: 2.


PO3 Info Table

  1. Range — sets whether the range row in the info table displays as a price difference or as a tick count. Default: Price.
  2. Position — vertical (top / middle / bottom) and horizontal (left / center / right) position of the info table. Default: middle right.
  3. Label / Text Colour — background colour for label cells and text colour for value cells. Default: semi-transparent grey labels, white text.


Usage Notes

  • Set the timeframe to one step above your trading chart. On a 15-minute chart, a 3-hour or 4-hour HTF candle gives you the PO3 campaign context most traders use for intraday bias.
  • Use the conviction highlight to filter entries. A bullish HTF candle with a cyan glow means buy delta was concentrated in the lower range half — consistent with institutional accumulation. A candle that closes bullish without conviction may be a manipulation leg rather than a genuine distribution.
  • The Dealing Range levels (H, Q3, EQ, Q1, L) provide premium and discount zones for the current HTF candle. Entering long below EQ and short above EQ aligns with the PO3 distribution model.
  • Enable Extend Previous Opens to track historical HTF open prices as potential support and resistance. Price frequently returns to prior HTF opens before continuing.
  • In Macros mode, the 8 ICT windows mark the 20-minute periods where London and New York session pivots are typically formed. These are common manipulation windows within the daily PO3 cycle.
  • The Ticks per Row input should match your instrument's structure. For index futures (e.g. ES, NQ), 4–10 ticks per row is typical. For forex pairs with 5-digit pricing, 1–2 ticks may be more appropriate.
  • The indicator requires a higher timeframe than the chart. Setting the timeframe equal to or below the chart timeframe triggers a runtime error by design.
  • Footprint data requires a TradingView plan that includes volume footprint access. If `request.footprint()` returns `na` consistently, check your plan level and confirm the symbol provides tick data.


Recommended Pairings

  • Works well alongside an order block or fair value gap indicator to confirm that PO3 manipulation legs are sweeping known liquidity zones.
  • Pair with a session VWAP indicator to see how the HTF open relates to volume-weighted price — divergence between the HTF open and VWAP is a common manipulation signal.

免責聲明

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