WR - BC Identifier
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © wrtech2020

//@version=4
study("BC Identifier", overlay = true)

C_Body = abs(close - open)
C_Bullish = close > open
C_Bearish = close < open


BC_Bull = C_Bullish and C_Body > C_Body[20] and C_Body > C_Body[19] and C_Body > C_Body[18] and C_Body > C_Body[17] and C_Body > C_Body[16] and C_Body > C_Body[15]and C_Body > C_Body[14] and C_Body > C_Body[13] and C_Body > C_Body[12] and C_Body > C_Body[11] and C_Body > C_Body[10] and C_Body > C_Body[9] and C_Body > C_Body[8] and C_Body > C_Body[7] and C_Body > C_Body[6] and C_Body > C_Body[5]and C_Body > C_Body[4] and C_Body > C_Body[3] and C_Body > C_Body[2] and C_Body > C_Body[1] and barstate.isconfirmed
BC_Bear = C_Bearish and C_Body > C_Body[20] and C_Body > C_Body[19] and C_Body > C_Body[18] and C_Body > C_Body[17] and C_Body > C_Body[16] and C_Body > C_Body[15]and C_Body > C_Body[14] and C_Body > C_Body[13] and C_Body > C_Body[12] and C_Body > C_Body[11] and C_Body > C_Body[10] and C_Body > C_Body[9] and C_Body > C_Body[8] and C_Body > C_Body[7] and C_Body > C_Body[6] and C_Body > C_Body[5]and C_Body > C_Body[4] and C_Body > C_Body[3] and C_Body > C_Body[2] and C_Body > C_Body[1] and barstate.isconfirmed

// Plot Bull Setup
plotshape(
	 BC_Bull,
	 title="BC Bull",
	 text=" BC ",
	 style=shape.labelup,
	 location=location.belowbar,
	 color=color.green,
	 textcolor=color.white
	 )

// Plot Bull Setup
plotshape(
	 BC_Bear,
	 title="BC Bear",
	 text=" BC ",
	 style=shape.labeldown,
	 location=location.abovebar,
	 color=color.red,
	 textcolor=color.white
	 )