All posts
TrendAug 29, 2026 10 min read

Algo Trading for Beginners in India: A Practical Step-by-Step Guide

Written by Amit Khari·Reviewed by Pramita Singh·Published on 29 August 2026

Algorithmic trading, commonly called algo trading, uses predefined rules to identify trading opportunities, generate alerts, place orders or manage open positions. Instead of making every decision manually, a trader converts a trading idea into instructions that software can follow.

Algo trading does not guarantee profits or remove market risk. Automation simply follows the rules given to it. If a strategy is poorly designed, based on unreliable data or missing proper risk controls, automating it may increase losses. Beginners should therefore focus first on market knowledge, clear strategy rules, realistic testing and gradual deployment.

This guide explains how algo trading works, what a beginner should learn, how to create and test a basic algorithm, and how to evaluate algo-trading platforms in India

What Is Algo Trading?

An algorithm is a set of step-by-step instructions. A trading algorithm may define:

  • The instrument to be traded
  • The chart time frame to be used
  • The exact entry conditions
  • The order type and quantity
  • The stop-loss and profit-booking rules
  • The maximum permitted loss
  • The time at which an open position must be closed
  • The conditions under which trading must stop

For example, a simple system may generate a buy signal when the 20-period exponential moving average crosses above the 50-period exponential moving average. It may exit when the opposite crossover occurs or a predefined stop-loss is reached.

This example is for learning purposes only. A moving-average crossover is not automatically profitable and should not be used with real money without proper testing.

Manual, Semi-Automated and Fully Automated Trading

Not every trading algorithm needs to place orders automatically.

1. Alert-based trading

The system scans the market and sends an alert when its conditions are met. The trader checks the signal and decides whether to place the order manually.

This is often a practical starting point because it helps a beginner understand how signals behave in live markets without immediately allowing software to control the trading account.

2. Semi-automated trading

The system prepares an order, but the trader must review or approve it before submission. This provides some automation while keeping a person involved in the final decision.

3. Fully automated trading

The system identifies the setup, applies risk checks, places the order, monitors its status and executes the exit. This approach requires reliable technology, extensive testing, order-status monitoring and an emergency shutdown facility.

What Should a Beginner Learn First?

Market basics

Understand market, limit and stop-loss orders. Learn how bid-ask spreads, liquidity, slippage, circuit limits, margins and contract expires affect execution.

Anyone trading futures or options should also understand leverage, lot sizes, option premiums, implied volatility and time decay. Derivatives can produce substantial losses and may not be suitable for every trader.

Objective strategy rules

A computer cannot interpret an instruction such as “buy when the market looks strong.” Every rule must be measurable.

A more precise rule might be:

Generate a buy signal after a completed candle closes above the 20 EMA, RSI is above 55, and candle volume exceeds the average volume of the previous 20 completed candles.

This does not mean the rule is profitable. It only means the rule is clear enough to test.

Basic statistics

Learn the meaning of win rate, average profit, average loss, draw down, expectancy, profit factor and sample size. A high win rate alone does not prove that a strategy is effective. Several small gains can be erased by one large uncontrolled loss.

No-code tools or programming

Beginners can use a no-code platform to learn how rules and back-tests work. Traders who need customized calculations, order handling or portfolio controls may prefer to learn Python and use a broker API.

Useful Python topics include variables, conditions, functions, date and time handling, Pandas Data Frames, REST APIs, Web Sockets, error handling and logging. Advanced artificial intelligence is not required to build a basic rule-based algorithm.

How to Turn a Trading Idea Into an Algorithm

Before writing code or opening a strategy builder, document the complete trading plan.

Here is a simplified educational framework:

Instrument: A liquid NSE-listed stock
Timeframe: 15-minute candles

Signal conditions:
1. The 20 EMA crosses above the 50 EMA on a completed candle.
2. RSI is above 55.
3. Current completed-candle volume is above its 20-candle average.
4. No position is already open in the instrument.

Risk conditions:
1. Maximum planned risk per trade is 0.5% of trading capital.
2. Stop-loss is placed below a defined recent swing low.
3. Maximum two losing trades are permitted in one day.
4. All intraday positions are closed before the defined cut-off time.

The percentages and indicators above are illustrations, not recommended settings.

Position Sizing Example

Position size should reflect the amount a trader is prepared to lose if the stop-loss is executed.

Assume:

  • Trading capital: ₹2,00,000
  • Planned risk per trade: 0.5%
  • Maximum planned loss: ₹1,000
  • Entry price: ₹500
  • Stop-loss price: ₹495
  • Risk per share: ₹5

The theoretical quantity is:

Quantity = Maximum planned risk ÷ Risk per share

Quantity = ₹1,000 ÷ ₹5 = 200 shares

This is a simplified illustration. Actual loss can exceed the planned amount because of price gaps, slippage, insufficient liquidity, rejected orders or technical problems. The final quantity must also comply with available funds, broker limits, exchange rules and applicable lot sizes.

How to Backtest a Strategy

Backtesting applies a strategy’s rules to historical data to estimate how the system might have behaved in the past. It is a research tool, not a forecast or proof of future returns.

A realistic test should consider:

  • Brokerage and statutory charges
  • Bid-ask spread and slippage
  • Order timing and realistic fills
  • Contract expiry and lot-size changes
  • Corporate actions for stocks
  • Missing or incorrect market data
  • Rejected and partially filled orders where relevant

Important measurements include:

Do not select a strategy only because it shows the highest historical return. Stability, draw down, sufficient sample size and performance across different market conditions are also important.

Common Back testing Errors

Over fitting

