How do i set condition to run afl on only last n days?

I would like to set a condition on afl to use only last 25 days, so that i can ignore the condition on that day if it occurred on 26th day automatically.

how can i do that? any pointers will be extremely helpful.

@erukumk , you could put your condition plotting inside a loop

for (i=Lastvalue(BarCount) - 25; i<BarCount; i++)
{
    plotText(yoursignal, ...)
}

1 Like

BarCount is not array, it is a scalar, you don't need LastValue.

Taking your example, writing it without LastValue would be enough:

for (i=BarCount - 25; i<BarCount; i++)
{
    plotText(yoursignal, ...)
}

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.