Skip to content

Instantly share code, notes, and snippets.

@dburger
Created February 8, 2021 20:51
Show Gist options
  • Save dburger/9125055c074445e9b553b70abd3bf0fd to your computer and use it in GitHub Desktop.
Save dburger/9125055c074445e9b553b70abd3bf0fd to your computer and use it in GitHub Desktop.
Composition of functions to calculate an SMA in Google Sheets.
=AVERAGE(INDEX(GOOGLEFINANCE(A2 , "close" , WORKDAY(TODAY(), -$C$17, holidays) , TODAY()), 0, 2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment