Download MetaTrader 5

Indicators: cluser indicator CC and CCFp updated

To add comments, please log in or register
MetaQuotes Software Corp.
Moderator
192586
MetaQuotes Software Corp.  

cluser indicator CC and CCFp updated:

The original cluster CC and CCFP indicators by Simeon Semenych and can be found on from http://articles.mql4.com/484 and this artical also descripted how to use the cluster indicator. This updated version has features below: 1) the indicator refeshed

Author: finimej

MQL4 Comments
16316
MQL4 Comments  

WELL DONE!!! These were very much needed enhancements!

grantfx
12
grantfx  
z00gie:

WELL DONE!!! These were very much needed enhancements!



The is error, look at the usdjpy, it is displayed as + 0.0044, but clearly the line for it is negative. Same for usdcad. So 2 errors are being shown.
Komgrit Sungkhaphong
200
Komgrit Sungkhaphong  
advacement in forex indicator!!
Hoved Guy
14
Hoved Guy  

Hi, 

Can you please explain why it doesn't give any buffer values for output? Noob here and I use fxdreema for making EA.... Thanks a lot in advance !! 

Files:
p2.mq4 89 kb
Hoved Guy
14
Hoved Guy  

There's a bug in the code..... see how the values changes when you make 'ShowOnlyPairOnChart' as true. 

Files:
grandaevus
1472
grandaevus  

There's a bug in the function  ma.

double ma(string sym, int per, int Mode, int Price, int i)
  {
   double res = 0;
   int k = 1;
   int ma_shift = 0;
   int tf = 0;
   switch(Period())
     {
       case 1:     res += iMA(sym, tf, per*k, ma_shift, Mode, Price, i); 
                   k += 5;
       case 5:     res += iMA(sym, tf, per*k, ma_shift, Mode, Price, i); 
                   k += 3;
       case 15:    res += iMA(sym, tf, per*k, ma_shift, Mode, Price, i); 
                   k += 2;
       case 30:    res += iMA(sym, tf, per*k, ma_shift, Mode, Price, i); 
                   k += 2;
       case 60:    res += iMA(sym, tf, per*k, ma_shift, Mode, Price, i); 
                   k += 4;
       case 240:   res += iMA(sym, tf, per*k, ma_shift, Mode, Price, i); 
                   k += 6;
       case 1440:  res += iMA(sym, tf, per*k, ma_shift, Mode, Price, i); 
                   k += 4;
       case 10080: res += iMA(sym, tf, per*k, ma_shift, Mode, Price, i); 
                   k +=4;
       case 43200: res += iMA(sym, tf, per*k, ma_shift, Mode, Price, i); 
     } 
   return(res);
  }       


Correct code should be


double ma(string sym, int per, int Mode, int Price, int i)
  {
   double res = 0;
   int k = 1;
   int ma_shift = 0;
   int tf = 0;
   switch(Period())
     {
       case 1:     res += iMA(sym, tf, per*k, ma_shift, Mode, Price, i); 
                   k *= 5;
       case 5:     res += iMA(sym, tf, per*k, ma_shift, Mode, Price, i); 
                   k *= 3;
       case 15:    res += iMA(sym, tf, per*k, ma_shift, Mode, Price, i); 
                   k *= 2;
       case 30:    res += iMA(sym, tf, per*k, ma_shift, Mode, Price, i); 
                   k *= 2;
       case 60:    res += iMA(sym, tf, per*k, ma_shift, Mode, Price, i); 
                   k *= 4;
       case 240:   res += iMA(sym, tf, per*k, ma_shift, Mode, Price, i); 
                   k *= 6;
       case 1440:  res += iMA(sym, tf, per*k, ma_shift, Mode, Price, i); 
                   k *= 5;
       case 10080: res += iMA(sym, tf, per*k, ma_shift, Mode, Price, i); 
                   k *=4;
       case 43200: res += iMA(sym, tf, per*k, ma_shift, Mode, Price, i); 
     } 
   return(res);
  }       
To add comments, please log in or register