I want to plot an indicator, but my indicator does not have a point at each and every point of the underlying data series. There may be anywhere from one to several periods between indicator points.
Is there a way I can plot such a series, or does Wealth Lab require that any series you plot have the same number of data points as the underlying series?
Size:
Color:
Wealth-Lab must synchronize your indicator to plot it. Quoting the WealthScript Programming Guide > DataSeries > Characteristics of DataSeries:
QUOTE:
All DataSeries contain the same number of values as bars in the chart.
As a workaround, you might want to specify
Color.Transparent in
SetSeriesBarColor to hide the items that you don't want to see. As the QuickRef example shows (F11 key with WLP open, then start typing in
SetSeries...), this overlay is added after plotting the DataSeries as a cosmetic method.
Size:
Color:
Thank you for that answer.
Would it also be possible to pad some places with zeroes or negative values, and WealthLab would just ignore those when plotting?
Size:
Color:
For indicators, a zero or negative value may be perfectly valid and thus will not be ignored by Wealth-Lab. Also, assigning Double.NaN (not a number) will cause indicator display issues.
Size:
Color: