Joe Structure
Joe Structure
0 at
https://mozilla.org/MPL/2.0/
// © JoeSmartRisk
////////////////////////////////////////
////////////////////////////////////////
//@version=5
indicator("[JOE] Structure mapping v2.0", "[JOE] Structure v2.0", true,
max_bars_back = 5000, max_labels_count = 500, max_lines_count = 500)
//color
color transp = color.new(color.gray,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 low < L
L := low
Lbar := bar_index
if low < idmB
idmB := low
idmB_bar := bar_index
if low < lastL
lastL := low
lastLbar := bar_index
if low < lastLL
lastLL := low
lastLLbar := bar_index
//#endregion