instrument {name = "KL-Candle-Marking-V1", icon = "indicators:MA", overlay = true} 

local tf = {"1m" , "2m" , "5m" , "10m" , "15m" , "30m" , "1H" , "2H" , "4H" , "8H" , "12H" , "1D" , "1W" , "1M" , "1Y" }
local time_period = input (1, "Time Period", input.string_selection,tf)
 
input_group {
    "Color",
    color_previous_wick_high = input {default = "green", type = input.color},
    color_previous_body_close = input {default = "yellow", type = input.color},
    color_previous_wick_low = input {default = "red", type = input.color},
    width_previous_wick_high = input {default = 1, type = input.line_width},
    width_previous_body_close = input {default = 1, type = input.line_width},
    width_previous_wick_low = input {default = 1, type = input.line_width}
}

local sec1 = security (current_ticker_id, tf[time_period])
 
if (sec1 ~= nil) then
    hline(sec1.high[1], "wick_high", color_previous_wick_high, width_previous_wick_high)
    hline(sec1.open, "body_close", color_previous_body_close, width_previous_body_close)
    hline(sec1.low[1], "wick_low", color_previous_wick_low, widht_previous_wick_low)
end