How to get started with Algorithmic Trading (Algo Trades)

Algo trading means you are entrusting a computer to trade on your behalf. The computer will fetch the prices, punch the orders, and list the positions all on its own. You just have to switch on the computer every day before trading hours and then switch it off after work.

Wow !!!!

It sounds like a dream of every trader. Imagine if all the effort you need to do is just switch on the computer daily and the money flows to your account.

It is not that easy, but it is simple. If you are quite good with logical reasoning and a bit into computer programming — you too can set up algorithmic trades.


Basically, there are 2 categories of people who use Algo trades

Category 1: High frequency trader.

Category 2: A working professional who does not have time or effort to watch stock markets, charts & prices.

Just think about these 2 categories objectively, both of them are at the extreme ends of the spectrum yet both of them use Algo trading.

Most of the traders fall right in between these 2 extreme ends. 90% of professional traders may not be running automated trades, how is it then that an employee (IT, teacher, or government job) does it?

The answer is TIME.


A high-frequency trader (HFT) may punch multiple orders every second. 100s of orders every minute and then there is no practical way someone can do that manually.

When I trade manually, it takes me more than 30 seconds to find a stock and then place a limit order. Compare that with the guy at the other end who might have placed 50 orders in the same period. Time is everything in financial markets.

The only practical way for the HFT is to get things automated and let the computer do the heavy lifting.

A working professional also does not have TIME. His main profession would be as a doctor, lawyer, IT employee, Govt. employee, shop owner, tax consultant etc. How will a busy person like this find time to trade? Imagine walking into a dental clinic and then the doctor tells you to wait for 1hr as he has taken a short-sell position on TCS?

The only practical way they could participate in trading is via automation. Give clear instructions to the computer when to enter & exit the trade and then forget about it.


Well, that sounds exciting, but why do the people in between are unable to automate things?

The first reason could be because we are watching the markets. Emotions play a big role, even for a professional trader. Most of the trades taken are on narratives rather than data points.

Example: I expect TCS’s quarterly results to be better and I would like to buy a few shares & participate.

And once you buy those shares and then the results come in good, but the shares are depreciating in price — your emotions will force you to sell them. And then after a couple of minutes, the stock rises and zooms past your target.

The second reason could be that you have not found a way to codify your edge. You are an amazing professional trader who mints money every month, every year but you are unable to explain your edge to someone else. These traders are called discretionary traders as they base the trades on their intuition, experience, and exposure.

The world’s best traders are discretionary, so there is nothing wrong with being one but the major limitation arrives when you wish to scale up your trading setup. Even if you decide to expand your trading universe, watch more stocks, commodities, etc — it may become too stressful for you.

The third reason could be that you are not a profitable trader. The numbers do not lie, 95% of all active traders are underwater. Only 5% of traders are consistently profitable. This could be a major challenge if you wish to automate your trades.

Automation is just sets of instructions you give to a computer. If you give the wrong instructions, you get the wrong results. If you give the right instructions, it will get you the desired results. Ideally, the computer does not care — it will do as it is told.

The above statement is very crucial in the world of Algo trades because if you have a wrong program — your capital will get wiped out faster.


We will discuss how to automate the trades below, but before that — you need to do the hard work to become profitable. It is always recommended to become a good discretionary trader first and then go the automated route. It took more than 5 years for me to go from manual to fully automated trading, but I could say that the wait was worth it.

When you discover your edge, refine it, and then repeat it — you become a master. You get a level of confidence that could help you bounce back even if you had a series of drawdowns.

Or else, the shortcut is to use the Backtester. The only reason the “category 2” folks are participating in automated trades is because they trust the backtester.

A backtester is a software that returns the results of how the trade performed for a specific period. For example, you enter a test condition “Buy RELIANCE when its 50 DMA crosses 200 DMA” and then sell it when “price moves up by 3%”. You can then check how this test condition fared for the last 5 years.

The software will give you data that you can work with. It will give you the following information

  1. Overall profits
  2. Number of trades
  3. Average profit per trade
  4. Win percentage
  5. Loss percentage
  6. Max loss in a single trade
  7. Max drawdown
  8. Reward to Risk ratio
  9. Max win/lose streak

These are actionable data that you can work with. It is just a game of probability now. If your test period is quite long, the chances of tomorrow being like a day you have tested is highly probable.


People busy with other professions depend on this software to find their trades. They do not really care if the stock is going up, down or sideways. They trust the system and then play along. If they design a strategy that has a 65% win rate, what that means is out of every 100 trades — they will win 65 and lose 35.

Losing is part of the equation and these professionals are okay with it. As long as the drawdown does not wipe out their capital — they play another day. They treat it as a numbers game and they know pretty well that they have to play for a long time to even out the risks.

What if, the first 35 trades were loss-making? A normal person would quit — saying the system is unstable and useless. What if the next 65 trades were all profitable?

The backtester is the main reason why even people have no idea about stock markets punch algo trades. Ideally, you cannot blame them, the subject is pretty tough. Even after 14 years of exposure, I am still learning.


I am using an online platform called AlgoTest to run my automated trades. The biggest advantage is that you need not program stuff in python — you can use a visually intuitive interface to define and execute the logic.

Disclaimer: I have created a test strategy just to explain to you how it works, please note I am not using this strategy for trading.

step 1

The index selected is: Nifty50

The entry time is: 09.35

The exit time is: 15.15

I have sold 1 lot of CALL and 1 lot of PUT, meaning it is a short straddle.

The target profit is: 30%

The stop loss is: 30%

What this means is that if my sold premium amount was Rs100, then the amount at which the system should book the profit = 70 (100–30%). The level at which I need to exit by a stop loss = 130 (100+30%).

The concept of buy low sell high has to be applied to make money. If you buy first, then you need to sell at a higher price later. If you sold first, you need to buy it back at a lower price to generate profits.

I am not explaining the concept of “Re-entry on Target”, “Re-entry on Stop Loss” as part of this article — but you can reach out to their support desk for more information.


If you scroll down you can see the important data points of this trade.

data points of the trade
  1. Overall profits = 15308
  2. Number of trades = 85
  3. Average profit per trade = 180
  4. Win percentage = 64.71
  5. Loss percentage = 35.29
  6. Max loss in a single trade = -2258
  7. Max drawdown = -3723.75
  8. Reward to Risk ratio = 0.86
  9. Max win/lose streak = 6/3

data report

You will also find reports of the trades taken as well. This will give you an accurate picture of when the trades were taken, just check these points on the chart — and you will understand.


Algotest is just one of the software that does this job. If you google, you might be able to find something better & efficient as well (do drop me a comment if you found something else).

Even if you are from a non-technical background, you can learn to use their backtester tool in just a day. I guess the free plan offers you 25 free backtests per week too.


As closing thoughts, I strongly feel you should try learning their backtest software. Once you attain a level of confidence you can even put your strategies to a “Forward Test” mode, wherein their system will execute the order just like the live environment but without connecting your broker. The advantage is that you do not lose money, it is just paper trading.

Ideally, you should not go live unless you have tested at least for 6 to 9 months. The reason is that in actual trading, there will be slippage, brokerage costs, and taxes. These are taken out from the profits you generate.


Similar Posts

Leave a Reply