The Fundamental chart metrics listed below use 36, 4-week interval samples to span 3 years. I think that should be 39.
% Over/Under from Median 3Y Price to Sales Ratio = 100*((Pr2SalesTTM / FHistMed(“Pr2SalesTTM”,36,4))-1)
% Over/Under from Median 3Y Price to Earnings Ratio = 100*((PEExclXorTTM/ FHistMed(“PEExclXorTTM”,36,4))-1)