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.
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.
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.
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.
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.
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.
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.
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.
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.
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.