nanu
June 2, 2022, 9:14pm
#1
How can we count the total number of days in the complete data? When I increase the selection it shows a bigger range attaching a picture for the reference.
Code used is
Newday = Day()!=Ref(Day(),-1);
Total_Days=0;
for( i = 0; i < BarCount; i++ )
{
Total_Days = Total_Days + Newday[i];
}
GfxTextOut("Total_Days: "+ Barnumber, 20, 120 );
QuickAFL!
Also you do not need looping!
SetBarsRequired(sbrAll);
Newday = Day()!=Ref(Day(),-1);
Total_Days = Cum(Newday);
GfxTextOut("Total_Days: "+ Total_Days, 20, 120 );
LeoCV
June 3, 2022, 7:43am
#3
It seems that you have a bug in your code. I think that:
should be:
system
Closed
September 11, 2022, 7:44am
#4
This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.