Indicator Builder Tutorial: Bull Candle Pair

This tutorial explains how to create a basic custom indicator. For this example, we’ll create an indicator that looks for a pair of adjacent white candles, and produces a sell signal when detected.

First select the Indicators tab from the menu at the top right of the page.

Now click the Indicator Builder tab to open the builder tool.

Card image cap
Indicator builder

Open the builder tab from the Indicators menu

From the builder, choose Greater Than from the select box.  Now in the first sub row, select close price, and in the second row select open price. This is a conditional expression and will be true whenever, the close price is greater than the open price. This means any white (bullish) candle.

Card image cap
Indicator builder

Add a Greater Than operator

To confirm this, click the spy glass icon on the Greater Than expression. This will display a chart preview. To change the market, click on the expander icon on the right of the chart and select a market and a timeframe of your choice.

Now click on the Greater Than operator. The selected row should be highlighted with a red border. From the top toolbar, click on the Plus icon (+). This will add a row above. Alternatively you can select Add above from the selector.

Card image cap
Indicator builder

Insert a row above and set to the And operator

Change the default operator to the And operator by selecting it from the dropdown. This requires two operands so this should create a new row beneath. And will be true when both conditions are true.

Click on the new row and select Array Shift from the dropdown. Open the parameters of the Array Shift by clicking the cogs icon.

Card image cap
Indicator builder

Insert an Array shift set to 1 bar

Select the parameters tab and enter 1 (default) in the box. With this, array shift will shift the data series by one bar.

Click on the Greater Than operator to select it, and then click copy from the top toolbar. Click the first row under the Array Shift operator to select that. Now click paste from the top toolbar.

Card image cap
Indicator builder

Copy the first operator and paste into the bottom row

We can save the work we’ve done, to prevent losing any changes. To do this, click the disk icon in the toolbar. This will open a text box where you can enter a name of your choice.

Card image cap
Indicator builder

Save the custom indicator

Once saved, we can test the indicator on a candle chart. To do this, we open a new chart window and select our new indicator from the Indicators drop down. Type the name of your indicator into the search box, then select it from the list.

Card image cap
Indicator builder

Testing the custom indicator on a candle chart

The indicator should now identify any white candle pairs. Looking at the output from the above chart, this confirms that the indicator is indeed locating this patterns correctly on the chart.

Card image cap
Indicator builder

Confirm the indicator’s output

Finally click the top row and then click the Plus sign again to add a new row above. Select the Sell operator from the drop down.

The custom indicator is now ready to test. To do this, click the spy glass icon in the top row.

Card image cap
Indicator builder

Preview the result

The preview will show the indicator’s output on the selected market and timeframe. The statistics below the chart will show the indicator’s performance as measured by the percentage of true positives and verses the number of false positives and false negatives.

A high true positive rate (above 50%) means that the indicator successfully predicts the market direction higher than chance alone. The higher the rate, the more accurate it is.

To save the last few changes, you can again click the disk icon and then save. The new indicator is now complete.

Use this Indicator

Risk Disclosure: Information given on this website is for general purposes only and should not be construed as investment advice. Certain instruments shown here are complex and may come with a high risk of losing money rapidly due to leverage. You should consider whether you understand how these instruments work and whether you can afford to take the high risk of losing your money. Market data displayed is indicative and is not a solicitation to buy or sell.