This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
####################################################################### | |
# Author : Arun B | |
# | |
# Purpose : Automate the process of generating access token for kiteconnect in python | |
############################################################################ | |
# For this code to run you have to download geckodriver and put it in /usr/local/bin | |
from kiteconnect import KiteConnect,KiteTicker | |
import requests | |
from selenium import webdriver | |
from selenium.webdriver.common.by import By |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################## Ticks to candles in kiteconnect python #################### | |
# Author : Arun B | |
# Reference : http://ezeetrading.in/Articles/Candles_formation_from_tick_data_zerodha.html | |
# Purpose : Convert ticks to candles by putting ticks in a queue. This redues time wasted in on_ticks function | |
################################################################################ | |
from kiteconnect import KiteTicker | |
import datetime | |
from copy import copy | |
import queue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import json | |
import os | |
import logmatic | |
import logging | |
from logging.config import dictConfig | |
import requests | |
from http import HTTPStatus | |
import re | |
from kiteconnect import KiteConnect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
####################################################################### | |
# Author : Arun B | |
# | |
# Purpose : Calculate Parabolic SAR | |
############################################################################ | |
def psar(barsdata, iaf = 0.02, inc=0.02,maxaf = 0.2): | |
length = len(barsdata) |