iCCI graph does not match the values

 

Hello everybody, I noticed that my strategy based on CCI does enter the position in the right time. Here is the picture of example:

 

You can clearly see, that the numbers dont fit at all.

Do you know why is this happening? anybody had similar experience?

 

Thank you for any advice. 

 
You have to show your code calling the CCI!
 
   double CCI_Low_0 = iCCI(NULL, 0, Low_CCI_period, 0, 1);
   double CCI_Low_1 = iCCI(NULL, 0, Low_CCI_period, 0, 2);
   double CCI_Low_2 = iCCI(NULL, 0, Low_CCI_period, 0, 3);
   double CCI_High_0 = iCCI(NULL, 0, High_CCI_period, 0, 1);
   double CCI_High_1 = iCCI(NULL, 0, High_CCI_period, 0, 2);
   double CCI_High_2 = iCCI(NULL, 0, High_CCI_period, 0, 3);

   Alert("CCI -1: ", CCI_Low_0);
   Alert("CCI -2: ", CCI_Low_1);
   Alert("CCI -3: ", CCI_Low_2);
   Alert("CCI -1 High: ", CCI_High_0);
   Alert("CCI -2 High: ", CCI_High_1);
   Alert("CCI -3 High: ", CCI_High_2);
Here it is :-) 
 
To me it looks pretty much that in the charts you use CCI's default price PRICE_TYPICAL - but your code uses PRICE_CLOSE as it is more sensible to up and down bars?
 

wow, you're totally right, mate. Thanks a lot! (Now I feel really stupid, haha)

 
Lukas273:

wow, you're totally right, mate. Thanks a lot! (Now I feel really stupid, haha)

Well I have a very good crystal ball - I am working on an EA which gets its signals from there.
Reason: