OPEN-SOURCE SCRIPT

Volume Bandar Detector

34
//version=5
indicator("Broker Net Volume + Akumulasi", overlay=false, max_lines_count=500)

// --- Input setting ---
threshold = input.float(0.5, "Ambang Akumulasi (dalam % dari volume)", step=0.1)
maLength = input.int(5, "Panjang MA Net Volume", minval=1)

// --- Data dasar ---
buyVolume = volume * close / close // sementara pakai total volume (TradingView tidak bisa akses data broker real)
sellVolume = volume - buyVolume // dummy, hanya untuk contoh

// --- Net Volume ---
netVolume = buyVolume - sellVolume

// --- MA Net Volume ---
netVolMA = ta.sma(netVolume, maLength)

// --- Warna Histogram ---
barColor = netVolume >= 0 ? color.new(color.green, 0) : color.new(color.red, 0)

// --- Highlight Akumulasi (bar kuning) ---
highlight = netVolume > (threshold * volume)

// --- Plot Histogram Net Volume ---
plot(netVolume, style=plot.style_columns, color=highlight ? color.yellow : barColor, title="Net Volume")

// --- Plot Garis MA Net Volume ---
plot(netVolMA, color=color.blue, title="MA Net Volume", linewidth=2)

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.