Hi everyone,
I’m Imran, an Algorithmic Trader for the past 7 years.
I’ve helped hundreds of traders automate their strategies — and now, I’m planning something new.
Earlier, we built several algos like…
for options, straddles, iron condor, hedging,
super trend, and indicators based,
price action algos,
Now I’m thinking of doing the same using Zerodha’s API, one of the best api’s available.
If you’ve ever wanted to create your own trading algo in Python, this might be the perfect starting point.
Also its just not a video series, its end to end support as well, Live Live Classroom support.
Actually it goes in depth till you are able to create your first algo.
Would you like to join if I start this Zerodha-based algo project?
comment and let us know your thoughts.
Now to make algo trading easier, we have some pre built codes like…
-
We can get OHLC in a single line, by below code
ltp = tsl.get_ohlc("NIFTY 50", "NSE")
-
We can download 11 years of candlestick data in 1 line
.
You can use this to backtest your strategies and optimise parameters for your strategy.
chart = tsl.get_long_term_hist_data(name="TCS", exchange="NSE", interval="5minute", length=5000, oi=True)
chart.to_csv('TCS_11_years_5mins.csv')
This is a example data we got for TCS from 2015 till today.
-
We can select options strikes easily. Like below code is to select OTM for Nifty with is 5 step value far from ATM for current expiry. same we can do for ATM and ITM as well. This helps us in order placement for buying and selling options or hedging them.
otm = tsl.get_otm(underlying="NIFTY 50", exchange="NSE", expiry=0, multiplier=5, script_type="CE")
-
Panic exit code, or simply exiting from market at 3:15
tsl.market_over_close_all_orders()
Like this we have 20+ function for Zerodha api. If you have zerodha api, you can start using it directly.
This is the link for the codebase Zerodha-Tradehull · PyPI
If you want to create a new api, goto this link: Login / Kite Connect developer
Also I know its bit difficult to understand code, so I will release some videos that will start step by step on how to build your Algos from pure basics to advance.
3 Likes
“Anyone can advertise. Only the honest stay around to answer questions.”