What is trend following? How does it work?

“The trend is your friend until the end when it bends.” – Ed Seykota

Trend following is a trading strategy that seeks to identify a trend (which is a general price direction of a market or security) and then follow that trend to take a favorable position. Trend following or trend trading is a commonly used intraday trading strategy.

How does trend trading work?

As mentioned earlier, a trend is an upward or downward movement in the price of a security for a certain period.

The key is to identify the trend right.

For instance, a stock that was INR 100 on 19th June, INR 117 on 25th June, and INR 125 on July 1 is said to be in an upward or bullish trend.

However, if the price moves in both directions within a range, it is not in a trending phase, but in a consolidation phase. Traders follow trends and hold on to positions until they believe the trend has ended.

The rule is simple:

For an uptrend and long position, one needs to place the stop loss below a swing low that has occurred before entry or below another support level.

For a downtrend and short position, one needs to place the stop loss above a prior swing high or above another resistance level.

Example of higher highs showing an uptrend
Example of higher highs showing an uptrend (Source: PHI 1)
Example of lower lows showing a downtrend
Example of lower lows showing a downtrend (Source: PHI 1)

A few things to keep in mind when trend following:

  • Buy high, sell higher makes sense, although avoid overbought stocks that are ripe for a reversal.
  • Follow the price objectively – look for higher highs and lower lows.
  • Expose yourself to multiple markets and get used to identifying trends first.

Commonly used indicators for trend trading

Traders use a variety of indicators in isolation or combination to identify price trends and reversals.

For instance, some may use breakouts to figure out the start of a trend and use moving averages as criteria to enter the trade.

Momentum indicators, like Relative Strength Index (RSI), Average Directional Indicator (ADX), Moving Averages or MA (specially crossovers), and MACD are commonly used indicators for trend following/trend trading.

Trend lines and chart patterns are widely used to determine the pullback likelihood and confirm market trends or stock trends. Flags and triangles are also widely employed for evaluating the continuation of a trend. But more on this later!

Let us move on to an example.

Trend trading – An illustration using Moving Averages

Both simple (SMA) and exponential moving averages (EMA) as well as crossovers are used extensively in trend trading strategies.

How to identify trends:

An angled-up moving average shows an uptrend, and an angled-down MA shows a downtrend.

Observe in the image below that the price has stayed well above the 50-day simple moving average (50-SMA).

As the price crossed the SMA, it entered ranges in most cases. You can use mid-term MAs like these as a filter using the daily timeframe and aim to trade toward the MA in smaller time frames.

Moving Average to identify trends
Moving Average to identify trends (Source: PHI 1)

How to trade trends:

In simple terms, when the price crosses above the MA, it can be taken as a buy signal, and when the price crosses below the MA, it can be considered as a sell signal.

Trading using crossovers:

In the image below, we have plotted the longer-term 50-SMA and the short-term 10-SMA on a chart of TATA POWER.

A buy signal occurs when the 10-SMA crosses above the 50-SMA. A sell signal occurs when the 10-day crosses below the 10-day.

MA crossover used for trend trading
MA crossover used for trend trading (Source: PHI 1)

However, you must bear a few things in mind when using MA for trend trading. As the price of a stock is more volatile than its MA, this strategy may likely give more false signals.

Further, a fast MA may give false and early signals as it reacts too much to price movements and even make you exit early in case of a trend change. A slow MA may give you late signals.

If you’re willing to explore trend following, consider trying it on PHI 1. As shown above, PHI 1 is super easy to use even for a complete beginner and offers a plethora of advanced options for the expert trader.

Also, you can screen securities, create buckets, create charts and save them, and even experiment with strategies. Once you test your strategies, you can deploy them on the same all-in-one tool with the broker of your choice.

Let us carry the burden of mundane tasks while you focus on trading opportunities.

Avail a demo or free trial now!

Breakout Trading: A Starter Guide

A breakout is defined as a stock price movement beyond a predetermined level of resistance or support with increased volume. Breakouts show the potential for the price to move in the breakout direction.

If there is a breakout to the upside, there is a high chance that the price will go higher, and similarly, if there is a breakout to the downside, the price will probably go further down.

The reason for the breakout to occur is that the stock’s price has been contained below a resistance level or above a support level for some time. When the breakout occurs at a high volume, the price is more likely to move in that direction.

Breakout trading can be used for intraday trading as well as short-term (one week to a month) and long-term (more than a month) trading using different time frame charts.

Several chart patterns can be used for breakout trading; however, the most commonly used pattern is the triangle pattern.

There are three types of triangle patterns: ascending, descending, and symmetrical triangle patterns (as shown below), which can be identified in the chart for trading.

