How can you change the y axis of a chart to display in percent?
Author: The_Viper
Creation Date: 12/3/2013 11:23 PM
profile picture

The_Viper

#1
For example the symbol curve goes from 90 to 100; however the y axis scale shows a 10% gain.
profile picture

Eugene

#2
You can't. What you can do is plot (in code) the instrument on a PricePane, like shown in this KB article:

WealthScript Techniques | Relative Performance Chart
profile picture

The_Viper

#3
I am reviewing the KB article; the chart plane now shows percent from a date.

Is there a way to turn off auto scale and fix the percent start and stop points on the y-axis?

Seeing percent change on a fixed scale would be extremely helpful with building or reviewing strategies, in that as you arrow down through symbols in your data set, the related chart would reflect the percentage gain or loss, without any computation intensive interpolation.

I think this would be a great help.
profile picture

The_Viper

#4
Where do I find info on "PlotBenchMarkPct?"

Thanks
profile picture

Eugene

#5
QUOTE:
Where do I find info on "PlotBenchMarkPct?"

What info do you mean? It's a method with completely revealed code that anybody can modify.
profile picture

Cone

#6
QUOTE:
Is there a way to turn off auto scale and fix the percent start and stop points on the y-axis?
Not exactly. But you can use SetPaneMinMax to fix the upper and lower bounds, provided that the plotted series does not exceed them.
profile picture

The_Viper

#7
Thank you Eugene and Cone.

SetPaneMinMax looks very interesting. I will try it.

I looked at PlotBenchMarkPct again and I agree it's a method with completely revealed code. I originaly thought it was a wealthscript item.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).