6

Volume Breakout Trading Strategy: Amibroker AFL

In this post, we are going to discuss a volume breakout trading strategy which scans for stocks which breaks out of a price range with high volumes. This is a very simple strategy with no fancy indicators, however the profitability is quite impressive. This works on majority of liquid and high beta stocks that we have tested. We have a coded an AFL for this strategy and back-tested it on Banknifty futures traded at NSE. The compounded annual return is around 23% for the last 11 years backtest period.

Please visit Trading Tuitions Academy to learn AFL coding and create your own Trading systems.

Volume Breakout Trading Strategy – AFL Overview

Parameter Value
Preferred Time-frame
Daily
Indicators Used EMA
Buy Condition
  • Volume is greater than or equal to 1.5 times of previous candle’s volume.
  • Close is greater than 20 period simple moving average.
  • Volume is greater than 50 period simple moving average of volume.
Short Condition
  • Volume is greater than or equal to 1.5 times of previous candle’s volume.
  • Close is less than 20 period simple moving average.
  • Volume is greater than 50 period simple moving average of volume.
Sell Condition
  • Same as Short
  • Stop Loss Hit
  • Target met
Cover Condition
  • Same as Buy
  • Stop Loss Hit
  • Target met
Stop Loss 3%
Targets 30%
Position Size 120 Quantities
Initial Equity 200000
Brokerage 100 per order
Margin 10%

Volume Breakout Trading Strategy – AFL Code

Click here to download the AFL code for this system.

AFL Screenshot

Volume Breakout Trading Strategy

Volume Breakout Trading Strategy – Backtest Report

Parameter Value
BankNifty
Initial Capital 200000
Final Capital 1973764.04
Scrip Name NSE Banknifty
Backtest Period 25-Aug-2005 to 17-June-2016
Timeframe Daily
Net Profit % 886.88%
Annual Return % 23.09%
Number of Trades 78
Winning Trade % 37.18%
Average holding Period 19.28 periods
Max consecutive losses 10
Max system % drawdown -34.03%
Max Trade % drawdown -75.56%

Clearly, drawdown is on a higher side. It could be overcome with proper Risk Management strategies. Download the detailed backtest report here.

Equity Curve

Volume Breakout Trading Strategy Equity Curve

Profit Table

This volume breakout trading strategy has been profitable on all the years except 2015 and 2012.

Volume Breakout Trading Strategy Profit Table.PNG

Additional Amibroker settings for backtesting

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

Banknifty Symbol Information

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

6 Comments

  1. _N(Title = StrFormat(“{{NAME}} – {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}”, O, H, L, C ));

    I am getting Error 61. The number of format specifier(s) (%) does not match the number of arguments passed.

    Please help

  2. GETTING ERROR 61 ON THIS LINE SIR
    _N(Title = StrFormat(“{{NAME}} – {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}”, O, H, L, C ));

    • Hi Vaibhave,

      This happens on some versions of Amibroker. Please comment out this line for the time being. It wouldn’t affect the strategy at all.

Leave a Reply

Your email address will not be published.