Need Python code for stochastic momentum index

Hi All,

I need python code which can tell me whether the black line is above or below the red line in stochastic momentum index.

% K PERIODS = 20
%K SMOOTH = 2
%K Dbl SMOOTH = 2
%D PERIODS = 20
%D MA TYPE = EXP

Could you please help me with this.

1 Like

I also want to know the formula for stoch momentum in python for algo trading

Try to use TA-lib python wrapper … quite helpful