Amibroker is by far one of the best technical analysis software for all traders across globe. Using Amibroker one can not only draw different types of charts, but also scan and back test any strategy they create using AFL (Amibroker Formula Language). Using AFL one can create their own trading system, scan, custom indicator etc. While coding AFL, we need to know all available AFL functions.
This platform have inbuilt indicators, basic charts, bands etc, including respective AFL codes, which can help new coder to code from these basic AFL codes.
To kick start with Amibroker below are the basic steps that we need to learn and explore.
- Download and install Amibroker
- Create and configure database with data
- Create sample price chart
- Plot indicators in the chart
- Create your own AFL codes – Part-1
- Create your own AFL codes – Part-2
- Forward test the Strategy
- Back-test your strategy
- Create your own Trading System
1. Download and install Amibroker
If you are the first time user of Amibroker, then please go ahead and install the free version from https://www.amibroker.com/, download link. Based on your system configuration, you can either download 32 bit or 64 bit. Now a days almost all computers are 64 bit, so please check your system configuration before installation. You can get that from my computers->properties. Currently Ver 6.0 is available under free version, however ver 6.3.0 is available under paid version. After download, you just need to click the exe file and install it. By default Amibroker will get installed under”C:\Program Files\AmiBroker\” directory.
2. Create and configure database with data
After installing Amibroker, we need to create a database. However in the free version we can’t save any database. To create a database, we need to first go to File-> New -> Database. You can create the database with your any name of your choice, i.e. C:\Program Files\AmiBroker\Databases\MyNewData, and then click on the create button to create the DB. While creating the DB, we need to set the configuration as well, i.e.number of bars, time interval. Once the database gets created, we need to add data into the database. Go to File->Import Wizard to import data, then configure the data format as per data and upload it to the DB.
Please watch hindi version video beside.
3. Create sample price chart
To create a price chart, Open Amibroker and then in the left panel bottom look for charts tab. Click on the charts tab, then from the panel above chooseBasic Charts. Under basic charts there is Price option.
Plot a blank chart from top left file ->New -> Blank chart. Once the blank chart is plotted in the main pane, drag price function into the blank chart.
For further details, please watch the hindi version video beside.
4. Plot indicators in the chart
Once the price chart is plotted as per above steps, we can then plot any indicators on the price chart.
From the left pane, choose required indicator and drag them to the price chart.
To plot any indicator at the bottom of the chart i.e. MACD, RSI etc, please right click on the indicator and then click on insert.
To know the same in hindi please watch the video beside.
5. Create your own AFL codes - Part-1
How to create a new AFL using Analysis window, please open Amibroker, plot a blank chart. Then go to Analysis-> Formula Editor to open the coding window.
You can then write a fresh code in that window and save the program under Amibroker->Formulas->Custom folder.
To display a simple price chart candlestick with script name, interval, date and O, L, H, C, you can use the below code.
6. Create your own AFL codes - Part-2
This tutorial will show you how to create a trading system, where you can place Buy and Sell signal in your strategy.
As mentioned in the last tutorial, you can plan your EMA crossover strategy and plot Buy and Sell signal as per crossover.
Please watch the Hindi video beside to know how to create this simple strategy using AFL.
The AFL code is mentioned below:
8. Back test your Strategy
Backtesting feature of Amibroket is one of the best features this tool has. Once you create your strategy you can back test it based on the data you have. In seconds this tool can test your strategy for more than 10 years of data. To backtest, first we need to open the Strategy from AFL Formula Editor, then click on Send to Analysis Window to open the Analysis window in Amibroker. In the analysis window select the Settings to setup the required details for backtest. Select Script and date range for the backtest then run backtest option.