Kite Momentum Indicator code or formula

Hi All,

Could someone please help me with the formula or code used to calculate the Momentum Indicator in Kite?

image

image