Let’s discuss these patterns one by one.

Source: dailyfx.com

Ascending triangle pattern:

This breakout pattern is a bullish formation and occurs when the stock price breaks the upper horizontal trend line with surging volume.

This upper horizontal trend line acts as a resistance. The lower trend line is inclined at an angle and rising diagonally.

The lower diagonally rising trend line shows the higher lows formed in each swing as the buyers slowly increase their bids.

Later, the buyers rush into the stock above the resistance price, triggering more buying as the uptrend continues. The upper trend line acting as resistance until now becomes the support for the stock.

Descending triangle pattern:

This breakout pattern is a bearish formation, which is an inverted version of the previously discussed ascending triangle.

The lows which are formed inside this pattern are almost the same, resulting in a horizontal trend line.

There is a decline in the upper trend line towards the apex, resulting in forming a triangle. The breakdown takes place when the price breaks the lower horizontal trend line, which was acting as a support. Now, this support line works as a resistance.

Symmetrical triangle pattern:

A symmetrical triangle is formed with the help of a diagonally falling upper trend line and a diagonally rising lower trend line.

As the price moves toward the apex, it breaks the upper trend line and uptrend with rising prices or breaks the lower trend line and downtrend with falling prices.

How to use triangle patterns for breakout trading

The steps which are involved in breakout trading using triangle patterns are common to all three patterns discussed:

1. Look for stocks which are trading in a range for sometime, so that this setup can be applied easily.

2. Draw the trend line joining the high and low prices of the stock.

3. An ascending, descending or symmetrical triangle pattern should form after joining these points.

4. More consolidation happening at the triangle’s apex shows that it may give a good breakout.

5. In an ascending triangle chart pattern, a trader should enter a long position after the confirmation, which is given by a green candle above the resistance line. Also, the green candle should show good volume (can be determined using a volume indicator).

The stop loss should be kept at the lowest point of the same green candle. The target should be an amount equivalent to the broadest section of the triangle.

In the descending triangle chart pattern, the trader should enter a short position once a red candle breaks the support line. Stop-loss should be kept at the high point of this candle.

The difference between the entry point and the vertical distance between the two trend lines should be the target price.

In the symmetrical triangle chart pattern, a bullish or bearish trend depends on whether the breakdown is happening from the upper or lower trend line. The stop loss is generally kept just below the breakout point.

What are the limitations of breakout trading?

Every strategy comes with limitations, and so does breakout trading.

1.False breakouts

When a stock is trading in a range, there are very high chances of false breakouts. A false breakout occurs when the price breaks the support or resistance, but then comes back within the previous range.


Source: dailyfx.com

The problem of false breakouts can be tackled by avoiding entry immediately after the price breaks the support or resistance. A trader should wait till the candle closes (confirming the breakout’s strength) and then make an entry.

2. Corrections

Sometimes, after giving a breakout, the price increases sharply. The trader is pleased to see this; however, the price again comes back closer to the entry point in the next few seconds or minutes.

The trader gets confused by this scenario with a false breakout and exits the trade with a small profit. However, the price corrects and starts moving back in the breakout direction.

Key takeaways from this Breakout trading guide

Breakout trading seems to be a straightforward trading strategy to execute, but there are few limitations to using this method, such as false breakouts and corrections to breakout points. With the right practice and tools, you can master breakout trading in no time!

About PHI 1 – The complete algo trading software

PHI 1 comes with 120+ indicators allowing you to screen securities and easily carry out charting to identify patterns. This can help you trade with confidence.

Not just that, it also helps save charts, create trading strategies, and test and deploy them.

Experience the power of automation in trading.

Try PHI 1 for free!

Swing Trading – A Starter Guide

Many of us do not have the time to trade intraday or prefer not to do so. Swing trading may be an option for people who do not want to do day trading. Swing trading focuses on trading over a short-term period (say a few days to a week or even 1-2 months). Here, a trader holds positions for more than a day. Usually, the target profit in swing trading is 10 to 20%.

Swing traders mainly focus on stocks that are highly liquid and heavily traded on the exchanges and often swing between widely defined high and low points. This gives advantage to the trader to ride the wave in a particular direction and make a profit.

Let us see some Pros and Cons of Swing Trading.


1. Low time commitment: Day trading can be hectic, especially when it requires the traders to actively participate during market hours. (You can solve this problem with automated trading. Read more.) In swing trading, a trader can keep their position open for over a day to a few weeks and does not need to be a full-time trader.

2. Flexibility: One of the most significant advantages of swing trading is that a swing trader can square off positions according to their convenience, whereas a day trader needs to square off their positions on the same day.

