Finding the best Forex indicator : CCI

financialcode
3 min readMay 13, 2021

In this series, we will be looking at the different indicators available and running a set of fix variables and benchmark the indicators across a series of currency pairs.

The objectives is to understand and hopefully find the best indicators or none at all.

Consideration

We will be using some fixed variables so that we have a constants test cases.

  • Lots size will be 0.1 across the board
  • We will be testing against the following currency pairs, AUD/USD, AUD/JPY, USD/JPY, EUR/USD and XAU/USD.
  • We will be testing against Timeframe of M15, M30, 1H
  • Backtest data will be for the year of 2020.

Now that we have a clear understanding of the fixed variables, we are going to be looking at RSI as an indicator today.

What is CCI

The Commodity Channel Index (CCI) measures the current price level relative to an average price level over a given period of time. CCI is relatively high when prices are far above their average. CCI is relatively low when prices are far below their average. Using this method, CCI can be used to identify overbought and oversold levels.

How are we going to trade today

When the CCI current value is below -100 and the CCI previous value is above -100, we will be selling.

When the CCI current value is above 100 and the CCI previous value is below 100, we will be buying.

Using the previous value of the CCI, we will be certain that the CCI have crossed the 100 / -100 point and therefore confirming the trend signal.

Using MT5, we are using the following conditions to make the trades.

The following are the parameters that will be used

input int cci =12;
input double factor = 1;
input int rewardRatio = 2;

Next is the condition for trading.

if (cci_trend[ArraySize(cci_trend)-2] > -100 && cci_trend[ArraySize(cci_trend)-1] < -100){
tp = NormalizeDouble(last_tick.ask — factor * rewardRatio , _Digits);
sl = NormalizeDouble(last_tick.ask + (factor) , _Digits);
trade.Sell(0.1,_Symbol, last_tick.ask, sl,tp,””);
}

if (cci_trend[ArraySize(cci_trend)-2] < 100 && cci_trend[ArraySize(cci_trend)-1] > 100){
tp = NormalizeDouble(last_tick.bid + factor * rewardRatio , _Digits);
sl = NormalizeDouble(last_tick.bid — (factor ) , _Digits);
trade.Buy(0.1,_Symbol, last_tick.bid, sl,tp,””);
}
lastBar = iTime(Symbol(),PERIOD_CURRENT,0);
}

Results

Over Multiple Pairs (AUD/USD, AUD/JPY, USD/JPY, EUR/USD and XAU/USD)

M15

M15

M30

M30

1H

1H

Summary

With the CCI, we can conclude that as the timeframe increases lesser trade is being made.

Across the results, M30 timeframe does give us the most consistent results across the different currency pairs.

M15 timeframe give the best returns but the risk factors seems too high.

EUR/USD seems to perform particularly well with CCI, this we are attributing to the condition of the market. On the surface seems like M15, netted us the most profit at 70k, with 91 trades being made, that’s an almost 8 trade per month.

But if we look at the 1H timeframe, with lesser trades of 26, we have a higher profit factor. We believe that with more trades you expose yourself to more risk.

For more of the other indicator review, visit the links below:

https://financialcode.medium.com/finding-the-best-forex-indicator-rsi-indicator-c8b1c30856fa

--

--