MT5 CCI with shift parameter

MT5 CCI with shift parameter

MT5 CCI with shift parameter MT5 indicator for multiple cycles. The indicator helps to identify potential trading opportunities in different time frames.

A simple extension to the CCI indicator using the iCCI function call. Now you have a shift parameter which will shift the plot by user defined bars.

This is somewhat an educational code as it reveals how to apply a shift feature to any indicator based on shifting the buffer index.

When you use [i + shift], you are effectively shifting the index forward in the buffer. This means you are accessing values in the buffer that are ahead (in terms of bars) of the current bar i. 

Visually speaking, it moves the plot from right to left.

No shift

Shift applied

The “Test_CustomCCI” script shows how the indicator can be utilized with iCustom. 

Place both files in the Indicators/Examples folder and compile CCI_withShift before compiling the other file. They will both show as usable indicators in the software.

How to install MT5 CCI with shift parameter Indicator in MetaTrader 5 Forex Trading Platform?

  • Extract the downloaded MT5 CCI with shift parameter Indicator.zip file.
  • In the MetaTrader 5 trading platform, go to the “File” menu and click “Open Data Folder”.
  • Navigate to the MQL5 folder and open the Indicators folder.
  • Paste the MT5 CCI with shift parameter Indicator.ex5 file(s) into the Indicators folder.
  • Restart the MetaTrader 5 platform.

Share Your Valuable Opinions