What is trading strategy evaluation and how it helps you avoid huge losses?

American billionaire hedge fund manager, John Paulson, once said, “No one strategy is correct all the time.”

This quote should force us to dig deeper into our trading strategies and understand that even though we think our trading strategy has worked for us in the past, you would still need to plan for every trade you place.

What does planning in trading exactly involve, anyway?

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.

In this article, we focus on strategy evaluation, as it is one of the most important steps in risk management that many skip prior to placing orders.

Trading Strategy evaluation is assessing if the strategy you have chalked out would really work for you in different scenarios.

Often, you may be convinced that a strategy will work for you, and turns out it was a loss-making one.

Strategy evaluation can help you decide if your trading strategy is good enough and whether you should actually go ahead with your trade.

Why you must evaluate your trading strategy

1. Helps avoid the same mistakes:

You may have placed multiple trades earlier, and things just aren’t working out for you. What do you do? Use the same strategy thinking it will work this time? Stop! Go back and check your strategy.

Are there minor things you missed out on earlier? If yes, reusing the same strategy will do no good another time.

Evaluating your trading strategy will help you find these flaws and correct your strategy so it works in your favour the next time.

2. Allows assessment of strategy robustness in various scenarios:

Okay, maybe some of your trading strategies have worked for you so far. But will your strategy work if a crash like the one that happened at the start of the lockdown in 2020 strikes one more time?

Will your strategy work in case there is a black swan event? The bottom-line is even if your strategy has worked for you in the past, there are scenarios that may make your strategy useless.

Evaluating the robustness of your strategy in various scenarios can help you understand if it will serve you in extreme situations.

3. Helps develop confidence prior to deployment:

Before you deploy your strategy, you can use back-testing to examine how your strategy works on historical data using back-testing.

Further, you can also forward-test your strategy via simulation, which allows you to trade in a virtual environment without using actual money.

Back-testing and simulation can enhance your confidence of trading in the live market.

trading strategy evaluation
Backtesting Dashboard from PHI 1

There are also features like bulk back-testing that some platforms like PHI 1 offer – this allows you to auto-analyze your strategy’s performance.

Your trading strategies are scored in various market scenarios such as volatility, market crash, and trending automatically.

4. Trading with less stress = less emotional interference:

Once you have evaluated your trading strategy, you would use a tested approach to trading after considering multiple possibilities.

This means trading with less stress and emotional impulses. If you are a trader, you know how good trading feels without the emotional bias.

PHI 1 with its bulk back-testing, scenario grading, advanced risk controls, and simulation features ensures that your trading strategy is strong enough for the live market.

Also, you don’t have to use different tools for screening, charts, strategy creation, and placing orders. You can do it all using PHI 1 alone – a single unified algo trading platform that automates your trades the way you want it to.

Take your trading up a notch with PHI 1!


PHI 1 is free to use for 14 days and offers multiple paid plans with robust features for all your algo trading needs.
Tagged : / / / / /

Why you must paper-test your strategy?

So you have devised a unique trading strategy for yourself and are excited to try it. However, you hold back for the fear of losing your money. Well, it’s only rational to think this way.

Before you actually go live with your trading strategy, it is important to test your strategy. One way to do so is in a virtual environment through a process known as “paper trading”.

Paper trading is essentially a practice of trading in a completely virtual or simulated environment.

The term “paper trading” came into being from the time when traders would mark their strategies on paper and compare it manually with the movement in stock prices to examine their robustness.

With paper trading, you do not need to actually invest your money as the entire trading environment is simulated.

So, anything that happens within paper trading will not affect your trading account or the stock market. Paper trading simulates real-time values of the markets and allows you to test your trading strategies and test them.

Paper trading is a must, especially if you are a beginner considering that it is your hard earned money that you deploy in the markets. In fact, it is advised not just for new traders but also for experienced traders to test novel strategies and ideas.

Here’s why you must paper-test your strategy before deployment

