OPEN-SOURCE SCRIPT

12-Month High Volume

102
12 month high vol
show on the bar

//version=5
indicator("12-Month High Volume", overlay=true)

// Define lookback period (12 months ~ 252 trading days)
lookback = 252

// Get highest volume in the last 252 bars (excluding current bar)
highest_vol = ta.highest(volume[1], lookback)

// Check if today's volume is higher than the previous 252 days
is_highest_today = volume > highest_vol

// Plot signal on chart
plotshape(is_highest_today, title="Highest Volume in 12 Months", location=location.belowbar, color=color.red, style=shape.labelup, text="12M High Vol")

// Optional: Display volume on chart
//plot(volume, title="Volume", color=color.gray, style=plot.style_columns)

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.