can you please help me with this? I want to find the average of the points that are plotted by simple moving average. How can I do find this? please help me with this
len = input.int(30, title = "length")
ma = ta.sma(close, len)
var float ma_sum = 0
var float n = 0
if not na(ma)
ma_sum += ma
n += 1
avg = ma_sum / n