BPR + SFP Indicator: Overlapping Gaps And Failed Sweeps

Written by Dominic Walsh · Published · Last updated

The bpr + sfp indicator puts two smart-money reads on one chart. A balanced price range is where a bullish gap and a bearish gap cover the same prices, so the market skipped that band twice. A swing failure pattern is a wick that takes out a swing and closes back inside.

This build ships as a compiled .ex4 for MT4 and .ex5 for MT5; the screenshots below come from EURUSD H1.

Platforms MT4 (.ex4) + MT5 (.ex5)
Chart window Main price chart
Plots 2: SFP Buy, SFP Sell
Alerts popup, push notification, email, sound
Inputs 24

What the BPR + SFP Indicator draws on the chart

SFP Buy places an aqua arrow where a wick swept a swing low and closed back above.

SFP Sell places an orange red arrow for the mirror case.

OBJ_RECTANGLE outlines shade each balanced price range, in supply or demand colour.

A corner panel summarises what the tool currently holds.

  • SFP Buy: arrow, aqua, width 3, arrow code 233
  • SFP Sell: arrow, orange red, width 3, arrow code 234
BPR + SFP indicator on EURUSD H1 with balanced range zones and sweep arrows
BPR + SFP indicator on EURUSD H1 with balanced range zones and sweep arrows

How the BPR + SFP Indicator calculates its values

Finding the gaps

A bullish gap exists when the third candle low still sits above the first candle high. The bearish case mirrors that. `InpFvgLook` `160` bounds the search and `InpMinFvgPts` `15` sets the smallest gap worth keeping.

Pairing them into a zone

Two opposite gaps whose prices overlap form a balanced range. `InpPairSpan` `40` limits how far apart they may sit. `InpMaxZones` `6` caps the rectangles, and each one extends `InpExtendBars` `8` past the last candle.

Testing a failed sweep

A sell needs the bar wick above the highest high of `InpSwingLook` `20` bars by at least `InpMinSweep` `15` points, and the close back below it. `InpMinAge` `3` demands the swept swing be genuinely older.

How to read the signals

A shaded band marks prices the market skipped in both directions.

An arrow marks a raid on resting orders that did not hold.

Zones above price read as supply and zones below as demand.

The two ideas are independent, so a sweep into a zone is worth more than either alone.

Alert channels in this build: popup, push notification, email and sound, one message per closed bar.

Alerts run through `EnableAlerts`, which is true out of the box, and `EnablePopup` delivers the text. `EnablePushNotify`, `EnableEmail` and `EnableSound` all begin false. `SoundFile` picks the clip. Sweeps confirm on closed bars, one message per bar.

Every BPR + SFP Indicator input

Core settings

Setting What it does Default
InpSwingLook Bars scanned for the swept swing. Bars scanned for the swept swing, default `20`. 20
InpMinAge Swept swing must be at least N bars old. How old the swept swing must be, default `3` bars. 3
InpMinSweep Minimum wick sweep beyond the swing (points). Minimum wick travel beyond the swing, default `15` points. 15
InpNeedBodyDir Require the SFP bar body to agree. Requires the bar body to agree with the sweep, default `true`. on
InpCooldown Minimum bars between same-side arrows. Bars kept between same-side arrows, default `5`. 5
InpFvgLook Bars scanned for fair value gaps. Bars scanned for gaps, default `160`. 160
InpMinFvgPts Minimum gap height (points). Smallest gap height kept, default `15` points. 15
InpPairSpan Max bars between the paired gaps. Largest bar gap between the paired imbalances, default `40`. 40
InpMaxZones Maximum BPR rectangles drawn. Cap on the rectangles drawn, default `6`. 6
InpExtendBars Extend zones N bars past the last bar. Bars a zone runs past the last candle, default `8`. 8

Display settings