1. No risk involved

When you paper-test your strategy, it essentially costs you nothing. So, if you make a terrible trade, you cannot lose money. You can use the trade to identify flaws in your strategy and ensure that you do not repeat them during live trading, which further reduces your risk.

This can help you gain valuable initial experience as a beginner, and your hard-earned money stays with you while you practice your strategies.

2. No stress or emotions involved

Emotions are a large part of trading, especially for beginners. A lot of times, it is your impulses that cause a poor trade and not your strategy. Paper-testing your strategy does not allow your emotions like greed, fear, and panic take over. This allows you to stick to your strategy.

With enough paper trading, you may in fact gain control over your emotions and be able to keep them in check during actual trading. Thus, paper trading serves like mind training!

3. Gives you adequate practice and confidence before deployment

Paper trading gives you the much-needed experience you need before you actually start trading with your hard-earned money.

This prepares you thoroughly before you deploy your strategies. It also gives you enough room to make mistakes and helps develop confidence to trade in the live markets.

4. Boosts creativity to try out new strategies

You may have come up with an experimental strategy that may be hard to implement considering that you have never tried it before.

However, with paper trading, you can literally simulate any strategy under your belt. This particularly helps when you do not have any statistics on the strategy’s performance.

READ :   Top 5 Best Algo Trading Software in India 2021

Paper trading is not just for beginners but also for experienced traders who have lost touch with the market. Every trader goes through periods of losses, which can affect their confidence. Paper-testing can be a lot of help with regaining your control on emotions and your confidence before you dive back into action.

While earlier, traders would test strategies on an actual paper, today, a lot of platforms offer simulated trading. PHI 1 offers a superior simulation experience that can help you paper-test your strategies before you get into the real deal.

All you need to do is create and save your strategy on PHI 1, enter the strategy you want to use for paper trading, choose an instrument, set testing parameters and amount, and add risk controls. You’re all set to drive a trading simulation using PHI 1.

Also, PHI 1 enables limitless creation of strategies with its form-based and multi-symbol strategy creator, and standard as well as calendar risk controls, taking your algo trading to the next level.

PHI 1 aims to set the trader free from the daily mundane tasks by automating them, so traders can focus on exploring opportunities in the stock market.

Whether you’re a beginner or experienced trader, paper-testing refines your trading game. With PHI1, you can paper-test your strategies with ease.

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

5 common mistakes every trader makes and how you can avoid them

It’s ok to be wrong; it’s unforgivable to stay wrong.” – Martin Zweig

Contrary to what many beginners believe, trading is not a way to make ‘easy money.’ While a lot of glamour has been associated with the trading world, it is only those who research, gain knowledge, and learn from their mistakes that truly flourish as traders.

Of course, experienced traders make trading mistakes, too. However, simply repeating trading mistakes would be unwise.

Here are 5 common trading mistakes you can avoid while trading:

1. Not having a strategy

Failing to plan essentially translates to planning to fail. Whenever you decide to trade in the market, always back it up with a solid strategy.

Jumping into execution without a plan will catch you like a deer in headlights amid an adverse market movement.

How to avoid:

Make sure that you at least determine your entry and exit points and put risk controls in place.

Further, run a paper test in various conditions to understand the probability of your trades winning in various market scenarios.

Also, you may go through your track record at the end of each month to learn from your trades. PHI 1 allows not only the creation of strategies with its multi-symbol strategy creator, it also enables backtesting and bulk testing for multiple market scenarios.

This can help you have a robust trading plan and be confident in your live trades.

2. Failing to cut losses

Okay, you got into a trade and it did not go as you expected. So, you keep hoping against hope that it will work out?

To give your trade more room to work in your favour, you even start moving your stop loss further. This is a common trading mistake!

How to avoid:

If you hit the stop loss, it is a signal that you must take the loss and exit the trade. Basically, it is all about sticking to your plan.

