Q & A – Trading Strategies: Introduction (Webinar)

(Disclaimer: This Q&A session was part of our educational webinar – Trading Strategies: Introduction on 18th September 2020 by PHI 1 – An end-to-end algo trading platform. The purpose of sharing these strategies is purely educational. Please do not consider these for investment purpose)

(Click here to watch the complete recording of the webinar)

Q.1. How are you carrying the short trades for so many days? Aren’t you supposed to square off the position at the end of the day? (Starts at 15:00 in the video)

A. That is correct. What we are doing here is backtesting our strategy. The idea here is that you can easily create a strategy, check whether it works or not. We are trying it out on equities. You also have an option to try this out on the Futures and rollover the contracts whenever they expire.

Once you are confident enough, you can try it on real-world conditions. For example, you can run it at a higher time-frequency, at an hourly level or minute level. All those frequencies are available in the platform, in which case you will get your long/ short signals and the square off within the day or within the week itself.

Q. 2. Can you analyze multiple symbols or instruments at the same time? (Starts at 18.30 in the video)

A. You can analyze up to 8 symbols or instruments at the same time. Not only symbols, but you can run your strategy on multiple time intervals as well.

Q. 3. Is this code available on the platform? (Starts at 23.00 in the video)

A. The code shown in this webinar is not available on the platform. We have shared the code in the form of a blog article. You can view the code here – (link)

Although, there are a few code templates available in the platform which you can try out at any time. (Shown in the screenshot below)

Create Strategy

Q. 4. Are there any more calendar controls other than the day controls? (Starts at 23.55 in the video)

A. Apart from day control, there is time control, week control, month control, and date control.

Time Control

You can specify the start and end date for the day.
For example – Trade between 10 am and 2 pm, if you think the volatility at the start and the end of the day is too much for your strategy.

Week Control

You can specify during which week to trade or not to trade
For example – Do not trade in the week when there is monthly expiry

Month Control

You can specify during which months to trade or not to trade

Date Control

You can specify dates on which you do not want to trade
For example – Budget Day or Monthly Expiry, etc.

Q. 5. Is there a way to learn these parameters? (Starts at 25.15 in the video)

A. You can visit our learn section to know more about the parameters to use in your code. The key here is to try out multiple things and backtest it multiple times to understand what works and what doesn’t.

Q. 6. Can I run a strategy on multiple time intervals?

A. You can run your strategy at multiple time intervals.

Q.7. Can I build a Keltner Channel Trading Strategy on PHI 1? (Starts at 28.15 in the video)

A. You have more than 120+ indicators to play around with on the PHI 1 platform so even building a complex strategy like Keltner is not a problem. If you want help in coding it, then please schedule a demo session with us and we will help you out.

You can also access the code guidelines in our learn section – https://app.phi1.io/Learn You can code the strategy using these 120+ technical indicators.

Example – Code for MACD – https://app.phi1.io/articles/macd

Q.8. I don’t know how to code. How do I get started with PHI 1? (Starts at 30.00 in the video)

A. There are 2 ways we can help you here.

If you have a trading strategy with clear rules with you, then schedule a session with us and we will help you code it.

The other piece is in progress. We are working on a form-based strategy builder that will help you build your strategy without any coding. That’s still in progress. Till then, you can always connect with us and we are happy to help you code your strategy.

(Click here to watch the complete recording of the webinar)

If you need any help or have any questions, then please schedule a demo session with us and we will help you out.

Tagged : / / / / / / /

3 Trading Strategies You Can Code and Backtest on PHI 1 Right Now

(Disclaimer: These strategies were showcased as part of our educational webinar – Trading Strategies: Introduction on 18th September 2020. The purpose of sharing these strategies is purely educational. Please do not consider these for investment purpose)

1. Pairs Trading Strategy (Using Kotak Bank & HDFC Bank using Day Frequency)


self.val = self.datas[0].close/self.datas[1].close

self.boll = BollingerBands(self.val, period=40, devfactor=2)



if (self.val[0] < self.boll.lines.bot[0]) and (self.position.size==0):

  self.sell(data = self.datas[1])

  self.buy(data =  self.datas[0])

if (self.val[0] > self.boll.lines.mid[0]) and (self.position.size>0):

  self.sell(data = self.datas[0])

  self.buy(data =  self.datas[1])

READ :   Top 5 Best Algo Trading Software in India 2021

2. Trend Following Strategy (TURTLE TREND on Reliance Industries, 1 day)


