AFL for Scanning & tabulating CAGR returns over different time frames

hi everyone,
its been great past 3 months since i purchased this great software,
but i still didnt get the time to learn AFL coding,
so i was looking for some help from seniors,
about "Tabulating" CAGR returns as seen in attached screenshots..

i am trying to develop a strategy, based on returns shown in tables ( as in pix )

Screenshot 2020-06-28 22.35.13 Screenshot 2020-06-28 22.35.32 Screenshot 2020-06-28 22.35.48 Screenshot 2020-06-28 22.35.59 Screenshot 2020-06-28 22.36.13

It would be helpful if you would share any AFL that you've already developed so that we know where you're stuck. You should also consider whether you really need CAGR (annualized rate of return), or whether it would be sufficient to use ROC (absolute rate of return).

Please note that the tables you've shared report CAGR over different lookback periods as of the current date. If you were to use those values in a backtest, your results would be invalid because you're peeking into the future. In other words, you would need to consider the CAGR or ROC at the time of trade entry for your test to be valid.


thanx for your reply.

but since i am novice, i dont know coding afl ,
hence asking for help,
i had not made any afl .

This forum is not a free coding service, but rather a way for people to get answers to questions while they improve their AFL skills. You will generally find that people are willing to put effort into helping you if you can show that you have put your own effort into helping yourself.

I suggest that you spend some time with the excellent AmiBroker documentation and tutorials, and focus specifically on Explorations for now. It would only take a few lines of code to report ROC (Rate of Change) for several different lookback periods.

After you start to understand AFL and can see the results in the Exploration output, then you can easily transition to writing a simple Backtest using the same indicators from your Exploration.