
Plot bull_imbalance_top_line = bullish_top


Plot bear_imbalance_bot_line = bearish_bot ĪddCloud(bear_imbalance_top_line, bear_imbalance_bot_line, color.red, color.red) īear_imbalance_top_line.SetPaintingStrategy(PaintingStrategy.HORIZONTAL) īear_imbalance_bot_line.SetPaintingStrategy(PaintingStrategy.HORIZONTAL) īear_imbalance_top_line.SetDefaultColor(color.red) īear_imbalance_bot_line.SetDefaultColor(color.red) ĭef bullish = if open > close and open < close then 1 else 0 ĭef bullish_top = if bullish = 1 then open else bullish_top ĭef bullish_bot = if bullish = 1 then close else bullish_bot Plot bear_imbalance_top_line = bearish_top

# Probably Repaints - USE AT YOUR OWN RISKĭef bullimbalance = if open > close and low close and open > open then 1 else 0 ĭef bulltopline = if bullimbalance = 1 then min(OPEN, CLOSE) else if bullimbalance = 1 then bulltopline else if bullimbalance = 1 then bulltopline else double.nan ĭef bullbottomline = if bullimbalance = 1 then max(close, open) else if bullimbalance = 1 then bullbottomline else if bullimbalance = 1 then bullbottomline else double.nan īullboxbottom.SetDefaultColor(een) ĪddCloud(bullboxtop, bullboxbottom, een, een) ĭef bearimbalance = if open = low and close < close and close < open then 1 else 0 ĭef beartopline = if bearimbalance = 1 then min(close, open) else if bearimbalance = 1 then beartopline else if bearimbalance then beartopline else double.nan ĭef bearbottomline = if bearimbalance = 1 then max(open, close) else if bearimbalance = 1 then bearbottomline else if bearimbalance = 1 then bearbottomline else double.nan ĪddCloud(bearboxtop, bearboxbottom, color.red, color.red) īearboxbottom.SetDefaultColor(color.red) ĭef bearish = if open close then 1 else 0 ĭef bearish_top = if bearish = 1 then close else bearish_top ĭef bearish_bot = if bearish = 1 then open else bearish_bot # ToS conversion by mashume for the community
