{ Candlestick PaintBar }
inputs: Length( 14) ,
InUpColor(color.Chartreuse) , InDnColor(color.Red) ,
OutUpColor(color.DarkGreen) , OutDnColor(color.FireBrick) ,
NmlUpColor(color.LightSeaGreen), NmlDnColor(color.LightSalmon) ,
variables: oBullishEngulfing( 0 ) , oBearishEngulfing( 0 ) , oBullishHarami(0) , oBearishHarami(0), barColor(blue) ;
Value1 = C_BullEng_BearEng( Length, oBullishEngulfing, oBearishEngulfing ) ;
Value2 = C_BullHar_BearHar( Length, oBullishHarami, oBearishHarami ) ;
if oBullishEngulfing = 1 then barColor = OutUpColor
else if oBullishHarami = 1 then barColor = InUpColor
else if oBearishEngulfing = 1 then barColor = OutDnColor
else if oBearishHarami = 1 then barColor = InDnColor
else if Close > Open then barColor = NmlUpColor
else if Close < Open then barColor = NmlDnColor ;
PlotPaintBar( High, Low, "InsOuts", barColor ) ;
|