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…

INIT:

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

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

———————————————————————————————————————-

STEP:

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

order_target_percent(target=1)

 

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

order_target_percent(target=0)

 

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

order_target_percent(target=1)

 

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

order_target_percent(target=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:
Aroon_Reversal

INIT:

self.aroon = AroonOsc(period=25)

self.downtrend=0

——————————————————————————————————–

STEP:

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

order_target_percent(target=1)

 

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

order_target_percent(target=0)

self.downtrend=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:

INIT:

class DonchianChannels(bt.Indicator):

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

params = dict(

period=20,

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

———————————————————————————————

STEP:

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

order_target_percent(target=1)

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

order_target_percent(target=0)

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

order_target_percent(target=-1)

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

order_target_percent(target=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:

INIT:

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

self.count1 = 0

 

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

STEP:

if risk_control_window(curr_date):

 

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

order_target_percent(target=1)

 

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

order_target_percent(target=0)

self.count1 = 0

 

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

order_target_percent(target=0)

self.count1 = 0

 

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

order_target_percent(target=0)

self.count1 = 0

 

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

order_target_percent(target=0)

self.count1 = 0

 

if (self.count1 > 10):

order_target_percent(target=0)

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

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)

Init:

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

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

—————————————————————————————

Step:

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)

Init:

class DonchianChannels(bt.Indicator):

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

    params = dict(

        period=20,

        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      

———————————————————————————————

Step:

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

   order_target_percent(target=1)

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

   order_target_percent(target=0)

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

   order_target_percent(target=-1)    

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

   order_target_percent(target=0)

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

Init:

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

self.count1 = 0

Step:

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

if risk_control_window(curr_date):

 

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

       order_target_percent(target=1)

 

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

    order_target_percent(target=0)

    self.count1 = 0

 

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

    order_target_percent(target=0)

    self.count1 = 0

 

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

    order_target_percent(target=0)

    self.count1 = 0

   

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

    order_target_percent(target=0)

    self.count1 = 0

  

if (self.count1 > 10):

   order_target_percent(target=0)

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