With PHI 1, you can not only set standard risk controls but also various calendar risk controls, which takes substantial stress off you while you trade.

READ :   7 reasons why PHI 1 is perfect for Intraday Traders

3. Getting emotional

One of the primary mistakes traders make is getting too emotional about their money and trading skills. Many traders expect to consistently earn profits from their trades and do not accept that trading is a mix of good and bad days.

Further, if a trade goes against them, they doubt their knowledge and research skills. If a trade works in their favour, they get overconfident, indulging in reckless trading.

How to avoid:

While trading, ensure that you steer clear of your emotions and biases. Automated or algo trading can solve this problem.

Once you devise a strategy and set it in motion, the algo trading platform takes care of your trades. You can now trade without the interference of your impulses.

4. Over-leveraging

Leverage can be a powerful weapon because it allows one to trade in sizes that are larger than their capital. Thus, you can borrow money to enter a transaction that is much bigger than your cash balance.

However, misusing leverage or over-leveraging is the single biggest reason for traders to shut shop. Leverage trading or margin trading can be addictive, however, remember that leveraging comes with a price.

Further, with the size of trade being huge, the potential for loss also becomes huge on leveraged money and can lead to stress and impulsive decisions.

How to avoid:

Be cautious while using leverage. Use only if your strategy is tested and has delivered consistently.

Also, ensure you stick to your trading plan with a strict stop loss. Remember, leverage is a double-edged sword. It can amplify profits but can also maximize losses.

5. Not diversifying trades

Common mistake traders make is concentrating their entire trading capital into one stock or security or taking similar positions in highly correlated assets.

This can literally wipe off your entire capital with an adverse movement in that asset.

READ :   How PHI 1’s Multi-Symbol Strategy Creator helps you spot unlimited trade opportunities

How to avoid:

It is always wise to diversify your trades among multiple stocks, instruments, asset classes, and even markets. This way, a loss in one position can be offset by another, especially if your positions or assets have low correlation.

Have you committed any of these mistakes? Don’t fret! These mistakes are ‘common.’ In fact, every trader has made these mistakes during their trading journey. However, it is essential that one learns from these mistakes in order to move forward in their trading career.

Whether you are a novice or experienced trader, PHI 1 can take your trading up a notch with its many features. Still doubt it?

Take a free trial today! Tagged : / / / / /

Why risk control is important in trading?

 “Throughout my financial career, I have continually witnessed examples of other people that I have known being ruined by a failure to respect risk. If you don’t take a hard look at risk, it will take you.” – Larry Hite

As with any business activity, risks are involved in trading as well. And if you take arbitrary risk, your current trade could be your very last one! This is because a single trade gone wrong can wipe off your entire trading account. But, you can’t really trade without risk.

Then, what should you do? You must learn to manage your risk using risk controls. Risk controls are often underestimated. However, a trader who consistently uses them can manage losses and open herself to more opportunities for successful trades.

Risk Control in trading

Risk control in trading refers to a plan-based trading strategy that focuses on identifying, evaluating, and preparing for any potential for loss. Risk represents the probability of loss when the market/ asset price moves in a direction opposite to our expectations.

For risk control in trading, one needs to keep in mind several aspects such as which financial instruments to trade in, time of entry and exit, where to set profit and loss limits, how to identify good opportunities, how to deal with markets moving against our position, how to keep emotions at bay and finally, how to stay on course with a plan.

Here are some ways to execute risk controls and their importance:

1. Plan your trade

It is common knowledge that planning can even win wars. The same concept applies to trading as well. Successful traders plan their trade before they trade.

Have a logical strategy with the stop-loss and take-profit limits chalked out. If you do not plan your trades, it is very likely that emotions will rule your trades and lead to losses.

READ :   How to automate your trading strategy using PHI 1?

2. Follow the one-percent rule

The one-percent rule is essentially a rule of thumb that says that you should never place over 1% of your trading capital or account in a single trade.

