Hi friends,
I am trying to compare the two arrays and count the number of times the condition is true for an intraday.I am using the below code.
Count=0;
for(i=0;i<BarCount;i++)
{
if (C[i]>O[i])
{
Count=Count+1;
}
}
In the above code the problem is "BarCount" is considering all the bars(I want to make it to consider only for today bars).
So i modified the code in the below way.
newday=Day()!=Ref(Day(),-1);
barss=BarsSince(newday)+1;
Count=0;
for(i=0;i<barss;i++)
{
if (C[i]>O[i])
{
Count=Count+1;
}
}
Then i am getting the error as " condition if, while, for statements has to be numeric or boolean type.You can not use array here.please use [] (array subscript operator) to access array elements " How to resolve the issue.
Much appreciate for your guidelines.