Value traded per day
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © doppelgunner

//@version=5
indicator("Value ($)", overlay=false, format=format.volume)

//value
value = volume * ohlc4

ma_length = input.int(10, "MA Length", minval=1, group="Value MA")
ma = ta.sma(value, ma_length)


plot_sma = plot(ma, "Value MA", color=color.new(color.orange, 70), style=plot.style_area)
plot_value = plot(value, "Value", style=plot.style_columns, color=value > ma ? color.blue : color.gray)

