I used the relative performance chart in the basic charts folder and added chartLogarithmic to the code and set it in the chart parameters, but it looks as if the Y (price axis) is still Linear. I can export to Excel, I like the look of the AB charts.
Here is the code.
Are you sure, we concur at characteristics of Linear v/s Log scale?
[Right click on image to open it on a New Tab for better view]
Previously shared recommendation works, here is proof:
Chart scale type can also be changed from Parameters -> Axes & Grid:
It is like calling an orange painted Apple - an Orange - as it's colored orange. Because, I've no capacity to introspect or any intensity to explore true reality.
This is not customer service where you would expect, "customer is always right!".
Rather this is an open constructive forum where newcomer, longtimer AmiBroker users participate to help each-other, share knowledge.
We invest time in producing an appropriate response to all our queries with sole intention to spread awareness or learn tons of features this amazing software offers. So, it becomes necessary to substantiate your counter-question or contradiction with "evidence", otherwise, you are simply propagating USELESS notion(s) to others and also disrespecting the person who meticululousy architect every nitty-gritty of it for over 2 decades with utmost care.
P.S. Captain James Cook, an 18th century cartographer, explorer, author of an exciting book Captain Cook's Voyages once wrote and I quote, "When your mind tries to verify a preconceived notion, you can miss the obvious".
Just WOW! Talk about preconceived notions. Look, I am not knocking the great and venerable AmiBroker. I have been using it for over 20 years. Here is the difference between Linear and Log defined here that I am looking for:
A linear scale plots data points using a unique unit value to give an equal vertical distance between values. On the other hand, a logarithmic chart scaling plots using percentage change as the distance between data points.
I was simply looking to see if a log scale such as is found in Excel (defined above) can be done here. Now I may be wrong, and not seeing your example for what it is, but it looks as if the price scale in each example is evenly spaced. I followed your instructions and I see the chart change slightly, like in your example, BUT when plotting the SPY vs a 60/40 Buy and hold portfolio the price scale stays linear (evenly spaced). Again I am not criticizing AmiBroker, I do a lot of my finished work in Excel and it is a one click format there and for this project I am time crunched.
If you or anyone can show an example of the relative strength of two issues that have drastically different prices using the percentage change for the distance between data points, I would be grateful.
Seriously, what good would it do to have a Relative Performance chart in Log scale? Relative Performance makes sense linearly as the comparisons are in percentage terms.
It was implied several times:
To begin with, I asked myself, is he not seeing "Warning 902 can not plot a chart in logarithmic scale as a data set contains negative value(s)" red-colored message in AB chart upon loading that Relative Performance code in Log scale.
In my first response, if I would've stated that natural logarithm is same everywhere (including Excel) and log( -negativeInteger ) has an imaginary part (i) that results as a complex number, this conversation would've diverted to a tennis match on how you can plot Relative Chart in Excel with "single-click" and not in AB.
a new "Warning 902 can not plot a chart in logarithmic scale as a data set contains negative value(s)" message is displayed on attempt to use log scale with negative data and the chart is plotted in linear scale instead.
Took this detour to ensure that you see "Warning 902 can not plot a chart in logarithmic scale as a data set contains negative value(s)" but still ignore it. That's why I previously quoted Captain Cook, "When your mind tries to verify a preconceived notion, you can miss the obvious".