OPEN-SOURCE SCRIPT

PumpC Price Action Candles & MAs

47
PumpC – PAC & MAs (Open Source)

A complete Price Action Candles (PAC) toolkit with Fair Value Gaps, Inside Bars, Hammers, and Inverted Hammers—combined with a flexible Moving Averages (MAs) module. Draws forward-extending boxes, optionally recolors levels once price trades back through them, qualifies signals with a global High-Volume filter, and ships with ready-made alerts. Works on intraday through swing across any market (e.g., QQQ, $CME:ES1!, EURUSD, BTCUSD).


This is an open-source script. The description explains purpose, behavior, and configuration so traders can evaluate fit. It makes no performance claims and does not provide trade advice.


Acknowledgment & credits

This script builds upon structural and box-handling code patterns originally derived from the Super OrderBlock / FVG / BoS Tools by makuchaku & eFe. Their work established the foundation for array handling, forward-extending boxes, and mitigation recoloring. I have adapted, reorganized, and expanded this framework to integrate PAC-specific logic, Al Brooks-inspired price action interpretations, high-volume filters, and a custom multi-timeframe MA module.

What it does

  • Fair Value Gaps (FVG): Highlights three-bar displacement gaps with forward-extending boxes, labeled FVG+ (bullish) and FVG- (bearish). Optional mitigation recolor when price later trades back into the gap.
  • Inside Bars (IB): Boxes inside ranges when a bar is fully contained in the prior bar. Can require high volume to emphasize participation.
  • Hammers (H) & Inverted Hammers (IH): Detects candles using configurable body/upper/lower-wick thresholds. Can require high volume.
  • Mitigation recolor: Per-pattern option to flip a box to a mitigated color after price trades back through its vertical range.
  • Moving Averages (MAs): Up to four configurable lines with a global type (EMA or SMA), custom lengths, per-MA timeframe selection, per-MA color, and a clean plotting rule to avoid clutter when downshifting timeframes.
  • Alerts included: New FVG+, FVG-, IB, H, and IH events can trigger TradingView alerts and webhooks.


How it works

  • FVG: Identifies a gap between the current bar and the bar two periods back. A box spans the gap and extends forward. If mitigation recolor is enabled, the box changes to the mitigated color once price trades back inside it.
  • IB: A bar is “inside” when its high is at or below the previous high and its low is at or above the previous low. The box extends forward; high-volume qualification is optional.
  • Hammer / Inverted Hammer: Classifies candles by body size relative to total range and wick proportions. Each event becomes a forward-extending box; high-volume qualification is optional.
  • MAs: Choose EMA or SMA globally, set each MA’s length and (optionally) a higher timeframe source. When a higher timeframe is chosen, the line only plots when that timeframe is above the chart’s timeframe, keeping visuals honest and uncluttered.


Connection to Al Brooks’ PAC teachings
This script reflects Al Brooks’ Price Action Candles (PAC) methodology: micro-patterns like Inside Bars, Hammers, and Inverted Hammers gain meaning not in isolation, but in context of the surrounding trend, supply/demand zones, and failed breakouts. Brooks emphasizes reading effort vs. result—what participants are trying to do, and whether they succeed.

By highlighting these PACs and layering in volume confirmation, the script helps traders see which small patterns are worth paying attention to.

Why the High-Volume filter matters

Volume is a practical proxy for conviction. A pattern formed on light volume can be misleading noise; one formed on above-average volume has greater weight and aligns with Brooks’ view of price action strength.
The global high-volume filter in this script lets you:
  • Elevate Inside Bars that show absorption or compression with significant activity.
  • Distinguish Hammers that reject lower prices aggressively from those that simply drift.
  • Highlight Inverted Hammers where sellers dominate with conviction.


This makes PAC readings cleaner and more actionable, especially in thin sessions or small timeframes.

Inputs & customization
Inputs are grouped for fast configuration: visibility first, then colors and styling, then labels, with a shared High-Volume baseline.
High-Volume Filter (global)
  • High-Vol Lookback: Length for the average volume baseline.
  • High-Vol Multiple: A pattern only qualifies (when its toggle is on) if its volume exceeds the baseline multiplied by this factor.


Fair Value Gaps
  • Plot / Recolor Mitigated: Show gaps and optionally flip boxes when price trades back inside.
  • Colors: Separate colors for FVG+ and FVG-, plus mitigated color.
  • Box style & capacity: Border style, transparency, and maximum number of boxes.
  • Labels: Toggle label, choose label color and size.


Inside Bar (IB)
  • Plot / Require High Volume / Recolor Mitigated: Main controls.
  • Colors: IB color and mitigated color.
  • Box style & capacity: Border style, transparency, max boxes.
  • Labels: Toggle label, color, size.


Hammer (H)
  • Plot / Require High Volume / Recolor Mitigated: Main controls.
  • Colors & style: Primary and mitigated colors, border style, transparency, max boxes.
  • Labels: Toggle label, color, size.
  • Thresholds: Body-to-range maximum %, minimum lower-wick-to-range %, and maximum upper-wick-to-range %.


Inverted Hammer (IH)
  • Plot / Require High Volume / Recolor Mitigated: Main controls.
  • Colors & style: Primary and mitigated colors, border style, transparency, max boxes.
  • Labels: Toggle label, color, size.
  • Thresholds: Body-to-range maximum %, minimum upper-wick-to-range %, and maximum lower-wick-to-range %.


Moving Averages (MAs)
  • MA Type: EMA or SMA (global selection).
  • Source: Choose price source (default: close).
  • Per-MA settings (x4): Toggle on/off, length, optional higher-timeframe source, color.
  • Clean plotting rule: If a higher timeframe is selected, the line displays only when that timeframe is above the chart timeframe, preventing clutter and keeping visuals accurate.


Alerts
Five alert conditions fire when a new pattern is created on the detecting bar—ideal for notifications or webhook automation.
  • New Bullish FVG (+)
  • New Bearish FVG (-)
  • New Inside Bar (IB)
  • New Hammer (H)
  • New Inverted Hammer (IH)


Suggested workflow
  1. Pick market & timeframe: Script works across equities, futures, forex, and crypto from scalping to swing.
  2. Toggle what you trade: Enable only the patterns you act on. Assign distinct colors for clarity.
  3. Use MAs for bias: Track trend, slope, and pullbacks. Consider sourcing one or more MAs from a higher timeframe for structural context.
  4. Enable High-Volume gating when needed: Filter out weak PACs during low participation. Tune the lookback/multiple per market.
  5. Monitor mitigation state: Recolored boxes immediately reveal which levels have been interacted with.
  6. Set alerts with purpose: Only enable alerts for setups aligned with your plan, then combine with structure, timing, and risk rules.


Originality
  • Unified PAC engine: FVG, IB, H, and IH presented consistently as forward-extending boxes with optional mitigation.
  • Brooks-inspired design: Patterns are contextualized with volume and MAs, reflecting Al Brooks’ PAC methodology.
  • Flexible high-volume gating: Shared baseline with per-pattern toggles supports cleaner signals across markets.
  • MTF-aware MAs: Higher-timeframe averaging with clutter-free plotting rules.
  • Open-source transparency: Code is fully available for learning, modifying, or extending.


Disclaimer
For educational and informational purposes only. Not financial advice. Trading carries risk; always manage exposure and test before live use.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.