A function within an Indicator

 

Hello freinds,

I have a MQL4 indicator that I "translated" it to MQL5.

I still have one small problem, that I do not know what to do with it.

It's called: IndicatorCounted() - a known function in MQL4 but not within MQL5.

 According to the artical, dealing with transformation between MQL4 to MQL5, it "trasnlate" it as:

int IndicatorCounted()
{
   if(prev_calculated>0) return(prev_calculated-1);
   if(prev_calculated==0) return(0);
   return(0);
}

My problem is that I do not know how to defind: prev_calculated.

 

Can somebody help?

Thanks. 

 
prev_calculated is a parameter of the indicator function OnCalculate(). See help on it.
 
enivid:

prev_calculated is a parameter of the indicator function OnCalculate(). See help on it.

 

Thanks, I will study it.

Reason: