ReversalBreakout Alert//Copyright © pas.mail
//@version=3
study("ReversalBreakout Alert",shorttitle="ReversalBreakout Alert",overlay=true)
lenp = input(20,minval=1, title = "Periodo")
ShFL = input(true, type=bool, title = "Show Fractal lines?")
lowline = lowest(close, lenp)
plot(ShFL ? lowline : na, style=line, linewidth=1, color=green)
highline=highest(close, lenp)
plot(ShFL ? highline : na, style=line, linewidth=1, color=red)
MidLine = (highline+lowline)/2
plot(ShFL ? MidLine : na, style=line, linewidth=1)
//----------------------------------------------------------------------------------
// === VARIABILI LOGICHE ===
Offset = input(1,minval=0, title = "Offset Alert")
goLong = close>highline
goShort = close