I am very new to this, and looking for some help. I have a .csv file which I have pulled into a dataframe. It contains 200 days of tickers, open, high, low & close prices.
I am trying to use pandas_ta (sma) to calculate the 10, 50 & 100 day SMA. I tried did 3 commands:
df.ta.sma(length=10, append=True)
df.ta.sma(length=50, append=True)
df.ta.sma(length=100, append=True)
But I do not think this is the way. I see hundreds of variations on this, and not sure what to do.
If I try this:
df.ta.sma(df["Close"].values),
it gives me some Keyword error on "Close". (KeyError: 'Close')
Was hoping someone can give me an example on the syntax and such. I also have to calculate RSI & MACD for this task.
Many thanks!