OPEN-SOURCE SCRIPT

Custom Volume Indicator by Augster67

//version=5
indicator("Custom Volume Indicator by Augster67", overlay=false)

// Input for moving average period
vol_avg_period = input.int(20, title="Volume Moving Average Period")

// Calculate volume components
buying_pressure = volume * (close > open ? (close - low) / (high - low) : (close - low) / (high - low))
selling_pressure = volume * (close < open ? (high - close) / (high - low) : (high - close) / (high - low))

// Calculate moving average of volume
vol_avg = ta.sma(volume, vol_avg_period)

// Plot total volume in gray behind buying and selling pressures
plot(volume, color=color.gray, title="Total Volume", style=plot.style_histogram, linewidth=2, transp=80)

// Plot buying and selling pressure as columns
plot(buying_pressure, color=color.green, title="Buying Pressure", style=plot.style_columns, linewidth=2)
plot(selling_pressure, color=color.red, title="Selling Pressure", style=plot.style_columns, linewidth=2)

// Plot volume moving average
plot(vol_avg, color=color.yellow, title="Volume Moving Average")


Trend AnalysisVolatilityVolume

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?

免責聲明