Download MetaTrader 5
To add comments, please log in or register
Find out the latest MQL5.community news!
Lukáš Janča
33
Lukáš Janča 2015.12.01 07:57 

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
5927
Carl Schreiber 2015.12.01 08:01  
You have to show your code calling the CCI!
Lukáš Janča
33
Lukáš Janča 2015.12.01 12:53  
   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
5927
Carl Schreiber 2015.12.01 14:14  
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
33
Lukáš Janča 2015.12.01 20:11  

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

Carl Schreiber
5927
Carl Schreiber 2015.12.01 20:25  
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