Claims by Rob Hoffman. Developed and used to win trading competitions around the world, the Hoffman Inventory Retracement Trade is quickly becoming one of the most popular ways to identify where short-term counter trend institutional inventory has subsided and when it’s time to re-enter into a trade’s original trend direction.
thinkScript Code
Code:
# Inventory Retracement Bar
# Assembled by BenTen at useThinkScript.com
# Converted from https://www.tradingview.com/script/VNByUGpE-Rob-Hoffman-s-Inventory-Retracement-Bar-by-UCSgears/
input z = 45;
# Candle Range
def a = absValue(high - low);
# Candle Body
def b = absValue(close - open);
# Percent to Decimal
def c = z / 100;
# Range Verification
def rv = b < c * a;
# Price Level for Retracement
def x = low + (c * a);
def y = high - (c * a);
def sl = rv == 1 and high > y and close<y and open<y;
def ss = rv == 1 and low<x and close> x and open> x;
def li = if sl then y else if ss then x else (x+y)/2;
#assignPriceColor(if sl then color.red else if ss then color.green else color.white);
plot green = if ss then(low - 2 * tickSize()) else Double.NAN;;
green.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
plot red = if sl then(high + 2 * tickSize()) else Double.NAN;
red.SetPaintingStrategy(PaintingStrategy.SQUARES);
red.SetDefaultColor(Color.magenta);
Resources to learn more about the IRB: