Download MetaTrader 5

iCCI graph does not match the values

To add comments, please log in or register
Lukáš Janča
44
Lukáš Janča  

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. 

Carl Schreiber
6691
Carl Schreiber  
You have to show your code calling the CCI!
Lukáš Janča
44
Lukáš Janča  
   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 :-) 
Carl Schreiber
6691
Carl Schreiber  
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?
Lukáš Janča
44
Lukáš Janča  

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

Carl Schreiber
6691
Carl Schreiber  
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.
To add comments, please log in or register