Thus, if you have Rs.1 lakh in your trading account, your position in any single trade should be less than Rs.10,000. This is an effective risk control strategy. However, many traders put as much as 2% too or even lower than 1%.

3. Set stop loss and take profit

As highlighted above, setting stop-loss and take-profit is an important part of your trading plan. Although it is mostly done via technical analysis, fundamental analysis also helps with timing.

One widely used indicator to set stop loss and take profit points is moving averages, given that they involve simple calculations and are also widely tracked by the market.

It makes sense to use longer-term moving averages for highly volatile stocks and also use fundamental events such as earnings, news announcements, etc. to account for the timing aspect.

Make sure you calculate your expected return. You may use the following formula: [(Probability of Gain) x (Take Profit % Gain)] + [(Probability of Loss) x (Stop-Loss % Loss)]

4. Diversify your trades

Ensure that you do not put all your eggs in the same basket. It means do not put all your capital in one trade or instrument.

Ensure you have a healthy mix of instruments to reduce your concentration risk to a particular asset class, sector, and even geography. Choosing less-correlated instruments is recommended while trading.

READ :   Top 5 Best Algo Trading Software in India 2021

5. Consider hedging

Hedging is a strong risk management tool. It essentially involves taking the opposite position from your original position.

Here, if your primary position loses, the other position will still profit and make up for the loss.

What if your algorithmic trading platform itself comes with risk controls? It’s true!

PHI 1 comes with various types of Inbuilt Risk Controls that sets the trader free from the constant worry of losses. Unlike other algo trading platforms, PHI 1 not only offers standard risk control but also calendar-based risk controls.

Further, traders can create custom risk controls during strategy creation. Within calendar controls, traders can make use of day control, time control, week control, month control, and date control, which offers them the option of fine-tuning their trading strategy.

Risk Control - PHI 1
Risk Control – PHI 1

Along with superior risk control, PHI 1 offers an all-in-one trading solution so you can use your precious time exploring unique trading opportunities!

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

Why you should automate your trading strategy?

Automated or algorithmic trading is the process of automatically executing trades based on predefined rules by traders. Traders decide the entry and exit points as well as the strategy to be followed by the algo trading system into the system, which automatically executes trades based on this information.

Automated trading comprises 70% of the total trading volumes in the US and other developed markets currently. In India, nearly 46% of the total trades on NSE and 30% of those on BSE are algorithmically performed.

This number is growing even further as algorithmic trading gains more popularity. While algorithmic trading has several benefits in terms of convenience and efficiency to traders, the one that stands out is the ability to automate one’s trading strategy using the algo trading platform.

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

Let us look at some benefits of automating your strategy in detail:

1. 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. Even multiple strategies can be executed at the same time.

All the trader has to do is input the strategy codes and punch in conditions related to trade entry and exit points, stop loss condition, etc.

The strategies will then be deployed by the software, enabling the trader make the most of tradeable opportunities.

2. Backtest and Bulktest under many conditions

Automated trading enables backtesting of your trading strategies using historical data. This enables you to gauge the effectiveness of your strategy under various market conditions, thereby reducing your risk during actual trading.

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

Strategy Grading in PHI 1 basis various market scenarios
Strategy Grading in PHI 1 basis various market scenarios

3. 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.

This allows the trader to focus on monitoring trades and markets more conveniently. Since algo trading software acts super quick compared to humans, execution is also quick, minus the intervention of human emotions.

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

4. 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.

5. 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.

Automated trading strategies also keep at bay any biases traders may have, as it goes exactly as it should in a predefined manner, whatever the market situation.

Further, it enables the trader to simplify strategies as the trader has to break them down so as to program them. This helps traders get a detailed glimpse into their strategies. Many a time, this also makes traders simplify otherwise complicated strategies.

Want to automate your trading strategy? Try PHI 1

PHI 1’s advanced strategy creator allows traders to create, test, and analyze any automated strategy limitlessly. In addition, its Multi-Symbol Strategy Creator aids in creating over 125 types of strategies.

