I need a python function for McGinley Dynamic Indicator. McGinley Dynamic indicator is calculated by this formula: Kindly help.
I have dataframe with columns: open, high, low, close. I want to join the result of the function to be added to my dataframe.
something like this:
pmd = df['md'.shift(1)
k = float(.60)
x = df['close'] - pmd
y = ((df['close']/pmd)**4)
MD = pd.Series(pmd + (x/(k*n*y)), name = 'md')
df = df.join(MD)