Over fitting occurs when rules are repeatedly changed until they fit past data extremely well. The resulting strategy may be matching random historical patterns rather than capturing repeatable behavior.

Look-ahead bias

This occurs when a test uses information that was not available when the trade should have been taken. One example is using a candle’s closing value before that candle had actually closed.

Survivor ship bias

Testing only companies that remain successful and listed today can exclude de-listed, merged or poorly performing companies from the historical sample.

Ignoring costs

Frequent trading can turn a small theoretical advantage into a loss after brokerage, taxes, spreads and slippage.

Testing one market phase

A strategy tested only in a strong upward market may fail during falling, sideways or unusually volatile conditions. Testing should include varied market environments.

A Safer Three-Stage Testing Process

Stage 1: Historical testing

Test the rules across multiple time periods and market conditions. Keep a portion of historical data separate as out-of-sample data so it is not used while adjusting the rules.

Stage 2: Paper or forward testing

Run the system with live data without placing real-money orders. Record signals, intended entries, intended exits and differences from the backtest. Paper trading is useful, but it cannot fully reproduce real liquidity, price gaps, partial fills or emotional pressure.

Stage 3: Small live test

If the system behaves as expected during paper testing, a trader may consider using the smallest practical position size. Every live order should be monitored. Capital allocation should not be increased merely because of a few profitable trades.

Risk Controls Every Live Algo Needs

A live system should include controls outside the entry strategy:

  • Maximum planned loss per trade and per day
  • Maximum number of trades and open positions
  • Instrument and sector exposure limits
  • Duplicate-order protection
  • Funds and margin checks
  • Order acknowledgement and status checks
  • Handling of rejections and partial fills
  • Stale-data and disconnection detection
  • Time-based exit for intraday positions
  • Complete signal, order and error logs
  • Real-time alerts for important failures
  • An emergency kill switch

Placing a stop-loss instruction in program logic is not sufficient. The system must verify whether the broker accepted the order and whether it was filled.

Technology Used in a Basic Algo System

A custom setup usually includes market data, a strategy engine, risk checks, a broker order API, an order-status monitor, logs and alerts.

Developers commonly use Python for strategy logic, Pandas for data analysis, REST APIs for account and order functions, Web Sockets for streaming prices, a database for records, and a reliable computer or cloud server for operation.

API keys, access tokens, passwords, PINs and one-time passwords should never be placed in public code repositories or shared with an unverified service provider.

Algo-Trading Platforms and Routes in India

There is no single platform that is best for every trader. Features, pricing, broker support and regulatory status can change. Verify all details on the platform’s official website and with the connected broker before subscribing or trading.

A no-code platform may be appropriate when rules use common indicators and the main goal is learning, research or paper testing. A broker API may be more suitable when the strategy requires custom calculations, position sizing, portfolio logic or detailed order management.

Do not choose a platform solely because it displays impressive historical returns. Review its data source, cost assumptions, security practices, customer support, broker integration and current exchange-related status. Where applicable, check the NSE list of empanelled algo providers.

Retail Algo-Trading Rules in India

Retail algo trading in India is governed by requirements issued by SEBI and implemented through stock exchanges and brokers. SEBI introduced its safer-participation framework on safer participation of retail investors in algorithmic trading in 4 February 2025. The implementation position, exchange standards, broker processes and provider-empanelment requirements have subsequently evolved. Readers should therefore verify the latest circulars and operational requirements with their broker and the relevant exchange before using an API or automated order-placement service.

A 12-Week Beginner Learning Plan

Weeks 1–2: Learn market mechanics

Study order types, liquidity, spreads, slippage, margins, stop-losses, position sizing and the risks of derivatives.

Weeks 3–4: Define one strategy

Choose a simple idea and document its instrument, time frame, entry, exit, position-size and daily-risk rules. Avoid adding many indicators merely to improve historical results.

Weeks 5–6: Learn back testing

Use reliable historical data, include realistic costs and review draw down, expectancy, stability and sample size.

Weeks 7–8: Build the system

Implement the rules using a no-code platform or learn enough Python to process candles, calculate indicators and produce signals. Add logging and error handling.

Weeks 9–10: Paper trade

Run the strategy during live market hours without real money. Record every signal and investigate differences between expected and observed behavior.

Weeks 11–12: Review and controlled testing

Review whether the rules, data and risk controls worked as designed. If you decide to trade live, begin with the smallest practical exposure, monitor every order and retain a manual emergency exit.

Continue Learning

For a structured learning path, read Learn Algo Trading Step by Step. It explains the progression from market basics and strategy rules to back testing, paper trading and controlled deployment.

Sources :

SEBI: Safer participation of retail investors in algorithmic trading

SEBI: Extension of the implementation timeline

NSE: Retail algo-trading implementation information

NSE: Empanelled algo providers

Important Disclaimer

This article is provided only for educational and informational purposes. It is not investment advice, a research recommendation, an offer to buy or sell securities, or an assurance of returns. Trading and investing involve market risk, and losses may exceed expectations, particularly when leverage or derivatives are used. Historical backtests and paper-trading results do not guarantee future performance. Readers should conduct independent research, verify current broker, exchange and regulatory requirements, and consult a SEBI-registered professional where appropriate.

#Algo Trading

Comments (0)

to leave a comment.

Be the first to comment.

About the author

Amit Khari
Amit KhariContributor, LiveWorldMarket

NISM-Series-X-A Investment Adviser Level 1 examination completed

Amit writes about Indian equity markets, technical analysis, macro themes and the day-to-day mechanics of trading, with a focus on making the flow of global markets legible for retail investors. He has completed the NISM-Series-X-A Investment Adviser Level 1 examination.