This is the Amibroker Formula Language section of The Ultimate Free Amibroker Tutorial Guide. Below you will find many useful videos explaining different AFL concepts, learn what is Amibroker Formula Language all about and how to use the Amibroker Formula Language.

There are a huge number of Amibroker AFL collection tutorials available online, however, sadly many are very low quality, difficult to understand or long and rambling. In this Ultimare Free Amibroker Tutorial Guide, I have assembled the best free Amibroker tutorial videos from many different YouTube Channels so that you don’t have to go searching – they are all here for you. 

The Amibroker AFL tutorials are divided into groups based on what aspect of using Amibroker they cover. Cick the links blow to navigate to each section of the guide and also to access the videos in each section. I have explained what you will learn in each video and how long the video is so that you know exactly what you are getting. 

Amibroker Formula Language Tutorial | Amibroker AFL Programming – Basic Course

 

This video covers some of the basics of Amibroker AFL Programming. There is a lot of introduction and context at the beginning of the video which can be skipped, so I would suggest you skip to the 45 minute mark where the author starts talking about the Amibroker Formula Language (AFL Amibroker) and explains how to create and plot your own indicators. In this video you will learn some useful tips about how to create indicators and strategies in AFL, how the Amibroker Formula Language syntax works, how to plot and control the format and layout of your charts in Amibroker. Overall I think if you skip the first 45 minutes of this video it is quite informative if you are new to Amibroker coding and AFL.

 

Viewing Time: 109.46 minutes
Channel Name: marketcalls

Amibroker Formula Language Tutorial | Amibroker Coding

This video covers some of the basics of the Amibroker formula language. The author demonstrates the coding of a basic trading system in Amibroker and how to plot the indicators relating to this strategy. While the layout of the code that the author uses is not ideal from my perspective, there are some useful points especially relating to the plotting of the signals and indicators on the Amibroker chart. The video also talks about setting the backtest settings and how to run a backtest in Amibroker and interpret some of the results using the report.

Viewing Time: 22.35 minutes
Channel Name: izka51

Amibroker Formula Language Tutorial | Amibroker Quant Trading Course 3.2 Programming for non-programmers 3.2 Coding Your Own Indicators

This Amibroker tutorial video explains how to code and plot your own indicators using some basic examples. The AFL functions discussed are moving average function (MA), highest high function (HHV) and lowest low function (LLV). This is a short Amibroker Tutorial video which is helpful if you are new to writing indicators in AFL code and plotting indicators on your charts in Amibroker.

Viewing Time: 06.10 minutes
Channel Name: AlgoJi

Amibroker Formula Language Tutorial | Amibroker Quant Trading Course 3.7 Optimizing Your Strategy

In this tutorial video the author explains how to use the Optimize function in Amibroker to test different indicator input values quickly and find the most profitable values for your trading system. While optimizing your parameter values is an important capability, it is frequently used incorrectly. In this Amibroker video you will learn how to use the Optimize Function but it does not adequately explain the pitfalls of optimization and how to choose the best values for your parameters. Traders should not blindly select the best parameter value from the backtest – it is far more important to select a parameter value that is stable rather than simply the one that is the best.

Viewing Time: 02.32 minutes
Channel Name: AlgoJi

Amibroker Formula Language Tutorial | How to Code the Three Billion Dollar Trading System

Dave from ASXmarketwatch has quite a few useful Amibroker Tutorial videos. Several of them are a little outdated now since there have been several new versions of Amibroker since the site was updated, however many are still very useful. This video demonstrates how to code a trading system based on the opening range breakout strategy which originated from Tony Crabel.

Some of the Amibroker functions covered include:

  • SetTradeDelays() Function
  • Average True Range Function (ATR)
  • BuyPrice
  • Max
  • Ref
  • Exrem

There is a good discussion in the video about slippage and building it into your backtest. Note however that the look of the Amibroker backtester has changed quite a lot in recent versions, however the AFL code in this video is still valid.

