OPEN-SOURCE SCRIPT
Volume Bandar Detector

//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)
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)
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.