Setting What it does Default
InpArrowOffset Arrow offset from the wick (points). Mark distance from the wick in points, default `45`. 45
InpMaxLabels Maximum BUY / SELL text labels kept. 40
InpShowBPR Draw balanced price range zones. Draws the balanced range zones, default `true`. on
InpSupplyColor BPR above price. Colour for a zone above price, default tomato. tomato
InpDemandColor BPR below price. Colour for a zone below price, default deep sky blue. deep sky blue
InpShowPanel Show summary panel. Draws the summary panel, default `true`. on
InpPanelCorner 0=UL 1=UR 2=LL 3=LR. 0
InpPanelBg (see inputs panel) black

Alert settings

Setting What it does Default
EnableAlerts Master switch for the sweep alerts, default `true`. on
EnablePopup Terminal dialog on a sweep, default `true`. on
EnablePushNotify Phone push on a sweep, default `false`. off
EnableEmail Mail delivery on a sweep, default `false`. off
EnableSound Sound playback on a sweep, default `false`. off
SoundFile Wav clip for the sweep alert, default `alert.wav`. alert.wav
BPR + SFP indicator inputs: InpSwingLook, InpMinSweep, InpFvgLook, InpMaxZones
BPR + SFP indicator inputs: InpSwingLook, InpMinSweep, InpFvgLook, InpMaxZones

Settings that fit your chart

Both ideas come from intraday smart-money work. EURUSD H1 is the reference chart, where `InpFvgLook` at `160` covers about a week. On M15 the zones form faster and the sweeps come more often. On H4 both turn rare, and each one covers a much wider band of price.

When the BPR + SFP Indicator fails

A gap is a three-candle shape, and plenty of them carry no meaning at all.

`InpMinSweep` counts points, so it needs resetting for each instrument.

The tool marks a failed sweep and stops. Nothing tracks what happens afterwards.

Copy the compiled BPR + SFP Indicator file into your MQL4/Indicators folder, and the MT5 build into MQL5/Indicators, then restart the terminal and drag it onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.

Background reading on the method behind the BPR + SFP Indicator: Overnight market on Wikipedia, JPY at Investopedia.

Download the BPR + SFP Indicator for MT4 and MT5

The zip holds the compiled BPR + SFP Indicator build for MT4 and MT5, plus a short README. Compiled files only, no source. Enter your email below and the download link arrives in your inbox.

Download this indicator free

Enter your email and the file is yours. You also get the full MT4 and MT5 library.

  • 1,380+ indicators
  • MT4 and MT5 files
  • No spam, unsubscribe any time

FAQ

What does InpPairSpan need to form a zone?

Two fair value gaps in opposite directions covering the same prices. The market skipped that band once going up and once coming down. `InpPairSpan` `40` limits how many bars can separate the two gaps that form it.

What does InpMinSweep at 15 require?

The wick has to clear the swept swing by fifteen points, which is a pip and a half on a five-digit feed. A wick that just touches the level does not count. Raise it on an instrument with larger candles.

Why does InpMinAge matter for an SFP Sell?

Because sweeping a swing from two bars ago proves nothing. `InpMinAge` `3` demands the swept high be at least three bars old, so the level had time to attract resting orders before the wick took it out.

What does InpNeedBodyDir add?

One more condition on the sweep bar. With it true, a bearish sweep also needs the bar to close below its open. That rules out a bar that wicked above a swing and still finished as a strong up candle.

Are results guaranteed?

No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the BPR + SFP Indicator as one input. Always backtest before trading live.

External references

Dominic Walsh - Forex trader and MT4/MT5 developer

About the author

Written by Dominic Walsh, a Forex trader and MT4/MT5 indicator, Expert Advisor and script developer. Every tool on forexmt4systems.com is tested on live charts before release and ships with ready-to-use compiled MT4 (.ex4) and MT5 (.ex5) files. Learn more about the trader and developer behind this site.

How we build, test and correct every tool: Editorial & Testing Policy. Trading carries risk; see the disclaimer.

Leave a Comment