Hi everybody, unfortunately I didn't manage to find any valuable explanation for a problem.
I'm building a stochastic oscillattor from scratch based on the one built by MT4-5 team and located and named as Stochastic in the 'Indicators' folder.
Supposing they do not possess any value, how can constant variables like rates_total and prev_calculated be inserted in if operators as conditions?
Are these lines crucial for regular functioning of the indicator? Sorry if I don't get the point.
Here is a little part of the code:
I'm building a stochastic oscillattor from scratch based on the one built by MT4-5 team and located and named as Stochastic in the 'Indicators' folder.
Supposing they do not possess any value, how can constant variables like rates_total and prev_calculated be inserted in if operators as conditions?
Are these lines crucial for regular functioning of the indicator? Sorry if I don't get the point.
Here is a little part of the code:
int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[])
if(rates_total<=InpKPeriod+InpDPeriod+InpSlowing) return(0);
pos=InpKPeriod-1; if(pos+1<prev_calculated) pos=prev_calculated-2;Thank you in advance!