this python code logs in successfully (access token provided ), it fetches histrorical data in loop but it is not placing orders as per the given trading logic. but after a while (like an hour) sudden random trades are automatically placed in the zerodha kite mobile app. Is the kite.place_order thing not working? i have checked the documentation but couldnt identify the problem. please help Vaibhav ji !
import os, json
import pandas as pd
import sys, time, datetime, threading, pyotp
from kiteconnect import KiteConnect
try:
api_key = "......"
access_token = "......"
instrument = "BANKNIFTY"
option_buy_or_sell = "BUY"
live_trading = True
product_type = "NRML"
strike_atm_diff = 100
lots_to_trade = 1
expiry = 0
max_sl_points = 25
risk_reward = 3
max_ce_trades = 3
max_pe_trades = 3
total_trades = 5
entry_time_start = datetime.time(9, 15, 0)
entry_time_stop = datetime.time(15, 0, 0)
square_off_time = datetime.time(15, 15, 0)
move_sl_to_cost = True
except:
print("UserInput Issue
December 2023