Calculated indicator values are not matching with kite/tradingview indicators

Hi @sujith @rakeshr , I am trying to calculate indicator values from OHLC with python talib however calculated values are not matching with kite/tradingview indicator 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 =
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[‘adx’] = talib.ADX(df[‘High’], df[‘Low’], df[‘Close’], timeperiod=14)
df[“EMA50”] = talib.EMA(df.Close, timeperiod = 50)
    SRIJAN edited April 2022
    This is not related to KiteConnect APIs. Please don't post about other queries here. For now,
    I don't know how it's happening,when I tried with talib/pandas talib,the indicator values were matching with kite. But I was using KiteConnect historical data,there might be some data discrepancy in nsepy module, although I have never seen discrepancy in nsepy module. Check with the values from historical data api. Then the indicators value should match.
Sign In or Register to comment.