OPEN-SOURCE SCRIPT

Volume Bandar Detector

45
//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)

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.