Momentum Indicator Thinkscript, Both the price type and the offset period are customizable.