Logarithmic Equity Chart - Report Output

Hi all. Does anyone have a code snippet or ideas on how to change the scale on the portfolio equity chart in the Charts tab of the backtest report from linear to logarithmic?

Many thanks!

1 Like

You can do that by adding SetChartOptions function with flag chartLogarithmic.

  1. Go to Charts - Report Charts.
  2. Right click AFL "1. Portfolio Equity" and choose "Edit" in context menu.
  3. In formula editor add code line
    SetChartOptions( 1, chartShowDates | chartLogarithmic );
    to that AFL.
  4. Save that AFL.
  5. Run backtest.

Is there also a way to change the display of the logarithmic equity chart in the backtest results report? There are cases where the y-axis (equity) would need to be expanded to see the entire equity curve.

The response marked as solution was exactly about changing backtest result report chart.

Follow this advice: How to ask a good question

However, not about how to change the scale of the equity-axis in the report (not the charts). The equity curves grows out of the chart and cannot be seen in many cases. There is no reference to this issue and how to amend it. Would appreciate an input very much. I assume that I am not the only amibroker user having this issue.

I assume that I am not the only amibroker user having this issue.

Wrong. Heard the old saying "don't ASS-U-ME because you might make an as* from u and me" ?

No, normally equity does NOT grow out of the chart. If nothing has changed in the code, Equity chart automatically adjusts to min / max values experienced by equity.

Did you read the article? I guess not because number of clicks on the link I provided is zero. Ignoring helpful advice is not the best way to get further help. Imagine that no-one else is experiencing the problem you have. If problem was common, imagine I would hear about it 20 years ago. That is about the time it WORKS FINE for everybody else.

If on your end things work differently, use advice from the How to ask a good question and provide screenshots and THE FORMULA. Chances are you turn off auto-scaling somewhere.