3. Profitability: Swing trading can be profitable with proper risk management.


1. Exposure to overnight and weekend price gaps: This is the most significant disadvantage of swing trading. Suppose any negative news or poor quarterly earnings of a company emerge after the closing of the market or on the weekend, the swing trader cannot exit their position and may face substantial price gaps the next day or week.

The only way to minimize the risk linked with the price gaps is to trade with smaller quantities or use a tool like PHI 1 that allows you to automate your strategies, such that trades are executed when certain criteria are met.

2. Locking of Capital

An intraday trader has the advantage of buying and selling the stock many times, and thus, they can rotate their capital to earn good profits. However, in with swing traders, their capital gets locked into a single trade or a few trades and does not free up until the trades are exited

3. Unsuitable for Extreme Market Scenarios: In full-fledged bull and bear markets, swing trading can be tough. This is because markets are highly volatile and may not move as desired by the trader.

Now, let us understand the MACD Crossover, an efficient strategy for swing trading.


Moving Average Convergence Divergence (MACD) is a trend-following momentum indicator that shows the relationship between two moving averages of a stock’s price. Primarily, the 26-period exponential moving average (EMA) is subtracted from the 12-period EMA to get MACD.

MACD=12 Period EMA – 26 Period EMA


After this simple calculation, we get the MACD line. Further, the nine-day EMA of the MACD is calculated, which is called the ‘signal line’.

MACD is presented using a histogram that plots the difference between the MACD line and the signal line. When the MACD line is above the signal line, the histogram will be on the top of MACD’s baseline.

If MACD is below its signal line, the histogram will also be below the MACD’s baseline. Swing traders use this histogram to analyze when the bullish or bearish momentum is huge.

PHI 1 Swing Trading MACD Guide
Source: Investopedia

We can interpret MACD indicators in many ways: crossovers, divergences, and rapid rises or falls. However, MACD crossover is one of the commonly used techniques for swing trading.

Let us understand this technique.

The Buy/Sell signal forms when the MACD line and signal line cross each other.

A bullish trend is indicated when the MACD line crosses above the signal line. This is the right time to enter a trade.

Later, when the MACD line touches the signal line and crosses below it, it is the ideal time to exit the position and book profits.

Let us illustrate how you can do this on PHI 1

Shown below is the chart of CIPLA Limited with a time frame of 1 day. The buy signal is generated when the MACD line (blue colour) crosses above the signal line (red colour). The trader may enter at this price.

In the later part of the chart, traders could exit the trade when the MACD line reverses and crosses below the signal line.


You can create this strategy without any code. PHI 1’s form-based code creator allows you to create this using a drop-down mechanism.

Check out our webinar on how to create a MACD strategy on PHI1.

Whether you are a day trader or swing trader, PHI 1 can help you elevate your trading. As an intraday trader, you need not stay stuck to your screen.

PHI 1 offers screeners, charts, strategy creators, testing, and deployment  – all within a single, unified platform.

Try PHI 1 for free!

A Simplified Guide to Moving Averages – Part 2: Using Moving Averages in Trading

A Quick Recap…

In our previous article, we covered the basics of moving average. To give you a quick glimpse, moving average is an indicator used to get a comprehensive idea of the trends in a dataset. It adds up the stock price over a specific period and then divides the summation by the total number of data points to get the average.

The reason it is called a ‘moving’ average is because it is continually recalculated based on the latest price data.

We also discussed two types of moving averages: simple and exponential. Read our previous article for a detailed introduction.

Now, let’s come back to how moving averages can be used in trading.

We illustrate some instances for you:

1. Determining trends using MA

The direction and position of the moving average gives us crucial information about the price trend of a stock. If the price of the stock is increasing, the moving average rises; whereas, if the price of the stock is declining, the moving average falls.

A price placed above the long-term moving average reflects an overall uptrend, whereas a price placed below the moving average reflects an overall downtrend.

If the stock price rises above its moving average, a ‘buy’ signal is established, whereas when the stock price has dropped below its moving average, it generates a ‘sell’ signal.

In the below picture, we can see the chart of ICICI Bank with the time frame of 1-Day. We have used the 10-day EMA (Exponential Moving Average) for our analysis. When the stock price is above the moving average line, a ‘buy’ signal is generated, and it is the ideal time for a trader to enter a position. Similarly, when the price falls below the moving average line, a ‘sell’ signal is generated and it is a good time to exit.

Source: https://www.tradingview.com

2. Determining support and resistance using Moving Average:

Moving averages can also determine support and resistance. If there is an uptrend in the stock, long-term moving averages such as 50-day, 100-day, or 200-day act as a support level.

This is because once the price of stock touches the moving average line, there is a high chance of it bouncing back. Similarly, during a downtrend, a moving average acts as a resistance level. Here, the moving average acts as a ceiling, and if the price hits this level, there is a high chance of the stock price dropping.

Let us understand this concept with the help of an example. In the below picture, we can see the chart of Wipro Limited and the time frame is 1 day.

The moving average used for the analysis is the 100-day SMA. When there is a downtrend, the moving average acts as a resistance. After consolidation for a few days at the same level, the price declines.

On the contrary, when there is an uptrend, the same moving average line acts as a support, and once the stock price reaches the support level, it bounces back.

Source : https://www.tradingview.com

3. Identifying the crossover

The crossover forms when two different moving averages cross each other. Primarily, two types of crossovers are used in trading: the golden cross and the death cross. In both these crossovers, one moving average is for a shorter duration, while the other is for a longer duration. Generally, 50-day and 200-day moving averages are used to identify these crossovers.

In a golden cross (bullish signal), a short-term moving average crosses above a long-term moving average, whereas in a death cross (bearish signal), the short-term moving average passes below the long-term moving average.

Let us understand this concept with the help of an example. In the below picture, we can see the chart of TATA Motors Limited with a time frame of 4 hours. Also, for our analysis, we use the 50 and 200 SMA.

The death cross forms when the short-term moving average (50 SMA) crosses below the long-term moving average (100 SMA). After the formation of the death cross, the price of the stock declines sharply. Therefore, we can say that most of the time, the death cross shows that there is the potential of a massive sell-off.

Also, in the later part of the chart, we can see the formation of a golden cross. This forms when the short-term moving average (50 SMA) passes above the long-term moving average (100 SMA). After the formation of the golden cross, the price of stock has increased gradually. Therefore, we can say that it is a good time for the trader to buy the stock.

Source : https://www.tradingview.com

PHI 1 enables easy charting with 120+ technical indicator, including different types of moving averages.

With PHI 1, you are assured that when you trade, you’re only focusing on your trades and not on mundane tasks using multiple tools.

Say NO to multiple tools. PHI 1 will allow charting, screening, strategy creation and testing, and order execution, everything in one place.

Try PHI 1 today for free!

A Simplified Guide to Moving Averages: Part 1

Moving average is one of the most common indicators used by traders. It is an easy-to-use statistical tool primarily used for forecasting trends.

Let us understand the basic definition of moving average.

Moving average is an average of any subset of numbers. In trading, it is an average of closing prices within a time frame and is used for predicting future trends.

Because the moving average is based on past prices, it is a trend-following or lagging indicator. Further, what makes it more dynamic is the customization it offers.

Any time period (such as 15, 20, 30, 50 days) can be chosen by the trader while calculating the moving average. Sensitivity to price changes can be regulated by changing the time period. If the period is short, there will be more sensitivity to price change, and vice versa.

An intraday trader prefers a shorter-term moving average, whereas swing traders prefer longer-term moving averages.

Trend analysis Using Moving Averages

A rising moving average shows that the stock is in uptrend, whereas a declining moving average confirms a downtrend. Further, traders use two different moving averages to decide whether there is upward momentum or downward momentum in the stock price.

When a short-term moving average crosses above a long-term moving average, a bullish crossover forms (known as golden cross), which confirms that there is an upward momentum.

Similarly, if a short-term moving average crosses below a long-term moving average, then a bearish crossover is created (known as death cross), which confirms downward momentum in the stock.

Source: Investopedia Golden Cross
Death Cross, Source: Investopedia

Types of Moving Averages:

There are two types of moving averages: Simple moving average and exponential moving average.

A) Simple Moving Average

A simple moving average or SMA is an arithmetic moving average calculated by adding the recent prices and dividing the summation by the number of time periods in the calculated average.

Let us understand SMA with the help of an example:

Simple Moving Average
The table above shows the closing price of a stock for 7 days. While calculating the SMA, the first 5 days’ values are considered. Here, the SMA comes out to be 7. Similarly, while calculating the next SMA, the Day 1 value is excluded, and the Day 6 value is considered to calculate the SMA value. Finally, the Day 3 value is excluded and the Day 7 value is taken to calculate the SMA.

Exponential Moving Average

Exponential Moving Average or EMA gives more weight to the most recent price data, which is considered more relevant than older data.

There are three simple steps that are followed in calculating EMA:

