Skip to main content

Master Candle is a proven price action pattern that accurately identifies the possible breakouts in the chart. It’s used by professional traders to speculate market movements and enter long or short trades. We have developed a master candle exploration AFL which can exponentially reduce your analysis time by signaling the breakouts. This exploration shows the master candle levels of the stocks in your watchlist, along with the Open, High, Low, and Close values.

A Quick Recap about Master Candle

In case you are new to master candle, it is a combination of 4 candles, a long mother candle, and 3-4 baby candles which are engulfed by the mother candle.

this article to understand in detail about master candle, its interpretation, and examples.

Master Candle Exploration AFL – Overview

The master candle exploration does the following things:

  1. For a given symbol, it identifies all the master candles based on the below conditions:

Master Candle High > Highs of subsequent 4 candles

Master Candle Low < Lows of subsequent 4 candles

  1. Once the master candles are identified, it checks the most recent candle to see if it’s high or low is above/below the master candle high or low respectively. This recent candle should be first, second, or third candle after the last child candle of master candle setup.

Master Candle Exploration AFL Code – Download Link

You may download the exploration code from the below link. The file is in zip format, you’ll have to unzip it before use.

Master Candle AFL Exploration Code

The code has been tested in Amibroker version 6 and above. The trial version of Amibroker can be downloaded from this link.

How to use this Exploration Code?

Step 1: Open Amibroker, Click on File –>New –>Formula and copy-paste the exploration code you downloaded.

Step 2: Click on File –>New –>Analysis. Set timeframe appropriately

Step 3: In the “Apply to” drop-down select ‘All symbols’ or filter based on the list of stocks you want to watch. In the range drop-down, select ‘1 recent day(s)’ to run exploration only for the recent candle. And select the AFL code in the “Formula” box.

Understanding the Exploration Code

Let’s understand the exploration code in detail.

First of all, this is purely an exploration code, so you won’t be able to use it in Amibroker charts.

The below line identifies all master candles from your database:


All the AFL’s posted in this section are for learning purpose. Trading Tuitions does not necessarily own these AFL’s and we don’t have any intellectual property rights on them. We might copy useful AFL’s from public forums and post it in this section in a presentable format. The intent is not to copy anybody’s work but to share knowledge. If you find any misleading or non-reproducible content then please inform us at

Leave a Reply