Read Buffer in the back and print result

 

Hello everyone!I'm trying to read all the signals in the historic of my Buffer and I wrote this code:

//+------------------------------------+
//| MyIndicator()                      |
//+------------------------------------+
datetime MyIndicator(int y,int j)
  {
   int k=0;
   double MyIndicator0=0;
   datetime time=0;
  
   for(int i=y;i<y+50;i++) //It reviews the latest 500 candles...
     {
      MyIndicator0=iCustom(Symbol(),0,"MyIndicator",0,i); //I take the value of the MyIndicator...
      
      if(MyIndicator0!=0.0&&k<j) {k++;continue;} //If the value of the MyIndicator is not what interests me the difference...
      
      if(MyIndicator0!=0.0&&time==0) {time=Time[i];break;} //If the value of the MyIndicator what interests me, except the time with the index.
     }
   return(time);
  }

Once taken the time of each buffer, how can I print the information in its Alert?

 
  1. Type: Alert("") in your code,
  2. mark that word and
  3. press F1,
  4. read about Alert(..).
 
Carl Schreiber:
  1. Type: Alert("") in your code,
  2. mark that word and
  3. press F1,
  4. read about Alert(..).
I'm sorry but I did not understand!

I would like to analyze 500 candles in the historic, and every stmpare times with the respective contennuto of Alert.

But I did not understand, your step.
 
fly7680:
I'm sorry but I did not understand!

I would like to analyze 500 candles in the historic, and every stmpare times with the respective contennuto of Alert.


   for(int i=y;i<y+50;i++) //It reviews the latest 500 candles...

But I did not understand, your step.
Carl is saying you to check the documentation of Alert() function.
 
I have to create a new Alert, or I can use the existing one indicator that I analyze in the historic?
 
fly7680:
I have to create a new Alert, or I can use the existing one indicator that I analyze in the historic?

Seems that you are mixing "signals" and "alerts"

Usually "historical signals" have sense. "historical alerts" don't (have sense)

 
Mladen Rakic:

Seems that you are mixing "signals" and "alerts"

Usually "historical signals" have sense. "historical alerts" don't (have sense)

I thought I read all the buffers in the historic, according to a statistical calculation make a go of candles in gain and those in Loss