Worth watching!

Viewing Time: 12.25 minutes
Channel Name: DaveASXWatch

Amibroker Formula Language Tutorial | Learn Amibroker AFL Coding – Webinar – Marketcalls

This video tutorial covers some basics of Amibroker AFL coding. It is very long but I found some useful points in the video. I suggest skipping to the 30 minute mark. The video covers some useful functions as well as how to find help in the Amibroker Function Reference material.

Functions covered:

  • Average True Range (ATR)
  • Relative Strength Index (RSI)
  • Plot Function

To be honest I find these really long Amibroker tutorial videos quite difficult to watch, which is why in my own tutorial videos and my Amibroker Launchpad program I teach in short 3-10 minute videos that are easy to absorb and also targeted on a single topic or function so that you can quickly find what you want.

If you have some time and want a longer tutorial which covers a broad range of AFL Formulas and topics then this one might be worth checking out.

Viewing Time: 167.33 minutes
Channel Name: marketcalls

Amibroker Formula Language Tutorial | Let’s Learn Amibroker – How to Code Van Tharp Position Sizing (Fixed Fractional)

This is another useful Amibroker Tutorial Video which covers how to calculate your position size for your trading system backtest. In his great book “Trade Your Way To Financial Freedom”, Van Tharp talks about risk based position sizing. For example if sizing your trades so that if you are wrong and your stop loss gets hit then you only lose X% of your trading system.

Dave from ASX market watch does a good job of showing how to code this risk based position sizing model into your trading systems.

Amibroker Functions covered:

  • Setpositionsize()

Viewing Time: 09.46 minutes
Channel Name: DaveASXWatch

Amibroker Formula Language Tutorial | Let’s Learn Amibroker – Setting Your Position Sizing Using AFL

This is another useful Amibroker Tutorial Video from Dave at ASX Market Watch. In this video he explains how to use the Amibroker Setpositionsize() function to specify the position size you want in your trading system.

The example in the video is the fixed percent of equity position sizing.

Amibroker Functions covered:

  • SetPositionSize()
  • SetOption(“maxopenpositions”,20)
  • Moving Average (MA(C,20)

Note again that this video is recorded on quite an old version of Amibroker, so some of the backtester features and layout have changed a lot since the video, however the AFL code examples provided are still useful.

Quick video – worth watching!

Viewing Time: 08.18
Channel Name: DaveASXWatch

Amibroker Formula Language Tutorial | Let’s Learn Amibroker – Using If Then Else (IIF)

This Amibroker Tutorial Video explains the IIF Function. This is the IF, THEN, ELSE function. This is an array function, not a looping function and is very simple to use if you want to perform different calculations depending on whether a logical test is true or false. In the video Dave shows you how to change the colour of a moving average depending on whether the price is above or below the moving average. This is charting application of the IIF() Function, but it can also be used in calculations for your trading rules.

Amibroker Functions covered:

  • IIF() Function

Note again that this video is recorded on quite an old version of Amibroker, so some of the backtester features and layout have changed a lot since the video, however the AFL code examples provided are still useful.

Quick video – worth watching!

Viewing Time: 04.57 minutes
Channel Name: DaveASXWatch

Amibroker Formula Language Tutorial | Let’s Learn Amibroker – Using If Then Else (IIF)

This Amibroker Tutorial video is not really named properly. What you will learn in this video is how to code some things a little more efficiently. In particular the video explains how to test for equality using the == operator, it also shows how to check that a logical test is true for a certain period of time.

The Amibroker AFL functions covered include:

  • == operator
  • LLV() Function
  • HHV() Function
  • Sum() Function
  • Barssince() Function
  • Cross() Function 

The main lesson from this video is that if you are struggling with lots of complexity in your code then it is important to step back and simplify your code because you very rarely need complex AFL coding to achieve a good outcome with your trading system.

Viewing Time: 08.54 minutes

Channel Name: DaveASXWatch