If you want a rolling annual % rate of return based
on the most recent bar then this variation will provide it.
{Rolling Annual % Rate Of
Return} D:=DayOfMonth();A:=LastValue(D);U:=Cum(1); M:=Month();B:=LastValue(M);Y:=Year(); G:=M*31+D-(M>B
OR (M=B AND D>A))*372; Z:=PeakBars(1,G,1)=0 OR
U=LastValue(U); A:=ValueWhen(1,Z,C); B:=ValueWhen(2,Z,C); PREC(100*(A-B)*(B<>0)/(Abs(B)+(B=0)),2);