Select Page

The AFL code is pretty straightforward. Care is taken to define Buy, Sell, Short and Cover properly. The signal cycles are checked in default code to ensure proper signal occurrence.

Strategy Premise 

This strategy uses only price action and no indicators. The range for the last n periods is calculated by taking the highest high and lowest low value of the last n periods. This range is also called Donchian Channels. Such a trading strategy was suggested by trader Richard Donchian. Richard suggested using the strategy on the daily timeframe for a range of the last 20 days. In our testing on the 15-minute time frame, we use the 50-period window to avoid false signals. These are also called volatility bands because the expanding/contracting channels indicate the market volatility.

Strategy Logic 

Buy: When price cross above the 50 period range

Sell:  When prices cross below the 50 period range

Please note that this is a signal-to-signal, or a stop-and-reverse strategy.

When Strategy gives Buy, it will send LE in Call and LX in Put. When Strategy gives Sell, it will send LE in Put and LX in Call.

Amibroker Settings 

Step 1: Make sure you have completed Jump Start setup 

Step 2: Download AFL from here. In Amibroker, Go to Formula editor and paste the AFL here.   

Step 3: Right Click on the chart and go Parameters to adjust the inputs of the strategy.