Mathematical formules of indicator

 

Hi all,

I have worked and tested alot of indicators. but by reading the source code i have found many Math Magic(at the moment) blenders in indicators. i couldnt find anything in google about the logic of its use. thier should be one.  if anyone can guid me or share link with me, what is the math or logic behind it. which Math department it belongs to. so i can do my housework on it. i have given three example.

thanks in advance.



     double a = hot;
            workT3Coeffs[tinstanceNo][_c1] = -a*a*a;
            workT3Coeffs[tinstanceNo][_c2] = 3*a*a+3*a*a*a;
            workT3Coeffs[tinstanceNo][_c3] = -6*a*a-3*a-3*a*a*a;
            workT3Coeffs[tinstanceNo][_c4] = 1+3*a+a*a*a+3*a*a;
            if (original)
                 workT3Coeffs[tinstanceNo][_alpha] = 2.0/(1.0 + period);
            else workT3Coeffs[tinstanceNo][_alpha] = 2.0/(2.0 + (period-1.0)/2.0);


==============================================================================


              double vel_length = length;
                     static double coeff0; coeff0 = length + 1;
                     static double coeff1; coeff1 = coeff0 * (    coeff0+1.0)/2.0;
                     static double coeff2; coeff2 = coeff1 * (2.0*coeff0+1.0)/3.0;
                     static double coeff3; coeff3 = coeff1 * coeff1 * coeff1 - coeff2 * coeff2; 

==============================================================================

 e1=0; e2=0; e3=0; e4=0; e5=0; e6=0;
   c1=0; c2=0; c3=0; c4=0;
   n=0;
   w1=0; w2=0;
   b2=0; b3=0;
   //
   b2=TCurvature*TCurvature;
   b3=b2*TCurvature;
   c1=-b3;
   c2=(3*(b2+b3));
   c3=-3*(2*b2+TCurvature+b3);
   c4=(1+3*TCurvature+b3+3*b2);
   n=RSIPeriod;
   //
   if (n<1) n=1;
   n=1 + 0.5*(n-1);
   w1=2/(n + 1);
   w2=1 - w1;
 
MrAthlantis:
if (original)                  workT3Coeffs[tinstanceNo][_alpha] = 2.0/(1.0 + period);

This Trend scalping indicator looks very similar

 
timmytrade #: This Trend scalping indicator looks very similar

That is the equation for obtaining the alpha weight of an exponential moving average.

An N-day exponential moving average (EMA) is a weighted average of today's close and the preceding EMA value. The weight for today's close is a smoothing factor alpha, where alpha=2/(N+1).

 

Thank you, with your wonder comment and explaination. if found the link. its a good start understanding these .

https://en.wikipedia.org/wiki/Glossary_of_graph_theory