every tech indicator function (such as iCCI) has first parm as symbol and second parm as time frame. So you can get indicator
value for any symbol and any timeframe and any bar as long as there is data for
it.
double cci[6]; ArraySetAsSeries(cci,true); for(int i=0;i<ArraySize(cci);i++) cci[i]=iCCI(NULL,PERIOD_M15,13,PRICE_CLOSE,i); double myCCI=iMAOnArray(cci,0,5,0,MODE_EMA,0);
Thank You Irusoh! It seems will working.
In the first row
double cci[6];what does indicate the number at the array? If i change it, I get diffrent result.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
My EA (for backtesting) is attached to the 1 munute chart. I would like to work with a variable called "MyCCI".
MyCCI = ExponencialMovingAverage(5) of CCI(13) of the 15 Minutes chart.
Something like this: EMA(CCI(13),5) on M15.
So, the values of my variable are equal in the minutes of the same quarter of hour.
How can i define it? Please help.
Thank You.