1. First, the SMA is calculated. Suppose you want to use 5 days as the number of observations for the EMA. Then, you must wait until the 5th day to arrive at the SMA. On the 6th day, you can then use the SMA from the previous day as the first EMA for yesterday.

II. After this, the multiplier (k) for weighing the EMA is determined.

Multiplier (k): [2 ÷ (number of observations + 1)]. Here, the number of observations = total time period. Taking the previously discussed example, number of observations = 5. Therefore, the multiplier in this case is k = 2/ (5+1) = 0.33.

III. Finally, the current EMA is calculated.

EMA = Closing price x multiplier + EMA (previous day) x (1 – multiplier)

Generally, 12-day and 26-day EMAs are used to identify short-term trends, whereas 50-day and 200-day EMAs are used to identify long-term trends.

Sensitivity to recent price point changes is more in EMA compared to SMA, making it more responsive to the latest price changes. We can observe how quickly EMA responds to price changes compared to SMA from the below graph.

This feature of EMA makes the results more timely and accurate, thus explaining why many traders prefer to use this indicator for trading.

Source: Investopedia











PHI 1 offers custom moving averages such as SMA, EMA, EMA Cross, and so on among its 120+ technical indicators to choose from when trading.


Unleash your trading superpowers with the all-in-one automated platform. Robust support, no download necessary, and multiple plans to explore.

Try PHI 1 today!

What is the scenario-based approach to trading and how does it help you?

Scenario analysis is the process of gauging the expected value of a security or portfolio over a specific period, with variations in key factors that may affect the price of the security.

For instance, in trading, scenario analysis could mean evaluating the impact of changing market conditions on your open positions. These scenarios could be a downward or upward trending market or even extremes like a complete market crash.

How does scenario-based approach to trading help?

Algorithmic trading allows scenario analysis using mathematical models. These assessments are helpful in understanding the risk level within a security with respect to various events that could range from least probable to highly probable.

Based on the results of the analysis, a trader can decide whether the risk levels lie within his/her comfort zone and whether the trading strategy will benefit them.

Basic and worst-case scenarios to account for when trading

When trading, you would obviously want to take into consideration various market scenarios like volatility, choppy trading, bullish trend, bearish trend, and so on. You may also want to have conditions like a complete market crash as a least probable scenario, but one that cannot be ignored.

Further, there are many possibilities such as power failures, hardware failures, Internet connection issues, broker downtime, and overnight positions that could go wrong, and huge opening gaps, which could wreak havoc in your trades.

To be fair, anything could happen. But, the question is how do we avoid this from affecting our trades?

This is where scenario grading comes in.

How scenario grading helps

Scenario grading scores your trading strategy in various market conditions. Essentially, your strategy receives a grade based on how it will perform in specific market scenarios such as a market crash, sideways.

The entire process involves grading any set of mechanical trading rules in a variety of market conditions.

This can help you fine-tune your strategy before you trade in the live market and avert huge losses. It also helps limit biased trading performance, as you may realize that your trading strategy works only in certain market conditions. It can also be handy to decide when to use a particular strategy.

PHI 1 offers scenario grading, unique only to the all-in-one platform

PHI 1 Algo Trading Strategy Grading

PHI 1’s scenario grading feature is a unique mechanism that measures the performance of any arbitrary trading strategy for multiple market scenarios.

Currently, the strategy grader checks for 7 different market scenarios – Uptrend High Volatility (Bull Market), Uptrend Low Volatility (Bull Market), Downtrend High Volatility (Bear Market), Downtrend Low Volatility (Bear Market), Sideways High Volatility, Sideways Low Volatility, and even Market Crash.

You can grade your strategy in six easy steps. And guess what! You can do it right away for free.

PHI 1 takes care of the entire spectrum of trading right from screening, charting, strategy creation, risk controls., backtesting, simulation, and order execution. All on one platform.

You ask what is really fully automated. We say PHI 1!

To find out for yourself, avail the trial today.

Top 5 platforms to backtest/ forward test your trading strategy

Before you put your trading strategy to work, it is essential to test it. The fundamental ways to evaluate your trading strategies include backtesting and forward testing.

Backtesting refers to testing your strategy using historical data sets. Forward testing, on the other hand, refers to evaluating your trading strategy using simulated environments.

As a trader, testing your trading strategy is of utmost importance, as it will not only help you avoid huge losses but also help you trade stress-free.

Here are some trading platforms you can use for trading strategy evaluation:

1. PHI 1:

As an all-in-one algorithmic trading platform, PHI 1 allows multiple testing strategies like bulk backtesting and forward testing (simulations), which you can achieve with the click of a few buttons, on a single dashboard.

