Balanced price range
All indicators

LibraryMarket structure

Indicator

Balanced price range

Balanced price ranges: the overlap of a bullish and a bearish fair value gap, a range price has crossed fast in both directions and often reacts to when it returns.

Market structureOn the price3 inputsBPR

How it is calculated

Gaps as in fvg (third candle against the first, at least min_size ATRs), filled or not; the last max_zones per side are kept. When a bar makes a gap, the newest earlier gap of the other side that overlaps it gives the range: from the higher bottom to the lower top. It takes the new gap's side: a bullish gap over a bearish one makes a bullish range. A range ends on a close through its far side.

Reference: ICT liquidity concepts, from public descriptions (#546)

How to read it

A range shows on the third candle of the newer gap, never earlier. The lines show the nearest bullish range (the highest) and bearish one (the lowest); new and broken are 1 on the bar of the event, and at most max_zones ranges per side are kept.

In a strategy

Buy the return into a bullish range: with r = ctx.ind("bpr", atr_length=14, min_size=0.25) a long limit at r.bull_top with the stop below r.bull_bottom.

Inputs

InputTypeDefaultRange or choices
ATR lengthatr_lengthWhole number14min 1, max 500
Minimum size (ATR)min_sizeNumber0.25min 0, max 10
Zones kept per sidemax_zonesWhole number20min 1, max 500

What it draws

LineDrawn as
Bullish topSteps
Bullish bottomSteps
Bearish topSteps
Bearish bottomSteps

Used in

No strategy template reads it yet.

OrionQuant