Calculated indicator values are not amtching with kite/tradingview

Hi All, I am trying to calculate indicator values from OHLC with python talib however calculated values are not matching with tradingview / kite values. Can someone validate my code and suggest me why?

import pandas as pd
import talib
from nsepy import get_history
from datetime import datetime
import dateutil.relativedelta

to_date = datetime.now()
to_date = datetime.strftime(to_date,’%Y,%m,%d’)
to_date = datetime.strptime(to_date,’%Y,%m,%d’)
from_date = to_date - dateutil.relativedelta.relativedelta(month=1)

df = get_history(symbol=‘RELIANCE’,start=from_date,end=to_date)
df.index = pd.to_datetime(df.index)
df.sort_index(inplace=True)

df[‘adx’] = talib.ADX(df[‘High’], df[‘Low’], df[‘Close’], timeperiod=14)
df[“EMA50”] = talib.EMA(df.Close, timeperiod = 50)

1 Like

Can you post the input file, expected value & observed value?

1 Like

Hi, I also noticed difference in ema calculated by panda and one by tradingview

Is there any solution