This script is designed to place orders for financial instruments using the Kite Connect API and the supertrend technical indicator as input. It retrieves historical data for a particular instrument and calculates the supertrend values for three different periods. If all three supertrends cross the values of the current price of the instrument, the script will place an order to buy or sell the instrument, depending on the direction of the crossover.
- Python 3.x
- pandas
- pandas_ta
- kiteconnect
- Make sure you have installed the required dependencies.
- Fill in the required values in the "NEW VERSION" section of the script. This includes the
fullquant
,symbol_ip
,inst_token
,order_type
,exchange_type
,offset_quantity
, andaway_from_circuit
variables. - Set the
supertrend_period
andsupertrend_multiplier
variables for each of the three periods. - Run the script using
python script.py
.
- The
auto_login()
function in thelogin
module is currently commented out. To use the script, you will need to implement this function or provide an alternative way to authenticate with the Kite Connect API. - The script has been tested with the
GBPINR20DECFUT
symbol, but it should work with other symbols as well. You will need to set thesymbol_ip
andinst_token
variables accordingly. - The
offset_quantity
andaway_from_circuit
variables are used to offset the price at which the orders are placed. You may need to adjust these values depending on your trading strategy.