PHI 1 also provides robust support to create automated strategies through its knowledge section and webinars.

PHI 1 provides all the benefits of algorithmic trading and more–the biggest advantage being that it sets the trader free from the daily, time-consuming tasks by providing all trading tools from screening to execution–at one place. PHI 1 is, therefore, your one-stop solution to automated trading.

Tagged : / / / / / / /

Statistical Arbitrage Presentation by PHI 1 at Finbridge Algorithm Conference (Nov 2020)

Sharing a copy of our Statistical Arbitrage Presentation last week at Finbridge Algorithm Conference

View/ Download from here – Statistical Arbitrage in Algo Trading 

Speaker: Gaurav Mahajan       

  • The Math/ Logic behind the Strategy.
  • How to implement it
  • Selection of Securities to run
  • Risk/Reward Characteristics of the Strategy.
  • How to Construct a Long/Short Hedged Portfolio.
Tagged : / / / / / /

How to automate your trading strategy using PHI 1?

A trading strategy is a plan aimed at generating profits by taking a long or short position. Essentially, a trading strategy comprises a set of pre-defined rules followed by traders to make trading decisions.

A good trading strategy is one that factors in risk tolerance, specific objectives, time horizon, and even tax implications.

A well-researched and -executed trading strategy can help traders achieve profitable returns. You can also fully automate the signal generation and execution of a trading strategy via an algorithmic trading strategy.

With an automated trading strategy, the trader no longer has to monitor stock prices or punch in orders manually. Programming is often an important skill in developing algorithmic strategies.

Here’s how you can automate your trading strategy using PHI 1:

1. Hypothesis Formation/Strategy Formation

Hypothesis formation is all about what you think about the market. It is primarily an educated guess (based on confidence levels) about market behavior and the factors causing this behavior.

Thus, if you think the market is trending lower, you may want to short an asset and if you think the market is trending higher, you may want to go long on the asset—all this is based on statistical analysis.

To validate the hypothesis/assumption, you will need to perform hypothesis testing—a statistical method to test the claim, idea, or guess. In hypothesis testing, one needs to analyze the behaviour of samples (a small representative set) to draw insights about the entire population (a larger set).

Example: You may want to invest in stock only if it has given average returns of 15% annually. You check that for the past 5 years, the stock has given average returns of 18% with a standard deviation of 3%. Would you still invest in this stock? Hypothesis testing helps in such decision-making.

The most common steps used in hypothesis formation are to define the hypothesis, set the criteria, calculate the statistic, and reach a conclusion

2. Coding your Strategy

Once you have decided on your strategy, you need to code the logic of your strategy onto a platform. This would include instructions related to trade entry and exit points, decisions on take profit, putting in the stop loss condition, etc.

Many other factors such as trade size, trading capital also need to be factored in, basis your risk profile. PHI 1’s advanced strategy creator allows you to create, test, and analyze any strategy without restrictions, even if it’s an arbitrary one.

Further, with its Multi-Symbol Strategy Creator, you can create all possible quant strategies, be it Mean Reversion, Momentum, Day Trading, Multi-Frequency, Arbitrage Strategies, Pairs Trading, Seasonality/Calendar based Strategies, Forward Curve, and much more.

More than 125 technical indicators are already built-in and ready to use with a single line of code, and the user can define any new price- and volume-based indicator.

Moreover, PHI 1’s team is always there for any support you may need with strategy creation on our platform through interesting webinars, insightful content, and our comprehensive learn section.

You can start creating your strategies on PHI 1 without any coding knowledge. If you want to build an advanced one like Quant or Price-Action based, then you need to have basic knowledge of Python syntax. You can start right away with these trading strategies on PHI 1.

MultiSymbol Strategy Creator

3 Back-testing and Optimization

Back-testing is an essential tool to analyze the strategies you create based on historical data. This is because if the results of backtesting meet your criteria, it elevates your confidence levels while trading in the live market.