All you need to do is select your parameters such as capital, slippage costs, and the risk controls you want to use for the tests.

PHI 1 also offers a unique feature called scenario grading. This is a disruptive offering that scores your strategy for various market scenarios such as volatile, sideways, and crash.

Comes with a form-based strategy creator so you don’t need coding knowledge to get started

It runs on cloud; no download or installation is required.


Take your trading up a notch with PHI 1!

2. Streak by Zerodha

Allows backtesting to show results for metrics like maximum gain, maximum loss, average gain, average loss, etc. with a look-back period of up to five years.

You can run backtests using various parameters and also adjust for brokerage costs and other charges.

Streak does not offer simulations and scenario grading.

It runs on cloud; no download or installation required

3. AmiBroker

AmiBroker allows you to backtest your trade set-up for multiple stocks as well as at the portfolio level, uses some pre-defined values like portfolio size, periodicity (daily/weekly/monthly), commission charges, interest rate, maximum loss and profit target stops, type of trades, price fields which can be changed.

However, you need to type in a strategy formula that contains at least buy and sell trading rules.

Amibroker also allows access to Monte Carlo simulation to check for worst-case market scenarios.You can also test the robustness of your trading strategy by evaluating its out-of-sample performance to avoid over-fitting after in-sample optimization.

Amibroker can be a pricey alternative for Indian traders and requires coding knowledge to use the platform.

4. NinjaTrader

NinjaTrader’s Strategy Analyzer tests automated strategies via backtesting and optimization.


It is designed for use of strategies built using NinjaScript, NinjaTrader’s modern C# based trading framework

You can select the Strategy Analyzer parameters like strategy, instrument, interval type and value and time frame.

The results display all performance statistics and metrics, data for various time periods for analysis, and charts.

However, NinjaTrader is available only on Windows.

MetaTrader 5

MetaTrader 5’s Strategy Tester allows back testing, forward testing, and optimizations.


The Strategy Tester offers various testing modes, e.g., its Random Delay mode simulates network delays during the processing of trades

You can use custom settings during strategy testing like trading limits, margin settings, and commissions.

You can view results in graphical view and also perform visual testing

MetaTrader 5 is primarily used by Forex traders. Besides this, the programming language and advanced features might be difficult for beginners.

If you’re willing to try a one-stop trading platform with screening, charting, easy strategy creation, backtesting, forward testing and scenario grading, and deployment, PHI 1 can be a cost-effective option for you.

PHI 1 uses large sets of data to help you bulk backtest your strategy, offers a simulated environment for forward testing, and also ranks your strategies in multiple market scenarios.

Want a first-hand experience of how PHI 1 can elevate your trading?

Take your trading up a notch with PHI 1!

How to grade your trading strategy for various market scenarios in 6 simple steps

Evaluating your trading strategy using backtesting and forward testing can help you double check your trade set-up. But what if you had one more tool at your disposal to triple check your strategy?

Well, there is! PHI 1’s unique – Strategy Grading.

First, what does strategy grading even mean…? Let us explain.

Strategy grading refers to the automatic scenario-based scoring of your trading strategies. In simple terms, it refers to scoring your algorithmic trading strategy for various market scenarios such as downtrend, uptrend, crash, and so on. The process involves grading any set of mechanical trading rules in a variety of market conditions.

Different market conditions are pre-defined in your algo trading system and when you enter your trading set-up or rules, the system generates a score or grade that shows how your strategy will perform in each market condition in the system.

Why should you grade your trading strategy?

Scoring your algorithmic trading strategy has obvious benefits. It can help you understand how your strategy will perform in various market conditions, including market extremes. This can enable you to refine your strategy before you trade and avert huge losses.

It also helps eliminate biased performance, when your trading strategy works only in certain market conditions or at least helps you decide when to use a particular strategy.

How does PHI 1’s strategy grading feature work?

The strategy grading mechanism measures the performance of any arbitrary trading strategy for various market scenarios. It can grade strategy for 7 different market scenarios currently:

1. Uptrend High Volatility (Bull Market)

2. Uptrend Low Volatility (Bull Market)

3. Downtrend High Volatility (Bear Market)

4. Downtrend Low Volatility (Bear Market)

5. Sideways High Volatility

6. Sideways Low Volatility

7. Market Crash

How to grade your trading strategy on PHI 1 in 6 simple steps

Step 1: First, you would need to create a strategy in the Code Mode or Form Mode (if you prefer not to code).

Step 2: Name the strategy and select Run and Save.

Caption: In this case, we have created the Trix Momentum strategy. The init code calculates the required indicator by providing the name and parameters of the built-in momentum indicator, and the step code takes entry and exit positions based on its values