class DonchianChannels(bt.Indicator):

    lines = (‘dch’, ‘dcl’,)  #dc high, dc low

    params = dict(


        lookback=-1,  # consider current bar or not


    def _init_(self):

        hi, lo = self.data.high, self.data.low

        hi, lo = hi(self.p.lookback), lo(self.p.lookback)


        self.l.dch = bt.ind.Highest(hi, period=self.p.period)

        self.l.dcl = bt.ind.Lowest(lo,  period=self.p.period)

       self.donchian = DonchianChannels()

self.count1 = 0      



if (self.data.close[0] > self.donchian.dch[0]) and (self.position.size==0):


if (self.data.close[0] < self.donchian.dcl[0]) and (self.position.size>0):


if (self.data.close[0] < self.donchian.dcl[0]) and (self.position.size==0):


if (self.data.close[0] > self.donchian.dch[0]) and (self.position.size<0):


3. Mean Reversion Strategy (ONGC Hour frequency; Calendar Selection: Wednesday)


self.boll = BollingerBands(period=21, devfactor=2)

self.count1 = 0


curr_date = self.datetime.datetime(ago=0)

if risk_control_window(curr_date):


   if (close < self.boll.lines.bot) and (self.position.size==0):



if (self.position.size > 0):

   self.count1 = self.count1 + 1


if (close > self.boll.lines.top) and (self.position.size>0) and (close[0] > close[-self.count1]):


    self.count1 = 0


if (self.count1 > 4) and (close > self.boll.lines.mid) and (self.position.size>0) and (close[0] > close[-self.count1]):


    self.count1 = 0


if (self.count1 > 4) and (close[0]/close[-self.count1] > 1.02) and (self.position.size>0):


    self.count1 = 0


if (self.count1 > 4) and (close[0]/close[-self.count1] < 0.98) and (self.position.size>0):


    self.count1 = 0


if (self.count1 > 10):


   self.count1 = 0

(Click here to watch the complete recording of the webinar)

How to use this code on PHI 1?

  1. Copy & Paste the Init code in the – Enter initialize code here section
  2. Copy & Paste the Step code in the – Enter step code here section
  3. Click Run And Save

Trading Strategies Webinar Screenshot

If you need any help or have any questions, then please schedule a demo session with us and we will help you out.

Happy Trading,
Team PHI 1

Tagged : / / / / / / /

Top 5 Best Algo Trading Software in India 2021

Does algorithmic trading sound like rocket science to you? Truth be told, it’s not as complex as it sounds.

In this guide, we clear the air around the myths of algo trading and simplify some seemingly difficult concepts!

Here’s what you will learn:

1. What is algo trading? Is it safe?
2. Benefits of algo trading
3. What do you need to get started? Is coding knowledge mandatory for algo trading?
4. How to create your algo trading strategy/criteria?
5. How will your algo trading strategy work automatically?
6. How to analyze your trading performance?
7. Which are the top 5 algo trading software in India?


1. What is algo trading? Is it safe?

Algo trading or algorithmic trading, which is also known as automated trading or black box trading, uses a computable program that executes trade orders following a set of instructions fed by the trader.

The instructions comprise various aspects of a trade such as price, quantity, conditions, instruments, values, and so on.

For example, the trader can instruct the program to execute a buy order from the 1st to 5th of this month (time), for 50,000 shares (quantity) of a stock as soon as the price of the stock goes above its 50-day moving average price (indicator-based condition).

The trader can also set conditions to sell these shares, e.g., if its price moves below the 200-day moving average price.

When these two instructions are fed, the computer will automatically monitor the pricing of the stock as well as its moving average and execute the buy or sell orders when the set instructions are triggered.

The trader, therefore, does not need to monitor the price continuously or plot graphs to ascertain the moving averages, or even put in the orders manually.

The algo trading software does all the activities on its own by following instructions to the letter.

Algorithmic trading is safe when you develop a proper understanding of the systems, markets, and trading strategies.

Today, about 70% of the total trading volumes in the USA and other developed markets are executed via automated trading.

In India, too, approximately 46% of the total trades on NSE and 30% on BSE are automated.

This number is growing even further as algo trading has many benefits when compared to conventional trading.


2. Benefits of Algo Trading

The main benefit of algo trading is that trading can be done with a speed, frequency and accuracy which are usually impossible for a human being.

With algorithmic trading, the trader can also fully automate the trigger generation and execution of a trading strategy. You no longer need to monitor stock prices or put in orders manually.

Here are some detailed benefits of algo trading:

a. It is incredibly fast

In algo trading, algorithms are written beforehand so the instructions are executed automatically.

The speed is so fast that it’d be nearly impossible for a human eye to spot it.

Multiple indicators can be scanned and executed in a snap! Thus, trades get analyzed and executed faster


b. Create and execute multiple strategies simultaneously

While regular trading involves spotting opportunities manually, it leads to a loss of time and opportunities as the trader can only focus on a few things at once.

With algorithmic trading, a trader has the ability to spot multiple trade opportunities without the need for staying on the screen constantly.


c. It allows you to place accurate trades

Unmatched accuracy is a key advantage offered by algorithmic trading.

Manual trading has lots of space for committing errors in many aspects.

However, with algo trading, the probability of mistakes is reduced drastically. Accuracy is the decisive factor between a good trade and a bad one.


d. Algo trading allows you to identify and prevent bad trades

It is manually impossible for a trader to know which strategy will work in a given situation.

Backtesting allows traders to assess the viability of a trading strategy by showing how it would have worked on a set of historical data.

Backtesting trading strategies reduces the number of loss-making strategies, making way for the most productive strategies to be implemented.

Few algorithmic trading software such as PHI 1 even offer bulk backtesting, which aids in identifying scenarios where your strategy may underperform with the scenario grading feature, wherein your strategy is graded or scored in multiple market conditions, further minimizing risk.


e. You can save time by saving your strategies in one place

Traders can save a tremendous amount of time by entering strategy codes as well as instructions such as stop loss, take profit, exit point, entry point, and saving these onto the algo trading software.

Thus, you can make the most of quickly moving/ highly volatile market scenarios.


f. Get trade diversification

Automated strategies help take care of multiple types of trades as algo software can monitor many markets compared to humans. This enables trade diversification, further cutting down risk.

With multiple automated strategies amid multiple markets, the software can spot opportunities across all markets that it has been instructed to monitor. This protects traders from the concentration risk of trading in a single or very few markets.


g. Eliminate any room for error in execution

When you automate your strategy, there is no room for error in your trades. The algo trading platform will work exactly as it has been instructed. This frees the trader to do more important research-oriented tasks rather than sitting in front of the screen all day trying to spot opportunities.


h. Minimize emotions to reduce risks to your trades

As is well-known, human emotions play an important role while trading. Emotions like fear, hesitation, greed, indecision, and others can hinder one’s potential to stick to one’s trading plans.

However, algo trading takes out the emotion from trading. With automated trading, it is impossible to trade impulsively. Thus, algo trading makes trade more decisive for traders and implements orders without ‘second thoughts’.


i. Save time and money

Last but not least, algo trading is a cost-effective way to trade.

Manual trading involves spending a lot of time behind the screen and investing a lot of energy constantly to identify trading opportunities.

Algo trading reduces this time investment and works just fine without hectic supervision. By being relieved of the mundane chores like data integration, traders can focus on exploring opportunities in the market and how to exploit them to their advantage.


3. What do you need to get started? Is coding knowledge mandatory for algo trading?

Implementation of the algorithmic trading instructions using an algo trading software is the final step in algo trading. The real skill is to translate a trading strategy into a set of instructions which are recognized and actionable by the computer program. Thus, the basic requirement for algo trading is as follows:

  • A trading strategy i.e. entry and exit rules
  • Coding knowledge in languages such as python to program a trading strategy (There are some algo trading software like PHI 1 that can offer form-based inputs and can help devise the strategy without coding knowledge. Learn how! Also, many such platforms also offer coding services.)
  • Strong Internet connectivity to access markets, the algo trading software, get real-time stock movement information, and place orders
  • Access to market data which can be monitored by the trading software
  • Access to a robust and user friendly algo trading software that can assist in evaluating your strategy by backtesting and forward testing before execution.
  • Basic technical analysis knowledge, financial markets knowledge, and the ability to identify and make sense of chart patterns.

(PHI 1 offers an advanced strategy creator that allows traders to create any type of strategies—even arbitrary ones. This enables the trader to explore novel ideas and exploit more opportunities in the market. Learn about automating your trading strategy here.)


4. How do I create my algo trading strategy/criteria?

You create algo trading strategies by coding your strategy or using form-based strategy creators.

Here, you simply put in the desired values for different variables like time, price, quantity, mathematical models, technical indicators, momentum indicators, etc.

Then, you can run this strategy on the instrument you want to trade in.

You can also save your strategy and deploy it when your criteria are met automatically.

But, before running the strategy to trade it is always better to test your strategy on historical data so you can see the result of how your strategy would have performed historically. This is known as back testing.

Traders usually combine a variety of technical indicators to come up with trading ideas and strategies to execute a trade profitably.

Some tried and tested trading strategies like Moving average strategies, Average Directional Index strategies, Relative Strength Index (RSI) strategies and MACD strategies can be used right away on an algo trading software.


5. How will your algo trading strategy work automatically?

Once you have created your trading strategy and chosen the scenarios when you want the strategy to get executed, you can choose a broker with whom you want to execute the trade.

Algo trading platforms like PHI 1 offer multi broker integration wherein you can select from a list of multiple brokers.

Then you can run your strategy, and it will work automatically and the trades will be executed once the strategy parameters are met.


6. How to analyze your algo trading performance?

Planning a trade involves deciding the time you want to commit to trading, your trading goals, deciding how much capital you want to allocate, risk levels, and your entry & exit points.

Then, you would need to focus on technical parameters such as research on securities, markets, trading opportunities, setting risk controls, creating a strategy, and evaluating the strategy.

You may use various metrics like win rate and Sharpe ratio.


7. Which are the top 5 Best Algo Trading Software in India in 2022?

Traditionally, traders have been automating their trading process using custom-made trading software and Excel macros. While both are time-consuming, the former is also quite expensive and the latter requires extensive human effort and only partially automates the process.

With various amendments in trading laws over the years, algo trading has gained rising popularity in India. To facilitate this, several algorithmic trading software and tools are available in the market.

Good algorithmic trading software is one that allows easy access to market and broker data, supports multiple instruments as well as markets, allows creation and testing of any trading strategies, has a user-friendly interface, provides readily available reports, has a reliable architecture as well as efficient order management and execution capabilities.

With the market inundated with many such algo trading platforms, we curate the top 5 algo trading software in India. We also compare their features, pricing, and limitations to make it easy for you to choose what suits you best.


Top 5 Algo Trading Software in India 2021


1. PHI 1

PHI1 - Best Algo Trading Software

Key Features:

  • Provides backtesting, scanning, analytical, and deployment tools all-in-one, making it a one-stop solution for systematic trading
  • Allows multiple testing strategies like bulk backtesting, grading on scenarios, and scenario backtesting
  • Advanced Charting for plotting multiple indicators for live updates
  • Multi-symbol Strategy Creator enables a user to create, test, and analyze multiple symbols or instruments with ease
  • Provides over 120 indicators for free
  • Intuitive and easy-to-use interface
  • Offers standard and calendar-based risk controls
  • Offers multi-broker integration
  • Users can create custom screeners by supplying a mathematical expression
  • Single dashboard to monitor the trading by date interval, strategy, time-frequency
  • No download or installation required


The platform has a lifetime free plan with enough services to chart, screen and do basic research on strategies.

The paid plans begin with a basic monthly plan of Rs. 699/- which allows you to take your strategies live and is one of the most affordable algo trading software in India.


  • Currently, PHI 1 provides data only for Indian Markets.
  • Knowledge of basic Python Syntax is required to define trade entry and exit conditions.

2. Zerodha Streak

Streak Zerodha Algo Trading Software

Key Features:

  • No requirement of prior knowledge of coding
  • Easy to operate with steps like create strategies, backtesting on the basis of maximum gains, maximum loss, average gains, average loss, etc. with a lookback period of up to five years, making it one of the best algo trading software in India 2021
  • The algorithm can be deployed in up to 20 scrips at once
  • Active real-time triggers, actionable alerts, and notifications
  • No download or installation required


Provides 4 monthly plans, starting with a basic plan of Rs. 500/month, a premium plan of Rs. 900/month and an ultimate plan of Rs. 1400/month. The plans come with a daily limit on scans and backtests.

The platform also offers quarterly plans starting from a basic plan costing Rs. 450/month effectively.


  • Presently has limited tools and indicators for technical analysis
  • Not free to use. Has a 7-day trial period.
  • Cannot be used for commodity/currency trading
  • No advanced charting and no order execution
  • Cannot create custom screeners
  • Cannot code custom strategies outside of predefined indicators.
  • Requires manual intervention for order entry.
  • Cannot create Pairs trade or arbitrage type multi-symbol strategies.
  • Cannot monitor multiple different time frames to make a decision.
  • Cannot monitor the equity and its derivatives to take a decision in the strategy.
  • Lacks real-time portfolio monitoring

3. Amibroker


Key Features:

  • Advanced real-time charting with portfolio backtesting and optimization
  • AmiQuote, a universally free quote downloader, collects current, end-of-the-day, and historical data from finance sites
  • Amibroker Formula Language (AFL) code wizard with the addition of code editor enables a user to use English words to create customized technical analysis formulae
  • Functions like Exploration and TradeRisk to create custom filters and risk control
  • Automatic order execution
  • Allows to trade directly from charts using an auto-trading interface (which works with Interactive Brokers)
  • Additional functions like custom metrics, rotational trading, multiple currency support, portfolio-level monitoring, etc.


AmiBroker – Technical Analysis Software is available as a single-user license with a first-time user license starting at $279 for the standard edition, up to $499 for the Ultimate Pro Pack. AmiQuote – Universal Quote Downloader and AFL Code Wizard charge a Single User License fee of $99.


  • Requires learning of complex Amibroker custom language to create strategies and code testing options
  • Lack of a standard template, the requirement of writing the code can be challenging for beginners
  • Mainly suitable for big traders who have tech team/ assistance at their disposal due to the coding requirement for strategy creation and debugging
  • Relatively expensive
  • Available only for desktop
  • Can only run one database per instance/ session, which implies that you cannot open more than one database without opening multiple instances of Amibroker
  • Requires buying of a bundle to access add-on features like AmiQuote and AFL Code Wizard

4. Ninja Trader

Ninja Trader Algorithmic Trading Software

Key Features:

  • Available for free to users with a Funded Account® for using standard features like charting, market analysis, and live trading, with partial and full strategy automation
  • Ninja Trader Ecosystem, a third-party developer community, has a plethora of third-party apps and add-ons available for the platform’s users
  • SuperDOM order entry and trade management system grant enhanced customization
  • Automated Trade Management (ATM) strategies are a part of the Trade + Feature Suite
  • Chart Trader enables users to place and manage trades directly from a chart
  • The number of strikes for Option Chain has been increased
  • Additional tools include Time & Sales, Level II, Hot Lists, etc.


Ninja Trader has three plans – Free, Lease, and Buy. The free plan allows the use of advanced charting, backtesting, and trade simulation.

The Lease plan starts with a monthly fee of $60, while the Buy plan comes for 4 monthly payments of $329 each or a one-time payment of $1099.


  • Free plan with a Funded Account® only includes basic features. To access premium features, users need to lease or buy the packages, where pricing can go on the higher side.
  • Ninja Trader is available on desktop only on Windows
  • Need to use a supporting broker to trade equities
  • NinjaTrader brokerage clients can use the CQG mobile app, but no app available yet if one is using another broker.

5. Meta Trader 5

meta trader 5 Algorithmic Trading Platform

Key Features:

  • Specialized integrated development environment MQL5 IDE enables traders to create, debug, test, optimize and execute trading robots
  • Strategy Tester enables visual testing, genetic algorithm, optimization, etc.
  • MQL5 Wizard generates the Expert Advisor Code to create trading robots for beginners
  • Four modules of execution – Market, Instant, Request, and Exchange execution
  • Market Liquidity Pool to monitor the market depth
  • Additional services like MetaEditor, strategy developers’ database, copy-trading, and virtual hosting


For Traders, MetaTrader 5 trading platform has an initial deposit.

For Brokers, the platform has three variants – Entry, Standard, and Enterprise depending on their requirements.


  • Hedging for exchange markets is disabled
  • MT5’s programming language MQL5 is different from MT4’s MQL4, requiring traders to relearn coding and techniques
  • The programming language and advanced features might be difficult for beginners


We just reviewed the top 5 algo trading software in India.

With there being multiple options for algorithmic trading platforms in India, one can be spoilt for choice!

We urge you to choose an automated trading software that suits your requirements and preferences.


Why try PHI 1?

Whether you are new at algo trading or a seasoned trader, you have seen enough compelling reasons to try PHI 1.

The one that takes the prize is that it is a one-stop solution for systematic trading. PHI 1 is built for traders with the aim to set the trader free from daily mundane tasks so you can focus on the real deal!

Unleash your trading superpowers with PHI 1’s end-to-end algo trading software.

Get a free trial for one of the best algo trading software in India 2021.

Try PHI 1 for free today! Tagged : / / /

How to access PHI 1’s Multi-Symbol Strategy Creator

Step 1 – Log in to your PHI 1 account – https://app.phi1.io/

PHI1 dashboard

Step 2 – Go to Strategy. Click on ‘Create Strategy’

Create Strategy

Step 3 – Write your trading strategy. Add your symbols (In the below image, we have added 2 – TCS and Infosys. You can add up to 8 symbols). Click ‘Run and Save’

Write your trading strategy

That’s it! Now you can monitor and analyze your results.

monitor and analyze your results

If you need any help in exploring our Multi-Symbol Strategy Creator, then let us know & we will help you out – Schedule a call

Read: How to Build Pairs Trading Strategy with PHI 1’s Multi-Symbol Strategy Creator

Tagged : / / / /