Professional Documents
Culture Documents
Hien
Hien
Hien
//color
color transp = color.new(color.white,100)
//drawing options
equalHL = input.bool(0,"Use equal H/L", "To calculate valid pullbacks and minor
structure", group = "Calculation method")
//#endregion
//Bar color
ba_color = if showSCOB
if low[1] == puDn and low >= low[1] and close > high[1] and close[1] > low[2]
scobUp
else if high[1] == puUp and high <= high[1] and close < low[1] and close[1] <
high[2]
scobDn
else if showbarcolor
isCocUp?bull:bear
else
na
barcolor(ba_color,-1)
//#endregion
if equalHL
if high >= top
puUp := high
puUpbar := bar_index
if low <= bot
puDn := low
puDnbar := bar_index
top := high
bot := low
if high >= top
top := high
bot := low
else
if high > top
puUp := high
puUpbar := bar_index
if low < bot
puDn := low
puDnbar := bar_index
top := high
bot := low
if high > top
top := high
bot := low
//#endregion
//#endregion
if array.size(aCZ) > 0
highest := array.get(aCZ, 0)
lowest := array.get(aCZ, 1)
lowest
insideBarCondtion = low >= lowest and low <= highest and high >= lowest and high <=
highest
if insideBarCondtion == true
array.push(aCZ, high[1])
array.push(aCZ, low[1])