An Accurate Intraday Trading System using DEMA & RSI

Intraday trading is a mess if not done with a proper strategy. Most of the successful trading systems do not work in intraday timeframe due to numerous whipsaws and false signals. It’s imperative to minimize these whipsaws to build an accurate intraday trading system. We have been testing several day trading systems since last few months and would like to introduce one of the most successful and profitable systems. This system follows the principles of trend following and generates signals based on DEMA (Double exponential moving average). It’s a multi-timeframe strategy and to double confirm the signals it looks at RSI values from the daily timeframe.

Let’s look at the system details, backtesting results, and AFL code. A complete video explanation of this system is uploaded at our ‘Build a Professional Trading System Course

You may want to check out some of the other profitable intraday trading systems we have implemented in the past at our ‘AFL of the Week’ section.

DEMA RSI Intraday Trading System – AFL Overview

Parameter Value
Preferred Time-frame
5 minutes
Indicators Used DEMA, RSI
Buy Condition
  • 2 periods DEMA crosses over 10 periods DEMA
  • RSI value in daily timeframe is less than 30
  • Trade time is between 9:30 to 15:15
Short Condition
  • 2 periods DEMA crosses under 10 periods DEMA
  • RSI value in daily timeframe is greater than 50
  • Trade time is between 9:30 to 15:15
Sell Condition Same as Short or Time >= 15:15
Cover Condition Same as Buy or Time >= 15:15
Stop Loss 0.5%
Targets No defined target
Position Size 150 (fixed)
Initial Equity 200000
Brokerage 100 per order
Margin 10%

DEMA RSI Intraday Trading System – AFL Code

Download the AFL code from the below link. You can simply import this AFL code in Amibroker and start using it.

DEMA RSI Trading System

AFL Screenshot

Below is the screenshot of the AFL chart from Amibroker

Accurate Intraday Trading System

Also Read: Manish Gupta: A 19 year old Algorithmic Trading Millionaire

DEMA RSI Intraday Trading System- Backtest Report

This is a very accurate intraday trading system and performs well in all market conditions. Annual CAGR of 21.49% is better than most of the other systems out there. Also, drawdown is minimum which makes this system very reliable. Check the detailed results in the below table:

Parameter Value
Nifty
Initial Capital 200000
Final Capital 1188711.75
Scrip Name NSE Nifty
Backtest Period 01-Jan-2010 to 28-Feb-2019
Timeframe 5 Minutes
Net Profit % 494.36%
Annual Return % 21.49%
Number of Trades 1438
Winning Trade % 49.86%
Average holding Period 57.57 periods
Max consecutive losses 7
Max system % drawdown -17.33%
Max Trade % drawdown -21.88%

Download the detailed backtest report here.

In this system we have assumed a fixed position size of 150. Had it been it was allowed to invest all your profits back into the system, an investment of  200000 would have turned into whooping 25 Billion~ with CAGR of 181%.

Equity Curve

The equity curve is near linear with no unexpected and large drawdowns

RSI DEMA Intraday Equity Curve

Profit Table

This system has been consistently profitable every single year since 2010.

RSI DEMA Intraday Profit Table

If you wanna learn and build your own Algorithmic trading systems like this, take a look at our structured courses at Trading Tuitions Academy

Additional Amibroker settings for backtesting

Goto Symbol–>Information, and specify the lot size and margin requirement. The below screenshot shows lot size of 75 and margin requirement of 10% for NSE Nifty:

Symbol Info_Nifty

Disclaimer:

All the AFL’s posted in this section are for learning purpose. Trading Tuitions does not necessarily own these AFL’s and we don’t have any intellectual property rights on them. We might copy useful AFL’s from public forums and post it in this section in a presentable format. The intent is not to copy anybody’s work but to share knowledge. If you find any misleading or non-reproducible content then please inform us at support@tradingtuitions.com

Related Posts

13 Comments

  1. HI, i am a regular visitors for your site and also subscribed for your amibroker course. Could you please write an article, how you are doing algorithm trading ? Suppose you have a strategy, how are you going to deploy automate it ? are you using any bridge application to connect to your broker ? if so, please provide us the details.

    thanks f or your help.
    Regards,

    • Hi Naga,

      Sure, we will publish an article for the same. But just to summarize, we are using Symphony presto for automating the strategies. Read more about it here

  2. The system performance betwee 2016 and 2018 is stalled. I mean not that steep compared to previous years. I have backtested more strategues all show the same phenomenon, stalled performance between 2016 and 2018

    • Hi Qtrader,

      That’s because of heavy volatility during this period. But the important thing is that the returns remained positive. We are hoping for better performance in 2019

  3. Hi, Does this strategy work better with certain stocks (with high/low volatility for eg., or a particular sector) or is neutral? Would you recommend this to be used with index options?

    • Hi Saurabh,

      We haven’t tested it for options, but you can definitely use this on high beta stocks

  4. Dear admin
    thx for sharing the afl
    backtest results as well as charts show only shorts and cover
    does not display buy /sell both in charts as well as analysis
    can you check just once …i am not sure whether i am doing something wrong
    kindly do check if possible

  5. Dear Admin
    tried back testing it back tests only shorts
    i m using amibroker 6.07 version
    do i need to change any settings
    thx in advance

    • Hi Sadayappan,

      In the backtested settings, please mentions “Long and Short both”

  6. Stratergy how to trade in bullion’s a d crude oil.

Leave a Reply

Your email address will not be published. Required fields are marked *