Skip to content

Instantly share code, notes, and snippets.

//@version=5
indicator(title="Interval Vertical Lines", shorttitle="Int Lines", overlay=true, max_lines_count=500)
// --- User Inputs ---
group_tf = "Timeframe & Interval Settings"
targetTfInput = input.string("D", title="Reference Timeframe", tooltip="Timeframe to base intervals on (e.g., '1', '5', '15', '60', '240', 'D', 'W', 'M'). Use TradingView format.", group = group_tf, inline="tf")
intervalValInput = input.int(1, title="Interval Value", minval=1, group = group_tf, inline="interval")
intervalUnitInput = input.string("Hours", title="Interval Unit", options=["Minutes", "Hours", "Days", "Weeks", "Months"], group = group_tf, inline="interval")
group_style = "Line Appearance"