As the title suggests, i need to get the value of a custom indicator, at a specific time every day to extrapolate an average. I tried the following code, it works, but how do I repeat it for each day? Thanks in advance.
for(i=0; i<Bars; i++)
{
double value=iCustom(0, 0, i);
if (Time[i]>StrToTime("2019.11.15 15:00") && Time[i]<StrToTime("2019.11.15 18:00"))
{
cont+=1;
sum+=value;
average=sum/cont;
}
}
for(i=0; i<Bars; i++)
{
double value=iCustom(0, 0, i);
if (Time[i]>StrToTime("2019.11.15 15:00") && Time[i]<StrToTime("2019.11.15 18:00"))
{
cont+=1;
sum+=value;
average=sum/cont;
}
}