In short
- Algorithmic (algo) trading means a computer places trades by following rules written in advance.
- Every algo runs the same loop: idea → exact rules → backtest → practice → automation and monitoring.
- The main kinds are trend following, mean reversion, breakout, pairs/stat arb, execution algos and market making.
- Rules differ by country: India has a detailed retail framework, Nepal has none yet and has moved to bar AI-based orders in TMS.
- You can learn every step except the live automation for free, with virtual money.
"Algo trading" sounds like something only hedge funds do. In reality, the idea is simple: instead of deciding each trade on the spot, you write the decision down as rules, and a computer follows them exactly. "Buy when the 9-period average crosses above the 21-period average; sell when it crosses back" is already an algorithm. Everything else, from code to speed, is about doing that reliably.
This guide explains how algo trading works, the main types, who uses it, what the rules are in India, Nepal and the US, where it goes wrong, and how a beginner can learn it without risking money.
Algo trading in one sentence
Algorithmic trading is trading in which a computer program decides and/or places orders according to pre-set rules, usually based on price, volume, time or other data. The rules can be simple (two moving averages) or very complex (statistical models across thousands of stocks), but the principle is the same: no decision is made on a whim.
How an idea becomes an algorithm

- Idea. A behaviour you believe repeats: trends tend to continue, stretched prices tend to snap back, quiet ranges tend to break out.
- Rules. Turn the idea into exact instructions: what to buy, when, how much, when to exit, what to do if wrong. If two people can read your rules and take different trades, they are not rules yet.
- Backtest. Run the rules over past prices, with fees, and look at the bad numbers too: worst losing streak, maximum drawdown, number of trades. See how to backtest without fooling yourself.
- Paper trade. Follow the rules live with virtual money for weeks. Markets you have not tested on will surprise you.
- Automate and monitor. Only now does code send real orders, through a broker that allows it, with limits and a way to stop it.
Six common kinds of algorithm

| Type | The idea | Typical user |
|---|---|---|
| Trend following | Buy what is rising, sell what is falling, and ride the move | Retail traders and large funds alike |
| Mean reversion | Prices stretched far from their average tend to come back | Retail and quant funds |
| Breakout | When price leaves a quiet range, a bigger move may follow | Retail swing and day traders |
| Pairs / statistical arbitrage | Two related prices drift apart, then tend to rejoin | Quant funds |
| Execution (VWAP, TWAP) | Not a bet on direction: split a large order to reduce market impact | Brokers and institutions |
| Market making / HFT | Quote to buy and sell at once and earn the spread, in fractions of a second | Specialist firms with exchange co-location |
Each of these is explained, with its strengths and weak spots, in classic algo trading strategies.
Who uses algos, and why
- Institutions use execution algos because buying a huge position in one go would push the price against them.
- Market makers and high-frequency firms use speed to quote prices continuously.
- Quant funds run statistical models across many markets.
- Retail traders mostly use algos for discipline: the rules do not panic, chase or revenge-trade, and they can watch many charts at once.
The rules where you live
| Country | Retail algo trading today (October 2026) |
|---|---|
| India | Allowed through brokers under SEBI's retail algo framework: every algo order carries an exchange ID, APIs need a static IP and two-factor login, and black-box algo providers must register as Research Analysts. Mandatory for all brokers from 1 April 2026, as reported. Details. |
| Nepal | No retail algo framework. NEPSE has no official trading API for TMS, and in August 2026 SEBON directed NEPSE to identify and prevent orders placed using AI-based technologies in TMS until further arrangements. Details. |
| United States | Retail traders can automate through broker APIs; brokers and exchanges carry risk-control duties. Anyone selling a system that manages your money should be registered. Promised returns are a red flag. |
Where algos go wrong
- Overfitting: rules tuned so closely to the past that they fail on new data.
- Changing markets: a trend system bleeds in sideways markets; a mean-reversion system can be hurt badly by one strong trend.
- Costs: fees and slippage quietly eat strategies that trade often.
- Bugs and outages: a wrong number or a dropped connection trades too.
- Crowding: when many systems chase the same signal, it stops working, and their exits collide. The 6 May 2010 "Flash Crash" in US markets is the best-known example of automated selling feeding on itself.
- Black boxes: systems you cannot inspect. See black box AI trading.
How to learn it safely
You can practise every stage except the final automation for free. In the StockYatra app, Pro Chart gives you 41 ready-made strategies across trend, momentum, mean reversion, breakout, volatility, volume and candle patterns. Each one shows its rules, draws every buy and sell on the chart, and backtests itself with return against buy and hold, win rate, profit factor and maximum drawdown. You can write your own rules with a no-code builder or in Pine Script (15 scripts included), on NEPSE, NSE and US practice charts, with virtual coins. The guided path is on learn algo trading.


Key takeaways
- Algo trading = written rules that a computer follows.
- Idea → rules → backtest → paper trade → automate, in that order.
- Trend, mean reversion and breakout are where most beginners start.
- The rules differ a lot between India, Nepal and the US.
- Learn with transparent rules and virtual money before anything else.
Practise algo trading without the risk
StockYatra is a free practice app for Nepal (NEPSE), India (NSE) and US stocks. Test 41 transparent strategies, write rules without code or in Pine Script, and backtest them on the chart with virtual coins. Nothing connects to a broker and nothing is real money.
The algo trading series
- Algo trading in India: the 2026 rules
- Is algo trading allowed in Nepal?
- How to backtest a trading strategy
- Classic algo trading strategies, explained
- Algo trading vs manual trading
- How to start algo trading as a beginner
- Algo trading: the one-page guide
- Black box AI trading, explained
- Pro Chart: 41 strategies with every rule shown
StockYatra is an education app, not a broker, adviser or research analyst. Nothing here is a recommendation to buy or sell any security, to use any trading product, or legal advice. Rules and dates are summarised for learning; check the regulator's and your broker's current notices before acting. Practice prices are simulated and coins are virtual.



