Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

smma python

import btalib  #need to instal bta-lib, pip install bta-lib
smma=btalib.smma(df['close'],period=4) 
wma=btalib.wma(df['close'],period=70) # wma or smma values will start after "period" values 
#from 0 till the period value there would Nan values
df['WMA']=wma.df #wma.df is a reserved word not a name of dataframe
df['SMMA']=smma.df#same as step 3 
 
PREVIOUS NEXT
Tagged: #smma #python
ADD COMMENT
Topic
Name
9+8 =