And if the results are less favorable, it’s a loss averted! You can always modify, adjust, and optimize your strategy to achieve a more desirable result.

Unlike most tools available in the market, PHI 1 enables bulk backtesting, an essential feature to identify scenarios where your strategy may underperform.

Further, PHI 1 offers scenario grading wherein you can get a score on your strategies in multiple market scenarios such as market crash and volatility, further adding to your confidence.

Scenario Grading

4. Simulator Testing

Now that you’re done with back-testing and optimizing your strategy, it is recommended that you test your strategy in a simulated (virtual trading) environment.

This can give you a crystal clear picture of how your strategy will perform in the live market. You can identify any bugs or edge conditions that might be present in the strategy code and refine your code accordingly.

PHI 1 offers the ability to simulate trades or perform forward-testing so you can gain the confidence of trading with your strategies in the live market!


5. Live Trading

PHI 1 empowers a trader right from brainstorming a trading hypothesis to back- and forward-testing it. But wait, there’s more, once you’re ready to trade in the live market, PHI 1 helps you seamlessly deploy and closely monitor your trades too!

Moreover, with PHI 1’s multi-broker integration, you don’t have to be limited to a specific broker. The choice is yours. Even if one broker is having a downtime, you never miss a trade again! Multiple brokers also help you get the best rates.

PHI 1 assists traders throughout their trading strategy creation and execution journey.


Along with its unique features such as custom screeners and advanced risk controls, you are set free from the mundane, daily tasks that would otherwise cost you a lot of time and money. PHI 1 is, therefore, your complete solution to automated trading.

Unleash your trading superpowers with PHI 1. Try PHI 1 for free!

Tagged : / / / / / /

Strategies from PHI 1’s Webinar – Creating a MACD Strategy on PHI 1 (6th November 2020)

(Disclaimer: These strategies were showcased as part of our educational webinar – Creating a MACD Strategy on PHI 1 (6th November 2020). The purpose of sharing these strategies is purely educational. Please do not consider these for investment purpose)

1. MACD Strategy

Original Source: View Video

You will find the entry and exit condition in this video which you can create using PHI 1’s Strategy Creator in the Form Code (No coding required)

2. Guppy Multiple Moving Averages Strategy

Original Source: View Video

Since this one is a complex strategy, we have created this one using PHI 1’s Strategy Creator in the Code Mode.

Here’s the code for the same. You can try it out for free


# short term moving averages

self.sema1 = EMA(close,period=3)

self.sema2 = EMA(close,period=5)

self.sema3 = EMA(close,period=8)

self.sema4 = EMA(close,period=10)

self.sema5 = EMA(close,period=12)

self.sema6 = EMA(close,period=15)


# long term moving averages

self.lema1 = EMA(close,period=30)

self.lema2 = EMA(close,period=35)

self.lema3 = EMA(close,period=40)

self.lema4 = EMA(close,period=45)

self.lema5 = EMA(close,period=50)

self.lema6 = EMA(close,period=60)

# confirmation long term moving average

self.conf_lema = SMA(close,period=200)


self.atr = ATR()



# entry

if self.position.size == 0:

list_sema = [self.sema1[0], self.sema2[0], self.sema3[0], self.sema4[0], self.sema5[0], self.sema6[0]]

list_lema = [self.lema1[0], self.lema2[0], self.lema3[0], self.lema4[0], self.lema5[0], self.lema6[0]]


if min(list_sema) > max(list_lema) and low[0] > self.conf_lema[0] and min(list_sema) > self.conf_lema[0] and min(list_lema) > self.conf_lema[0]:

# buy_bracket(limitprice=close[0] + self.atr*8, price=close[0], stopprice=close[0] – self.atr*4)



if self.position.size > 0:

list_sema = [self.sema1[0], self.sema2[0], self.sema3[0], self.sema4[0], self.sema5[0], self.sema6[0]]

