You are on page 1of 1

instrument { name = "S&R M5 DAGO", icon="indicators:ADX", overlay = true }

method_id = input (1, "Type", input.string_selection, { "DAGO M5" })

input_group {
"Maxima",
level_1_color = input { default = "Yellow", type = input.color },
level_1_width = input { default = 4, type = input.line_width }
}

input_group {
"Minima",
level_2_color = input { default = "Yellow", type = input.color },
level_2_width = input { default = 4, type = input.line_width }
}

local function dago_m5(candle)

c1 = candle.high
c2 = candle.low
end

local methods = { dago_m5 }

local resolution = "5m"

sec = security (current_ticker_id, resolution)

if sec then
local method = methods [method_id]
method (sec)

plot (c1, "C1", level_1_color, level_1_width, 0, style.levels,


na_mode.continue)
plot (c2, "C2", level_2_color, level_2_width, 0, style.levels,
na_mode.continue)

end

You might also like