Breakout mode patterns [yohtza]
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © yohtza

//@version=5
indicator("Breakout mode patterns [yohtza]", overlay = true)

textColor = input.color(color.gray,"Text Color")

oo_condition = high[1] >= high[2] and low[1] <= low[2] and high[2] >= high[3] and low[2] <= low[3]
ii_condition = high[1] <= high[2] and low[1] >= low[2] and high[2] <= high[3] and low[2] >= low[3]
ioi_condition = high[1] <= high[2] and low[1] >= low[2] and high[2] >= high[3] and low[2] <= low[3]

if oo_condition 
    label.new(bar_index -1, na, yloc = yloc.abovebar, text='oo', size= size.large, textcolor = color.gray, color = color.new(color.red, 100))
if ii_condition 
    label.new(bar_index -1, na, yloc = yloc.abovebar, text='ii', size= size.large, textcolor = color.gray, color = color.new(color.red, 100))
if ioi_condition
    label.new(bar_index -2, na, yloc = yloc.abovebar, text='ioi', size= size.large, textcolor = color.gray, color = color.new(color.red, 100))
