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

Interpretation

Default Usage

use rust_ti::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 pytechnicalindicators as pti

# Internal Bar Strength calculation
ibs = pti.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/ti-engine@latest/dist/web/ti_engine.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);

Interactive Chart

Use the interactive playground below to explore how different parameters affect the indicator's behavior.