ADX

Build An ADX Strategy

In the strategy builder, you can combine several indicators to create your conditions for a strategy. Further, you can also create multiple conditions within that strategy.

This is an example of how to do so using ADX and moving averages.

Disclaimer: The following is an example only, and should not in any way be construed as advice on how you should trade.

After you have logged in into your account, click on the Build a Strategy button on the top right-hand corner of the screen.

Then, click on Build new strategy.

In this example, we select the EUR/USD currency pair, and choose 30-minute candles. We name this strategy “EURUSD ADX and MA Crosses” because we like to give descriptive names for our strategies.

Once the strategy is created, we can now start creating our conditions. For this strategy, we will be using the ADX indicator, with two moving averages as additional indicators. We will also be creating two conditions, one for a Buy and another for a Sell.

Let’s start with the condition for a Buy.

Click on the New Condition button, and you will be presented with the “Algorithm Creator” screen.

Click on the Indicator button, and then select ADX.

You will then be at the next screen which asks you to input the number of candles (the Period) to be used to calculate the indicator’s values. We use 15 in this example, but you can use whatever period that you feel would be most appropriate for your strategy.

Upon clicking Next, you will enter a screen that provides you with a choice of either a Comparison or doing some Arithmetic. Choose Comparison and you will enter the next screen.

In this screen, you will find several operators to choose from, which would allow your initially selected indicator a comparison method.

For ADX, the conventional understanding is that when the ADX value is greater than 25, it indicates that the market is trending. If the value is greater than 50, then the pair is regarded as strongly trending. If the value is greater than 75, it is then extremely strongly trending. Needless to say, values greater than 75 are a rarity for any currency pair (in which one of it is not in a freefall).

So, for ADX, you can select to choose the “More than” operator, or the “Crosses from below to above”. For this example, choose the latter, and you will be brought to a new screen.

Here, you will be given a choice of either an indicator, or a number (value) to compare with the ADX indicator that you have chosen earlier. As previously mentioned, an ADX value of 25 or above indicates that the currency pair is trending.

So choose Number and in the next screen, input the value 25 and then click Confirm.

In the next screen, you will be presented with 3 choices. You can select to do some Arithmetic, to take an Action (which would either be a Buy or a Sell), or to add another condition added to the one you’ve just crafted as a Boolean operator, And or Or.

When using the ADX indicator, you will typically want to have another condition to go along with it, because while the ADX indicator can provide an indication of the strength of a trend, it doesn’t actually tell you the direction of that trend. If you were sitting in front of your computer, looking at the charts, then this wouldn’t really be much of a problem.

However, you are building an algo! Presumably because you have better things to do than to stare at a computer screen all day.

So, you would need to have some other indicator to let your algo know whether it’s time to buy or sell the currency pair.

In this example, we will use another crossover strategy, using moving averages.

So click on the And/Or button, and in the next screen, choose And.

Now you can go through the steps of creating another condition by choosing Indicator again.

At the next screen, choose Moving Average.

At the next screen, choose a period of 7 candles, with the type EMA. Just as a reminder, these values are examples only, and please feel free to choose another period, and to use the SMA option instead, if that is what you want.

In the next screen, do a Comparison again.

This time, choose the “More than” operator, and in the next screen, choose Indicator again.

Here, select Moving Average again, and in the next screen, choose a period of 30 candles, of type SMA.

At the next screen, you will see that you now have two conditions joined together by the “And” Boolean operator. Now select the Action button.

Select Buy followed by Confirm.

And there you have it, a condition consisting of two different sub-conditions which would trigger a Buy of the currency pair when both sub-conditions are met.

You can now move on to setting your money management.

Once you’re done with setting your money management, you can now move on to doing the backtest!