The displayed summary results and individual trades can be assessed, and the strategy can be modified based on the analysis.

The Strategy Return Chart displays the equity return and drawdown for the strategy.

Step 3: You can now test the performance of your trading strategy over a wide range of market conditions. Simple select Strategy to list all your saved strategies.

Step 4: Select Grading corresponding to the strategy that you would like PHI 1 to score or grade.

This starts all relevant backtests that your strategy should be assessed on to know its suitability for a wide range of market scenarios.

Step 5: Once the process is complete, you can view and analyze the results. This will help you further fine tune your strategy or use it only in specific market environments.

Step 6: Well, this requires you to try it out! Are you still waiting? Well, you don’t have to, because PHI 1 offers a free trial for 14 days. Post the trial, you can choose a plan that suits you best.

Isn’t strategy grading a game changer in making trades more decisive?

Not just this, PHI 1 also offers screening, bulk backtesting, simulation, and deployment, all in one unified trading platform.

Experience the power of automation in trading. Go full throttle with PHI 1.

Here’s a surprise for you – Code for the above mentioned Trix Momentum Strategy. Try it now!

TRIX_Momentum Strategy

Initialize Code:

self.trix = Trix(self.data,period=20)

self.signal = EMA(self.trix, period=12)

Step Code:

if (self.trix[0] > self.signal[0]) and (self.trix[-1] < self.signal[-1])  and (self.position.size==0):


if (self.trix[0] < self.signal[0]) and (self.trix[-1] > self.signal[-1]) and (self.position.size > 0):


if (self.trix[0] < self.signal[0]) and (self.trix[-1] > self.signal[-1])  and (self.position.size==0):


if (self.trix[0] > self.signal[0]) and (self.trix[-1] < self.signal[-1]) and (self.position.size < 0):


Take your trading up a notch with PHI 1!

The Secret to Trading Better – Backtesting and Forward Testing!

What is the one thing you should avoid when your money is at stake? Being reckless! At least, that should be the case while you are trading, especially when you have the means to evaluate your trading strategy. Your two best friends, in trading, are backtesting and forward testing

What is Backtesting?

Backtesting is testing your trade set-up or trading strategy using historical data to assess its performance over a specific period. Backtesting trading strategies is simple using trading systems.

With backtesting, you can learn more about how viable your trading strategy is without the need to risk your money.

You can test both – simple and complex trading strategies requiring multiple parameters and inputs with backtesting. The analysis that you get from backtesting can optimize your trading strategy.

Here are some pros and cons of backtesting:

First, the pros:

1. Backtesting helps develop confidence in your trading strategy.

2. You can make necessary improvements to your trading strategy.

3. You can test your strategy for specific periods and parameters.

The Cons:

1. Past data does not guarantee future performance.

2. Historical data include limited market conditions and do not account for unplanned events.

3. There may be a chance of over-fitting strategy parameters. You may end up over-optimizing the strategy to a point where it perfectly fits historical data, but fails in most other scenarios.

Backtesting trading strategies does not tell you how your strategy will perform in forecasted or live trading conditions.

This is because live charts and backtesting charts may vary a lot, and your trading behavior may also be different when you put in actual money. Further, there are always unplanned events impacting markets.

Of course, backtesting helps optimize your trading strategies, but you need to take your strategy to the next level with forward testing.

What is Forward testing?

Forward testing, which is also known as paper trading, refers to testing your trading strategy in a live environment. However, as the name suggests, paper trading is done only on paper, with no actual money.

Here are some pros of forward testing:

1. You can validate the model’s ability to make profits in real trading.

2. You can assess how your trading strategy will be impacted by trends, volatility, and liquidity conditions.

3. It helps gain more confidence if done after backtesting

A disadvantage of forward testing is that because it is on paper, no actual money is involved, and since you’re aware of that, your trading psychology or behaviour may be biased.

How to perform backtesting and forward testing using PHI 1?

You are aware by now that backtesting assesses your trading strategy for historical data, while forward testing further adds a layer of safety by testing in a simulated market environment.

Hence, a combination of both is key to developing confidence in your trade set-up.

Here’s how you can perform these tests with ease on PHI 1:

You can screen the security you want to trade with, and use our charting tool (forever free!) to ideate your strategy.

1. Next, using our Multi-Symbol Strategy Creator, you can either create your trading strategy in Code Mode or Form Mode (Don’t know coding? Here’s how you can still create your strategy)

2. You may then save your strategy and go to the “Backtest” option. Here, select the strategy you want to test, choose your instrument as well as market scenario.