list_lema = [self.lema1[0], self.lema2[0], self.lema3[0], self.lema4[0], self.lema5[0], self.lema6[0]]

if min(list_sema) <= max(list_lema) or low[0] <= self.conf_lema[0]:


READ :   7 reasons PHI 1 is a unique algo trading platform

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_Webminar

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 : / / / / / / / /

Q & A – Creating a MACD Strategy on PHI 1 (Webinar)

(Disclaimer: This Q&A session was part of our educational webinar – Creating a MACD Strategy on PHI 1 (6th November 2020). The purpose of sharing these strategies is purely educational. Please do not consider these for investment purpose)

Q.1. What if I deploy a strategy on multiple symbols? If Symbol 1 matches the condition, then what happens to other Symbols?

A. If Symbol 1 matches the conditions in your strategy, then the system will generate a signal for Signal 1 only, not for any other Symbols. Even if you deploy the same strategy for multiple symbols, each symbol functions as an independent one and there’s no dependency on other symbols.

If your broker account has enough balance, the system will generate and execute signals whenever the conditions are met for each symbol.

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

Q.2. For how much duration can I run a strategy?

A. It’s up to you. You can run it forever or you can decide an end date for it and the strategy will run as per your instructions.

Q.3. If there is a tweak in my mind that is not possible within the form mode, can your team code it for me?

A. If you want to add an additional condition or make a change to the time period or your exit conditions, then you can do it from the Form Code itself.

If you think it is a complex one, and it is not possible from the Form Code, then you also have access to the Code Mode. You can edit it from the Code Mode as well.

We do realize that not all traders are familiar with coding syntax, so yes, if you need any assistance, do let us know and we will help you out.

Q.4. Can I add an ATR based stop loss?

A. Yes, you can

Q.4 Do I have to pay to try these strategies in PHI 1?

A. No. Both Creation Modes – Form Mode and Code Mode are available on the free plan. The only restriction is the number of strategies you can create at once.

READ :   7 reasons PHI 1 is a unique algo trading platform

Q.5. Is my strategy private? Or is it visible to other users as well?

A. Your account activity and strategy are completely private and only accessible to you. We encrypt all user information with the best in class encryption service. So, be assured that your strategy is only with you, not even us.

Q.6. Can I deploy this on Options?

A. Yes. You can.

Q.7 Which language do you use to code a strategy in PHI 1?

A. We use Python, but to code a strategy you just need to be aware of basic Python Syntax.

(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.

Take a free trial today ! Tagged : / / / / / / / /

5 commonly used intraday trading strategies

Intraday trading involves the execution of intraday strategies to profit from price changes of an asset. The success of intraday trading depends on a lot of factors—the right strategy, the right mindset, skill, knowledge, and even market conditions, among others.

Further, to get intraday strategies right, one needs to be patient, dedicated, and have the requisite knowledge. However, a few strategies have become popular over time among Indian stock traders.

Although it takes a considerable time to become an expert at intraday trading, here are some commonly used trading strategies in India that should help you get started:

1. Momentum Day Trading Strategy

The best part about day trading is that it allows you to play with volatile market conditions, which can be best exploited using momentum trading strategies. Momentum trading involves buying securities that are rising and selling them when they begin losing momentum.

The motto of momentum trading is simple: ‘Buy high, sell higher’. In momentum trading, traders pay attention to stocks that are particularly going in the upward direction and are trading in high volume. This strategy is popular in India as there is at least one stock that moves 23-30% every day. These strategies are also easy to understand for beginners. The strategy can provide a favorable risk/reward ratio of 1:3 or 1:2.

Try the TRIX Momentum strategy now with PHI1…


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

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



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):


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

2. Reversal Trading Strategy

Reversal strategy, also known as pullback or trend trading, involves trading against trends, that is, it aims to profit from a reversal of trends in the market. This ideally requires a good knowledge about the market and experience in trading as it involves identifying pullbacks.

