Is the Cauchy difference a precursor to a reversal and/or correction? - page 3

 

I am attaching the requested indicator.

It is based on Custom Moving Average from the folder with examples of indicators.

SMA calculation function without changes.
GMA is calculated in a separate function.
At the end we calculate their difference.

Files:
Koshi.mq5  6 kb
 
elibrarius:

I am attaching the requested indicator.

It is based on Custom Moving Average from the folder with examples of indicators.

SMA calculation function without changes.
GMA is calculated in a separate function.
At the end we calculate their difference.

A picture of the chart is better.
 
 
elibrarius:

I enclose the requested indicator.

It is based on the Custom Moving Average from the folder with indicator examples.

The SMA calculation function has not been changed.
The GMA is calculated in a separate function.
At the end we calculate their difference.

Thank you! You can see from the chart above that the indicator is fulfilling its function. Or is it not? I still need to work a lot on it to understand it better.

Question: What period is used?

 
elibrarius:

Can't see anything, except what you can see without indicators.

M1 period. It's written in the left corner).

 
Yuriy Asaulenko:
I don't see anything, except what you can see without indicators.
Because, you don't want to see. I see that the indicator unambiguously predicted a decline even earlier (on the upside) than the price actually went down.
 
Yousufkhodja Sultonov:
Thank you! From the graph above, you can see that the indicator is fulfilling its function. Or does it?
The indicator reads what it is given in the formula. But the interpretation of the results and the development of TS on its basis is a much more difficult task.
By the way, please check if the GMA is counting correctly?

void CalculateGeometricalMA(int rates_total,int prev_calculated,int begin,const double &price[])
  {
   int i,limit;
//--- first calculation or number of bars was changed
   double powr=1/(double)InpMAPeriod;
   if(prev_calculated==0)// first calculation
     {
      limit=InpMAPeriod+begin;
      //--- set empty value for first limit bars
      for(i=0;i<limit-1;i++) gma[i]=1.0;
      //--- calculate first visible value
      double firstValue=1;
     
      for(i=begin;i<limit;i++)
         firstValue*=price[i];
      firstValue=MathPow(firstValue, powr);
      gma[limit-1]=firstValue;
     }
   else limit=prev_calculated-1;
//--- main loop
   for(i=limit;i<rates_total && !IsStopped();i++){
      gma[i]=gma[i-1] * (MathPow(price[i], powr) / MathPow(price[i-InpMAPeriod], powr));
   }
//---
  }
 
Yuriy Asaulenko:

Can't see anything, except what you can see without indicators.

M1 period. It's written in the left corner).

By period I mean the number of last history bars used when calculating the indicator line.
 
Yousufkhodja Sultonov:
Because, you don't want to see. I see that the indicator unambiguously predicted a decline even earlier (on the upside) than the price actually went down.

Is it?

Even looked at it again.

Zy A derivative from MA would have given the same thing. Even still predicted the direction as well).

 
elibrarius:
The indicator counts what it is given in the formula. But interpreting the results is a much more difficult task.
By the way, please check if the GMA is correct?

void CalculateGeometricalMA(int rates_total,int prev_calculated,int begin,const double &price[])
  {
   int i,limit;
//--- first calculation or number of bars was changed
   double powr=1/(double)InpMAPeriod;
   if(prev_calculated==0)// first calculation
     {
      limit=InpMAPeriod+begin;
      //--- set empty value for first limit bars
      for(i=0;i<limit-1;i++) gma[i]=1.0;
      //--- calculate first visible value
      double firstValue=1;
     
      for(i=begin;i<limit;i++)
         firstValue*=price[i];
      firstValue=MathPow(firstValue, powr);
      gma[limit-1]=firstValue;
     }
   else limit=prev_calculated-1;
//--- main loop
   for(i=limit;i<rates_total && !IsStopped();i++){
      gma[i]=gma[i-1] * (MathPow(price[i], powr) / MathPow(price[i-InpMAPeriod], powr));
   }
//---
  }
Unfortunately, I don't know much about the code, let someone knowledgeable check by comparing with the given formulas or enter the prices from the given test in the original table. I feel, by the order of numbers, that you are counting correctly.