smma python

Solutions on MaxInterview for smma python by the best coders in the world

showing results for - "smma python"
Anuja
26 Mar 2016
1import btalib  #need to instal bta-lib, pip install bta-lib
2smma=btalib.smma(df['close'],period=4) 
3wma=btalib.wma(df['close'],period=70) # wma or smma values will start after "period" values 
4#from 0 till the period value there would Nan values
5df['WMA']=wma.df #wma.df is a reserved word not a name of dataframe
6df['SMMA']=smma.df#same as step 3 
queries leading to this page
smma pythonsmma python