NIFTY24,318.60 0.84%BANKNIFTY52,104.25 1.12%FINNIFTY24,890.10 0.31%RELIANCE2,945.70 0.56%TCS4,102.35 0.22%HDFCBANK1,688.90 0.93%INFY1,876.40 0.41%SENSEX79,943.00 0.78%NIFTY24,318.60 0.84%BANKNIFTY52,104.25 1.12%FINNIFTY24,890.10 0.31%RELIANCE2,945.70 0.56%TCS4,102.35 0.22%HDFCBANK1,688.90 0.93%INFY1,876.40 0.41%SENSEX79,943.00 0.78%

Get 7 days of Pro free.Claim now

// Algo Trading

Algo Trading in India: Complete Beginner's Guide 2025

BAshish Kumar··5 min read
#algo-trading#beginners#india#sebi#zerodha
Algo Trading in India: Complete Beginner's Guide 2025

## Is Algo Trading Legal in India? Yes — algorithmic trading is legal in India for individual retail traders, but with restrictions. **SEBI regulations as of 2024:** - Retail algo trading is permitted via broker-provided APIs - You cannot co-locate servers at NSE/BSE (that's for institutions) - Strategies must be risk-tested before live deployment - Order frequency limits apply (varies by broker) SEBI circular SEBI/HO/MRD/MRD-PoD-3/P/CIR/2024/4 mandates that brokers take responsibility for algo orders placed through their APIs. ## Broker API Landscape in India | Broker | API | Free? | WebSocket | |---|---|---|---| | Zerodha | Kite Connect | ₹2000/mo | Yes | | ICICI Direct | Breeze API | Free | Yes | | Angel One | SmartAPI | Free | Yes | | Upstox | Upstox API v3 | Free | Yes | | Fyers | Fyers API | Free | Yes | BacktestHub currently integrates with **ICICI Breeze** for live market data and is adding Zerodha support. ## What You Need to Start 1. **A trading account** with API access enabled 2. **Historical data** — at least 2 years of OHLCV for your instruments 3. **A backtesting framework** — BacktestHub, Amibroker, or Python (Backtrader/Zipline) 4. **A risk framework** — position sizing, max drawdown rules, kill switch ## Your First Strategy: 9:20 AM Opening Range Breakout The Opening Range Breakout (ORB) is one of the most studied strategies in Indian markets. **Rules:** 1. Note the high and low of the first 15 minutes (9:15–9:30 AM) 2. Buy on breakout above the range high with a stop at range low 3. Short on breakdown below range low with a stop at range high 4. Target: 1.5x the range size 5. Exit by 3:15 PM regardless **Why it works:** The first 15 minutes establish the day's sentiment. Institutional orders settle, and retail panic/FOMO subsides. ## Backtesting Your Strategy Before Going Live Never put real money into an untested strategy. Use BacktestHub to: 1. Import your logic using the visual strategy builder 2. Set realistic transaction costs (₹20/trade + STT + exchange) 3. Run on minimum 1 year of data 4. Check these metrics: - Sharpe ratio > 1.5 - Max drawdown < 20% of equity - Win rate > 45% (for 1:2 risk-reward) ## Common Beginner Mistakes - **Curve fitting**: Testing on same data you'll trade means you're just memorizing history - **Ignoring slippage**: NIFTY is liquid but small caps can have 0.3–0.5% slippage - **No kill switch**: Always have a way to stop all orders immediately - **Over-optimizing**: More parameters = more overfit. Start with 2–3 rules maximum ## Moving to Live Trading Once your backtest shows consistent results, paper trade for 2–4 weeks using real market data but no real money. Then start with minimum lot sizes. Track every deviation between backtest and live results — they tell you where your model is wrong.

Ready to test this strategy?

BacktestHub lets you backtest on real Indian market data — free, no code needed.

Start Free Backtest