Is it possible to pull Exponential Moving Average data using the RD Library?

I am looking to get EMA intraday data for Tesla, but I am unable to find the correct data item. Please see screenshot.

1701721607861.png

Thanks in advance.

Best Answer

  • Hi @Chris.Iemma,

    The EMA 20 is calculated directly via the CHT app but you can easily do it with pandas:

    df = rd.get_data(
    universe = ['TSLA.O'],
    fields = ['TR.PriceCloseDate','TR.PriceClose'],
    parameters={"SDate":"-50" , "EDate":"0"})
    df['EMA 20'] = df['Price Close'].ewm(span=20).mean().round(3)
    display(df)

Answers