Learn Algo Trading Step by Step

Week 4: Convert the Idea Into Exact Rules

Back to Learn Algo Trading Step by Step
Lesson 5 of 14·beginner
Written by Amit Khari·Reviewed by Pramita Singh·Published on 30 August 2026·Last updated on 30 August 2026

Week 4: Convert the Idea Into Exact Rules

A computer cannot interpret phrases such as “the trend looks positive” or “buy near support”. Every condition must be measurable.

Document every element

  • Instrument — exact stock, index, future or option universe
  • Timeframe — 5-minute, 15-minute, hourly or daily
  • Entry — conditions that must be true, and entry timing (immediately, next candle or limit price)
  • Stop-loss — fixed, percentage, ATR-based or structural
  • Target — fixed reward, trailing stop or opposite signal
  • Position size — the quantity calculation
  • Trading window — permitted entry times
  • Daily limit — maximum trades or maximum loss
  • Overnight rule — hold or close before the market ends

Example of complete rules (educational only)

Universe: Nifty 50 stocks  •  Timeframe: 15-minute candles  •  Direction: long only

  1. The 20 EMA crosses above the 50 EMA
  2. RSI(14) is above 55
  3. Current volume is above its 20-candle average
  4. No existing position is open in the stock
  5. Entry is permitted only between 9:30 AM and 2:30 PM

Risk controls: risk 0.5% of capital per trade; stop-loss below the recent swing low; initial target 2× the entry risk; maximum two losing trades per day; all positions closed before the intraday cut-off.

Week 4 outcome

Another person should be able to read your document and reproduce the same trades without asking for clarification.

This lesson is for educational purposes only. It is not investment advice, a recommendation or an assurance of returns. Trading and derivatives involve substantial risk, and backtested or paper-trading results do not guarantee future performance.

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.