code not working need help

AmitKhanna
# -*- coding: utf-8 -*-
"""
TRADE BY BULLBEARIAN

@author: Amit Khanna
"""
#Libs
from kiteconnect import KiteTicker, KiteConnect
import pandas as pd
import talib
from datetime import datetime, timedelta
import os
import numpy as np

#env path
cwd = os.chdir("C:\\Users\\molte\\anaconda3\\envs\\ROBO")


#1. generate trading session
access_token = open("access_token.txt",'r').read()
key_secret = open("api_key.txt",'r').read().split()
kite = KiteConnect(api_key=key_secret[0])
kite.set_access_token(access_token)


#time period
from_date =datetime.strftime(datetime.now()-timedelta(100),'0y-0m-0d')
to_date = datetime.today().strftime('0y-0m-0d')

#interval
interval = '5minute'
tokens = {738561:'RELIANCE', 34129:'HDFCBANK'}

#compairing indicator values
while True:

#Fetch the historical data only @ end of 5 min
#current second must be 0 and current minute must be fully divided by 5 = rreminder should be 0
if(datetime.now().second == 0) and (datetime.now().minute % 5 == 0)

for token in tokens:
Sign In or Register to comment.