Internal Bar Strength

Measures intrabar momentum by comparing closing price to the bar's range.

About the Internal Bar Strength

Internal Bar Strength (IBS) is a simple yet powerful momentum oscillator that measures where the closing price falls within the bar's range. It provides a normalized value between 0 and 1, indicating the relative position of the close within the high-low range of each period.

Originally developed to identify mean-reversion opportunities, IBS has become popular among both short-term and swing traders for spotting overbought and oversold conditions based on intrabar price action.

What It Measures

Internal Bar Strength measures the relative position of the closing price within a bar's range, expressed as a ratio between 0 and 1, indicating whether the bar closed near its high (strong) or low (weak).

When to Use

  • Mean Reversion Trading: Identifying potential reversal points when IBS reaches extreme values
  • Overbought/Oversold Conditions: Values near 0 suggest oversold conditions, values near 1 suggest overbought
  • Entry Timing: Confirming entry points for counter-trend trades
  • Market Sentiment: Understanding whether buyers or sellers controlled the bar's close
  • Relative Strength Analysis: Comparing IBS across different timeframes or assets
  • Pattern Recognition: Identifying exhaustion bars where close differs significantly from typical range position

Interpretation

  • IBS Near 1 (0.8-1.0): Indicates strong buying pressure with close near the bar's high; potential overbought condition
  • IBS Near 0 (0.0-0.2): Indicates strong selling pressure with close near the bar's low; potential oversold condition
  • IBS Around 0.5: Neutral bar with close in middle of range; indicates indecision or balanced pressure
  • Extreme Readings: Values below 0.1 or above 0.9 often signal potential reversals in mean-reverting markets
  • Consecutive Extremes: Multiple bars with extreme IBS values may indicate trend exhaustion
  • Context-Dependent: IBS interpretation should consider overall market trend and volatility conditions
  • No Period Parameter: Unlike most oscillators, IBS is calculated independently for each bar without smoothing or averaging

Example Usage

use centaur_technical_indicators::other_indicators::bulk::internal_bar_strength;

pub fn main() {
    // fetch the data in your preferred way
    // let close = vec![...];  // close prices
    // let high = vec![...];   // high prices
    // let low = vec![...];    // low prices
    
    let ibs = internal_bar_strength(&high, &low, &close);
    println!("Internal Bar Strength: {:?}", ibs);
}
import centaur_technical_indicators as cti

# Internal Bar Strength calculation
ibs = cti.other_indicators.bulk.internal_bar_strength(high, low, close)
print("Internal Bar Strength:", ibs)
import init, { 
    other_bulk_internalBarStrength
} from 'https://cdn.jsdelivr.net/npm/centaur-technical-indicators@latest/dist/web/centaur-technical-indicators.js';

await init();

// fetch the data in your preferred way
// const close = [...];  // close prices
// const high = [...];   // high prices
// const low = [...];    // low prices

const ibs = other_bulk_internalBarStrength(high, low, close);
console.log("Internal Bar Strength:", ibs);