How to Set Up Amibroker

Consumer Products

If you are new to Amibroker and finding it difficult to use it, here is a list of topics that can help you set up your Amibroker:

  • Initial Settings
  • Plot charts on Amibroker
  • Create your own watchlist
  • How to add your strategy to amibroker
  • Back test your strategy
  • Learn how to run and use Bar replay
  • Automate trades using Amibroker

1. Initial Settings

Once you install Amibroker , you need to feed it with data to be able to plot charts and strategy.

In India we have lot of data vendors who provide data for amibroker and also give you remote help to set it up step by step.

Few Data vendors are:

Global data feed, Truedata, Vbiz, Amifeed etc.

They all provide you one week of trial also, just subscribe to any data vendor and tell them to set up Indian stocks data for you and they will take remote access and set it up for you.

You can get data for all segments : Equity, Futures, Options, Commodity, Currency.

Once data is set we need to add symbols coloumn in our amibroker panel to switch between multiple scripts.

To add symbols to amibroker panel, just cick on Windows >>>Symbol.

Covid Cases Nifty

Once you click on symbols, The symbol panel will be visible on left side, click on it and all the stocks will be visible, click on any stock and its chart would be visible. It would look like this on the panel.

Covid Cases Nifty

Choose any stock or use arrow keys to shuffle move around and the respective stock charts would be visible.

How to set up charts:

Once your data feed is ready and live, next thing you want to do is set up charts as per your criteria.

Click on windows>>>charts.

Covid Cases Nifty

Once you click on charts, it will appear in left panel with lots of indicators and study.

Covid Cases Nifty

Once chart panel is visible double click on price and chart with candlestick would be visible.

This is your basic chart setup. You can now add multiple indicators and set any variable.

Here is a basic example:

If you want to set up moving average pair

Click on averages>>>EMA-Exponential moving Average

Drag and drop it on charts.

You get this pop-up box where you can set parameters.

Similarly, you can have multiple indicators and studies on your charts.

Click on Signup button and you will be re-directed to this page:

Watchlist is your preferred set of stocks on which you wish to study and apply your set of indicators.

Everyone has their own set of stocks in which they are comfortable in trading/investing.

In Amibroker you can create your own watchlist in multiple ways.

To create your own watchlist:

Click on symbol>>>watchlist

Once you click on watchlist, you can right click on any list and make your own new watchlist.

Covid Cases Nifty

You can click on New watchlist and make a watchlist and name it anything.

Eg. I create watchlist named Purpletrades.

Covid Cases Nifty

Select your watchlist and right-click to add your fav stock.

You can add your fav stocks in two ways:

1. By typing their name Individually: Type the Exchange symbol name of the stocks each separated by a comma and insert them, so a watchlist of your desired stocks will be ready.

Click on type in the symbol and put names of stocks each separated by a comma.

Covid Cases Nifty

I am adding SBIN, ACC, INFY, WIPRO, TCS.

Covid Cases Nifty

Click on OK and the stocks would be visible in your watchlist as shown:

Covid Cases Nifty

Make sure you type in all the symbols correctly, else the data for the stocks will not be visible.

2. The second way to add symbols is to import a list, this is used if you have many stocks to be added up in your watchlist.

Suppose you want to make a list of Nifty 200 stocks, here is a simple way of doing it.

First, we have to export the existing watch list that we have made using type in symbol to get the file format.

We export symbols by right click on our watchlist name and click on export.

Covid Cases Nifty

I export and save it on my desktop with the name Purpletrades.

It will be saved in .tls format as shown.

Covid Cases Nifty

You can open this file using notepad.

Now copy all the stock name you wish to add in your watchlist. For my Nifty 200 stocks,

I would visit NSE India website to get Nifty 200 stock list.

Covid Cases Nifty

Once we download the CSV just copy all the stock symbols:

Covid Cases Nifty

Now open the .tls file saved on desktop and replace the old stocks with this new stock list:

Covid Cases Nifty

Save the notepad, so all scripts will be saved in the .tls file.

Now go back to amibroker and right-click on your watchlist and click on import.

And select the file saved on the desktop with Nifty 200 stock watchlist.

You can now see all the stock in your watchlist.

Remember the names should be exactly as exchange symbol names for the stocks else the data won’t be fetched.

Covid Cases Nifty

Your watchlist is now ready.

How to add your AFL to amibroker:

Professional traders have their own strategy coded. The language in which amibroker based strategy is coded is called AFL.

If you already have an AFL, you can use it on your watchlist charts.

To put your AFL on amibroker you have to right-click on the existing chart and click on edit formula.

Covid Cases Nifty

Once you click on it, a box in which code has to be applied will pop up.

Click on New, then click on next icon of Open,

Covid Cases Nifty

Select your desired AFL and click on apply.

Covid Cases Nifty

Once you apply your afl it will be visible on your charts, close the previous loaded charts and you are all set to use your AFL.

How to Backtest your strategy?

Backtesting is a way to check the accuracy of the strategy by using historical data to produce results and analyze their strategy and make any changes if needed to optimize it for better yield.

A user runs his/her strategy on historical data to simulate trades and then gets a report to check how the strategy has performed in the past and its yield.

We can backtest any strategy on Amibroker by using following simple steps:

Go to Analysis and click on old automatic analysis or new automatic analysis.

Covid Cases Nifty

Pick the AFL you want to backtest and then go to settings to change the time frame of your strategy.

Covid Cases Nifty

Also you can choose what type of trades to backtest : Long, short or both long and short.

Covid Cases Nifty

Once you have made those settings click OK and the desired settings will be applied.

Also if you have any parameters in your AFL you can change those parameters by clicking on the Parameters section.

Once your Desired parameters and settings are ready, you can choose to backtest for any given days or time frame by clicking on last n days and giving value for N

Eg: If you want to back test for last 30 days, give n value as 30, and click on backtest.

Covid Cases Nifty

Amibroker will scan the data for last 30 days and capture all entry and exit points and will give you backtested results in a flash.

You can also see a detailed report of your strategy by clicking on report, it will help you optimize your strategy and change variable parameters accordingly.

How to run and use bar replay:

Bar replay is a special feature in Amibroker that helps you stimulate the historical data with visual charts. That means you can replay the live charts and implement your algorithms to check how your strategy has behaved in the past. It is used to check how AFL generates Buy/Sell signal and how your strategy has performed in recent days.

To set up your bar replay, click on

Covid Cases Nifty

Set up your dates, time frame and click on play, you can now see historical data being visible as live charts and your AFL is running on it.

Covid Cases Nifty

How to Automate your trades using Amibroker

Any AFL that you wish to automate can be done by adding up using simple code at the end.

To set up your bar replay, click on

Click here to get that file and automate your AFL

0 Comments

Leave a Comment