//@version=4// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/// © Wunderbit Tradingstudy("Volume", overlay=false)volume_ma_input = input(20, 'Volume Moving Avergae')volume_ma = sma(volume, volume_ma_input)plot(series=volume, title='Volume', style=plot.style_columns, color=color.blue)plot(series=volume_ma, title='Volume MA', color=color.green)
//@version=4// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/// © Wunderbit Tradingstudy("Simple Moving Average", overlay=true)sma_input = input(9, 'SMA period')sma = sma(close,sma_input)plot(sma, color=color.red)
You can add additional moving averages with their own inputs and color and identify the MA crossings if required.
//@version=4// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/// © Wunderbit Tradingstudy("Simple Moving Average", overlay=true)fast_sma_input = input(9, 'Slow SMA period')slow_sma_input = input(21, 'Slow SMA period')fast_sma = sma(close,fast_sma_input)slow_sma = sma(close,slow_sma_input)plot(fast_sma, color=color.red)plot(slow_sma, color=color.blue)