Guide · Getting started with algo trading

How to start algorithmic trading: a step-by-step plan

Many people start algo trading by looking for a bot. A better start is a set of written rules. Here is the order we recommend, and what each step should prove before you move to the next one.

Based on our team’s research and live testing since 2018.

The plan has six steps. Each step has one job: to find a problem before it costs real money. Skipping a step does not save time. It only moves the discovery to your live account.

StepWhat you doWhat it should prove
1. IdeaPick one simple idea you understandYou can explain why it might work
2. Written rulesTurn the idea into exact rulesTwo people would take the same trades
3. PlatformChoose where it will runYour broker, market and platform fit together
4. BacktestTest on past data with real costsThe idea survives costs and unseen data
5. Demo testRun it on a demo account for 1–3 monthsThe software behaves as the rules say
6. Small liveTrade the minimum sizeLive fills match the demo and the test

Step 1: Where should a first trading idea come from?

The best first idea is one you already understand. If you trade manually today, your own method is a good starting point, because you know how it behaves on good days and bad days. If you do not, start with a well-known, simple pattern such as a trend filter or a session breakout. Keep it small: one market, one timeframe, a few conditions.

Avoid ideas you cannot explain. If the only reason to trade it is a screenshot of someone else’s results, you will not know what to do when it stops working.

Step 2: How do you turn an idea into rules a computer can follow?

Write down the answer to every question a trader decides by eye: when to enter, how much to risk, where the stop goes, when to exit, when not to trade, and what happens if something goes wrong. Here is the level of detail you need. These are example rules to show the format, not a strategy recommendation:

my-rules.txt13 lines
1Market:   GBPUSD, M15. Broker server time noted (it is not UK time)2Range:    the high and low of 07:00-08:00 UK time3Skip:     days when the range is wider than 40 pips;4          days with high-impact GBP news5Entry:    buy stop 2 pips above the range high and6          sell stop 2 pips below the range low; the first7          fill cancels the other order8Cancel:   any unfilled order at 12:00 UK time9Stop:     the opposite side of the range10Target:   1.5 x the range height11Size:     0.5% of equity at risk, calculated from the stop12Limits:   one trade per day; max spread 2.5 pips at entry13Exit:     close anything still open at 16:00 UK time

A simple test: give your rules to another person and ask them to mark the trades on a chart. If they mark different trades from you, a rule is still vague. Fix it now. Every vague rule becomes a guess in the code.

A written specification like this is also exactly what a developer needs to give you a fixed price. It is the first thing we ask for in custom EA development.

Step 3: Which platform should a beginner use?

Choose by where your orders will go, not by which language looks easiest.

If you trade…The usual choice
Forex, gold or index CFDs at a retail brokerMetaTrader 5 (or MT4) with an Expert Advisor
A prop-firm accountUsually MT5 or the firm’s own platform. Check first that the firm allows EAs; see can you use an EA on a prop-firm account?
Stocks, futures or crypto through an API broker or exchangeA Python bot
Indian stocks or F&O through a broker APIPython with your broker’s API, within SEBI’s retail algo rules; see is algo trading legal in India?
Ideas that live on TradingView chartsPine Script to test and send alerts, then a bridge or a conversion to execute

For the trade-offs between the two most common choices, see MQL5 vs Python for algo trading.

Do you need to know how to code?

No. But you do need to think like a programmer: in exact rules. After that, there are three routes.

  • Learn to code it yourself. MQL5 or Python. It takes months to do well, but you understand every line and can change it any time.
  • Use a visual or no-code builder. Fast for simple ideas. It gets hard with complex exits, broker differences and failure handling, and you still have to test it properly.
  • Have a developer build it. Faster, and the code handles edge cases you may not think of. Make sure you receive the full source code. Typical prices are in how much a trading bot costs.

Whichever route you take, two skills stay with you: knowing your rules better than anyone, and reading a backtest report critically.

Step 4: How do you backtest without fooling yourself?

Write down your pass criteria before you see any results, for example the largest drawdown you could accept. Then:

If the idea fails here, that is a good result. It cost you nothing.

Step 5: How long should you demo test?

Plan for one to three months on a demo account at the broker you will use. The goal is not to prove the strategy is profitable. Three months is too short for that unless the strategy trades often. The goal is to prove the software works:

  • Every trade matches the written rules.
  • Orders are not rejected for stops, lot sizes or filling modes.
  • The program recovers after a restart or a disconnect.
  • Spreads at your trading hours look like the ones in the backtest.

At the end, run the backtest over the same weeks and compare the two trade lists. They should be close. Run the demo on the machine you will use live, usually a VPS; see choosing a VPS for MT4/MT5 EAs. Keep in mind that demo fills can be kinder than live ones.

Step 6: How small should you start live?

Start at the smallest size your broker allows, or at a risk you would not notice losing. The first live weeks test execution: slippage, real fills and real spreads. Use the position size calculator to see what your stop means in money.

Decide your stop rule in advance. For example: “If live drawdown goes beyond the worst drawdown in the backtest, I stop and investigate.” Increase size in steps, only after live results match your test over a set number of trades. Before you fund the account, read how much money you need for algo trading; tiny accounts force oversized risk.

Which beginner mistakes should you avoid?

  • Buying a bot from a sales page before writing any rules of your own.
  • Optimising until the backtest looks perfect.
  • Skipping the demo stage because the backtest looked good.
  • Trading too large from day one.
  • Changing the rules after every losing trade.
  • Using martingale or an uncapped grid to “fix” a weak strategy.

Checklist

  • One simple idea you can explain
  • Written rules another person could follow exactly
  • A platform that matches your market and broker
  • Pass criteria written before the backtest
  • A realistic backtest with unseen data
  • One to three months of demo, compared trade by trade
  • Small live size, and a stop rule written in advance
General information about building and testing trading software, not financial advice. Trading leveraged products carries a high risk of loss.

Quick answers

Can a beginner do algo trading?

Yes, if you start with simple rules, test them honestly and trade small. The hard part is not the software. It is accepting what the tests say.

How long does it take before trading live?

With rules ready, building and backtesting take days to weeks. Add one to three months of demo testing. Rushing the demo stage swaps a cheap lesson for an expensive one.

Which language should a beginner learn first?

The one your platform uses. MQL5 if your broker or prop firm offers MetaTrader 5, Python if you trade through a broker or exchange API, Pine Script if your ideas live on TradingView charts.

Should I buy a ready-made bot instead?

You can test one, but you will not know its rules, so you will not know when it is failing. Starting from your own rules teaches you far more.

Is paper trading the same as a demo account?

Mostly. Both use virtual money on live prices. A broker demo account is closer to your real setup because it uses that broker’s symbols, spreads and server.

Written by
Rohit B., Vertex Algorithms

Co-founder and lead developer. Building MT4/MT5 Expert Advisors, Python trading bots and Pine Script since 2018, with trading analysis by co-founders Harshal K. and Bilal M. About the founders →

Have your rules written down?

Send them to me. I check them for gaps, build the EA or bot, test it with realistic costs, and hand over the full source code for your demo run.

WhatsApp