B0001021
B0001021

Reputation: 1

Retrieve 20-day, 50-day and 200-day moving averages using Googlefinance

I retrieve the moving averages using the Google Finance function but in several requests (one per moving average) having 200 titles to follow my method is starting to have performance problems and I would like to recover the moving averages over 20 days, 50 days and 200 days in a single query with the result in 3 different columns like this:

"MMA20" "MMA 50" "MMA 200"
   12.72 12.77 15.15

currently I use this query which I use by moving average.

=AVERAGE(QUERY(GOOGLEFINANCE($H3;"price";TODAY()-14;TODAY());"Select Col2 order by Col1 desc"))

Upvotes: 0

Views: 3960

Answers (1)

actorcat200
actorcat200

Reputation: 1

it worked for me, i just changed to -293 days for the 200 and -82 days for the 50

Upvotes: 0

Related Questions