Select Page

APIBridge, Amibroker 

This tutorial shows how MACD AFL Strategy can be used on charts of Amibroker to Trade 

 
Strategy Premise 

The MACD indicator is one of the most popular indicators to determine trending prices.  The basic trading rules suggested by its founder Gerald Appel is to buy when it cuts above zero line or buy when its cuts above signal line. When the direction of trend is not clear, MACD stays close to the zero line. Hence we use smooth MACD(30,50,60) to determine trend and do no trade when it’s value is between -25 to +25 (close to zero). 

When the market is dull, the prices move slowly and seldom go beyond their standard deviation levels. So we use Bollinger Band(20,1) to filter out signals generated when prices are between them. 

Strategy Logic 

Buy: MACD>0 and MACD> Signal Line and MACD>25 and Signal candle is beyond Bollinger Band 

Sell:  When either MACD<0 or MACD< Signal Line 

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: Add Separate Entry Exit Automation AFL after the strategy AFL and hit Apply. 

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