Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 5 Indicator | MT5 CCI with shift parameter

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 in the buffer.
Visually, it moves the plot from right to left. It is giving an after the fact representation of the signal...which may not be useful to most people, but can be useful in some trading systems.

MetaTrader Experts, Indicators, Scripts and Libraries

MetaTrader Experts, Indicators, Scripts and Libraries

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.

46924