A pullback is a pause/slight decline in a security’s price from recent peaks that have occurred within a continuing uptrend. Price and volume are two main indicators of a trend reversal, and a trader must know how to read them well.

This strategy provides a good risk to reward ratio (1:3 or above). This strategy involves seeking stock prices that are extremely high and those that have a good snapback potential, and is, therefore, popular.

However, it may be slightly difficult for beginners to use initially given that the identification of pullbacks takes time, skill, and expertise.

Try the reversal trading strategy with this code on PHI 1 now:


self.aroon = AroonOsc(period=25)




if ((self.aroon[0] + 90) < 0):

self.downtrend=self.downtrend + 1


if (self.aroon[0] > 0) and (self.position.size==0) and (self.downtrend > 0):



if (self.aroon[0] < 0) and (self.position.size>0):



3. Breakout Trading Strategy

Breakout trading strategy is among the most widely used strategies in India. Breakouts occur when the price of a security goes beyond a defined support or resistance level along with a rise in volume.

Breakouts make for an important trading strategy because they mark the start of rising future volatility, huge price swings, and even major price trends.

This strategy is based on observation, wherein the trader identifies the right time when the stock price rises above or falls below specific levels. Thus, timing is of the essence when using this strategy.

Breakout trading strategy can be quite risky as it involves quick and aggressive entry and exit. Further, as a lot of traders may be buying the same stock, hardly anyone may be left to buy these stocks after the traders have got in, making it difficult to exit the stock.

Try this Turtle-style breakout trading strategy code on PHI 1 now:


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):


4. Mean Reversion Strategy

Mean reversion is a strategy based on the theory that asset prices and historical returns eventually revert to their long-time mean/average level. Thus, the assumption is that prices will return to average levels when the market deviates too far from the mean.

Basically, when the ‘too far’ away price begins returning to average levels, traders make a trade in the direction of the average. Bollinger bands are a handy tool for using this strategy.

The mean-reversion strategy works well in a regular market environment given that stocks generally move in a range, especially if there is no major news or market mover at play. The mean-reversion strategy has a higher frequency of use but low-profit expectations compared to the momentum trading strategy.

Try the mean reversion trading strategy with this code on PHI 1 now:


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

5. Scalping

Scalping means making as many small profits as possible off small price changes. This requires a trader to have a proper exit strategy with all the resources in hand to act quickly. Scalping, thus, focuses on ‘increasing the number of wins and compromising on the size of the wins.’

Scalping is profitable for traders who use it as their primary strategy and sticking to a strict exit strategy. Further, it is best not to carry the trade to the next day. For Indian stock traders who prefer short-term trading with relatively low risk, scalping can be a good strategy to make small profits that can be compounded into larger gains.

Want to try out Scalping? Run the same Mean Reversion strategy code on a minute scale.

Now that we have seen the most popularly used trading strategies by Indian stock traders, you may be keen on trying them. However, executing trades one by one by identifying opportunities manually is not what you would want to spend all your time on.

At the same time, the market is full of opportunities and many tools can help you focus on the more important things. Algorithmic trading allows you to trade automatically based on your pre-defined instructions. However, most software are standalone and require you to have complex coding knowledge, making trading a cumbersome process.

With PHI1, you can not only create and implement the above-mentioned trading strategies but also explore exotic strategies limitlessly. Further, after having created your strategies, you can conduct backtesting on them.

You can also perform bulk testing and scenario grading, all of this in the same place. PHI1 thus eliminates the need for multiple tools. PHI1 also gives you the freedom to choose your broker via its multi-broker integration feature.

When you use PHI1, the choice is always yours, and intraday trading feels like a breeze. Enjoy complete trading freedom with PHI1- your enabler for superior intraday trading.

Take a free trial today !


(Disclaimer: The purpose of sharing these strategies is purely educational. Please do not consider these for investment purpose)

Tagged : / / / / / / / / / / /