3. Then, select your parameters such as capital, slippage costs,. and the risk controls you want to employ for the test.

4. Next, simply click “Run.” You can also bulk backtest on PHI 1 using enormous volumes of reliable data for different time intervals.

5. For forward testing or simulation, click the “Simulation” option on the left-hand side. On the dashboard, select your preferred options and run the forward test!

Here’s a video to help you with the process – Watch how to bulk backtest your trading strategy using PHI 1.

It is that simple! Besides this, PHI 1 also offers scenario grading. This is a disruptive, “patent pending” feature that grades your strategy for various market scenarios such as volatile, sideways, crash,.

Also, you get to access all these features on a single dashboard for free during the 14-day trial period and can choose from a wide range of subscription plans anytime.

Don’t trade without double-checking your trading strategy! Test and test again for a better trading experience!

Check out 3 trading strategies you can code and back test on PHI 1 right away!

Take your trading up a notch with PHI 1!

Is your trading strategy failing you?

“Losses are necessary, as long as they are associated with a technique to help you learn from them” – David Sikhosana

By this, David Sikhosana perhaps meant that there is no way we can completely avoid failure while trading. However, if we do not identify the reasons for failures and learn from them, it is a huge problem.

The crux of the matter is to figure out what went wrong with your trading strategy and why it failed.

Here are some reasons why your trading strategy may fail you repeatedly:

1. Having a poor risk/reward ratio

Many traders focus on multiple metrics in their trading strategy, but do not account for a good risk/reward ratio. The ratio suggests how much risk you’re willing to take to earn a unit of profit.

A lot of times, traders end up using strategies that involve taking a tremendous risk for miniscule profit. Risk/Reward ratios should approximately be 1:3, but this should be in tandem with other measures like win rate and should not be considered in isolation.

2. Ignoring the key aspect of drawdown

One of the biggest factors that affects trading success is the lack of knowledge about using drawdown. Understandably, one’s trading strategy aims to achieve greater returns at the lowest potential risk.

However, while trying to avoid drawdowns, one may end up with a curve fitted or over-fitted system (where your strategy is not fit for changing market behaviour).

You cannot completely avoid drawdowns, but you can definitely factor in parameters such as the time to recover from a drawdown for better trading performance.

Time to recover from a drawdown helps you understand how prolonged a drawdown can be, whether it is temporary or permanent.

3. Using too many indicators

Having too many indicators at once in your trading strategies, whether they are intraday trading strategies or option trading strategies, can lead to failure. Having an excessive number of indicators leads to over-analysing and decision paralysis.

Remember, more tools do not mean better trading. In fact, it is quite the opposite. Keep your trading system simple and stick to a few indicators you are comfortable with, to form an optimal strategy, not the perfect one!

4. Not accounting for slippages and transaction costs

Transaction costs like broker fees, exchanges fees, taxes, etc. involved in trading are usually excluded from a trading plan while estimating profitability. However, these costs can be substantial.

It is also important to consider the effect of slippages, like the bid-ask spread when orders get filled. It helps to forecast these slippages as a percentage of the price of the security.

5. Over-fitting/ Using unreliable data while testing your trading strategy

Over-fitting in the trading context refers to adjusting your strategy too closely to a limited set of data. Over-fitting makes the strategy align so closely with the historical data that it ends up failing in other market conditions.

This is because past data does not perfectly determine future market behaviour. Over-fitting can give you false confidence while trading with your strategy. Instead, using extensive sets of reliable data and bulk backtesting can help you test your strategy for robustness.


6. Trying to use your trading strategy universally

Do you have a trading strategy that has worked for you in one particular scenario in different markets or in different scenarios in the same market?

Well, don’t make the mistake of using it universally across markets, securities, and scenarios. No one strategy can win in all situations and markets.

Instead, consider scenario grading and backtesting for different markets to fine-tune your trading strategy each time you use it.

Many a time, you may not be able to ensure that all the above points are taken care of, simply because you do not have the tools and resources for the same.

With an automated trading platform like PHI 1, you can assess your trading strategy for multiple parameters.

Further, PHI 1 offers backtesting using reliable sets of data, so you can evaluate your trading strategy in a jiffy! Not just that, you can also grade your strategy in multiple market scenarios like crash, volatile, choppy, etc. so you are more confident of trading in live markets.

From screening to deployment, PHI 1 is a unified algo trading platform that allows you to focus on the real deal, saving time and money spent on using multiple tools. Further, you do not need to install or download anything. You can access it directly through your browser.

Try our all-in-one algo trading platform for free and browse through our multiple plans for more features!

Take your trading up a notch with PHI 1!