It looks like you're new here. If you want to get involved, click one of these buttons!
tz = pytz.timezone("Asia/Kolkata")
now = datetime.now(tz)
to_date = now.replace(minute=15, second=00, microsecond=0)
from_date = to_date - timedelta(days=360)
historical = self.kite.historical_data(
instrument_token=self.instrument_token,
from_date=from_date,
to_date=to_date,
interval="60minute"
)
Even above code brings only 308 candles of 1 hour. using this data i am calculating EMA using below lines.
alpha = 2 / (50 + 1)
df['hlc3'] = (df['high'] + df['low'] + df['close']) / 3
df['ema_50'] = df['hlc3'].ewm(alpha=alpha, adjust=False).mean()
Trading view was using ema = ta.ema(hlc3, 50)
Is there any restrictions on accessing older data in zerodha ?