Algo trading course

Free · no sign-up · 1 posts so far, new posts after each trading day

Algo trading means placing trades with a computer program that follows fixed rules. This page explains how rule-based strategies and backtests work, why backtests ignore costs, slippage and taxes, and how SEBI rules govern algo trading by retail investors through brokers.

Free lessons on this topic

  1. Moving averages explained: SMA vs EMA, 50-day and 200-day, and crossovers

    A moving average is the average closing price over a set number of recent days, recalculated each day. It smooths out daily noise so traders can see the direction of the trend, but it always lags the price. (7 min)

  2. What is RSI? Relative strength index explained for beginners

    The relative strength index (RSI) is a number from 0 to 100 that compares the size of recent gains with the size of recent losses, usually over 14 days. A high RSI shows that recent gains have outweighed losses; it measures past momentum and does not predict a reversal. (7 min)

  3. What is MACD? MACD line, signal line and histogram explained

    MACD (moving average convergence divergence) is the gap between a 12-day and a 26-day exponential moving average. It shows whether short-term prices are running above or below longer-term prices and whether that gap is widening or narrowing. (7 min)

  4. Volume in stock market: how traders use trading volume to confirm moves

    Volume is the number of shares traded in a period. Traders compare it with its recent average, often 20 days, to judge how much participation stands behind a price move; a move on high volume involved more trading than a move on low volume. (6 min)

  5. Stop-loss and risk management in trading: position sizing and risk-reward

    Risk management means deciding in advance how much of your capital you can lose on a trade and sizing the trade to match. A stop-loss is the planned exit price if the trade goes against you, and position sizing sets how many shares to buy so that the loss stays within that limit. (8 min)

  6. Share trading charges and T+1 settlement explained for beginners

    Every share trade in India carries brokerage, securities transaction tax (STT), exchange charges, a SEBI fee, GST and stamp duty, and selling delivery shares also attracts a DP charge. Equity trades settle on T+1, so shares and money move one working day after the trade. (7 min)

Latest lessons from market data

What algo trading is

Algorithmic (algo) trading uses a program to decide when to buy and sell, based on rules you write in advance. A simple rule might say: "Buy when the 50-day moving average crosses above the 200-day moving average, and sell when it crosses back below." The program checks the rule and places the order without you clicking a button.

Rules remove some emotion from trading, but they do not remove risk. A rule that made money in the past can lose money in the future, because markets change.

The building blocks

To learn algo trading, you need to understand three things before any code:

  • The signals. Most rules use indicators such as moving averages, the relative strength index (RSI) or MACD. You should know what each one measures and when it fails.
  • Risk rules. Every strategy needs a position size and an exit, such as a stop-loss. Without them, one bad trade can wipe out many good ones.
  • Costs. Brokerage, securities transaction tax, exchange fees, GST and stamp duty apply to every trade. A strategy that trades often pays these many times.

These free lessons cover the building blocks:

What a backtest can and cannot tell you

A backtest runs your rules on past prices to see what would have happened. It is useful for one thing: rejecting ideas that did not even work in the past. It cannot prove that a rule will work tomorrow. Keep these limits in mind:

  1. Backtests ignore costs, slippage and taxes unless you add them. Slippage is the gap between the price you expected and the price you actually got.
  2. Overfitting. If you tune a rule until it fits past data perfectly, it usually fits the noise, not a real pattern.
  3. Look-ahead bias. A backtest that uses information you would not have had at the time gives results that are too good.
  4. Different markets. A rule tested in a calm period may behave very differently in a crash.

What the posts in this category show

Twice a week, on Tuesday and Thursday, this category publishes one rule-based strategy backtested on Nifty 50 or Nifty Bank daily history since 2016. Each post states the exact rules, the number of trades, the win rate, the largest fall from a peak (drawdown) and how the result compares with simply holding the index. Every post repeats that the test ignores costs, slippage and taxes, and that past results do not predict future results. The posts exist to teach how to test an idea, not to suggest that any strategy works.

Rules and risk in India

In India, retail investors can run algos only through their broker, under rules that SEBI sets for brokers and exchanges. SEBI has updated these rules over time, so read the latest circular on sebi.gov.in and ask your broker what it allows. Be careful with anyone who sells a ready-made algo with promised returns.

Most algo strategies trade futures and options, and these carry high risk. SEBI found that about 9 in 10 individual traders in equity futures and options lost money in FY22.

Frequently asked questions

Is algo trading legal for retail investors in India?
Yes, when it runs through a SEBI-registered broker under the rules SEBI sets for brokers and exchanges. Check the latest SEBI circular and your broker's terms before you start.
Does a good backtest mean a strategy will make money?
No. A backtest shows only how rules behaved on past data, usually without costs, slippage and taxes. Future results can be very different.
Do I need to know coding to learn algo trading?
Coding helps you test and run rules, but you should first understand the indicators, risk rules and costs. The free Stocks Glance lessons cover those basics.
Is the algo trading course on Stocks Glance free?
Yes. The lessons and posts are free, need no sign-up and are for education only. Stocks Glance does not issue certificates or sell strategies.

More training topics

For education only. Nothing here is a recommendation to buy, sell or hold any security. Disclaimer