The IBS (Internal Bar Strength) as we know it, calculates only correctly on the long side. When the candle closes in loss, the original IBS still uses the upper wick.
This IBS checks first if its an up or down candle and then uses the top or bottom wick to calculate the IBS.
The yellow line is the corrected IBS, the blue line the original