How to fill the unused bars in custom series with
Author: gpwr
Creation Date: 6/3/2009 1:14 PM
profile picture

gpwr

#1
I think this is a common case. I have a strategy. I am calculating a series of values used in the strategy. I want to display this series on the PricePane. As an example, let us assume that my series is SMA with period=N. As you know, SMA values are not available for the first N-1 bars. So, instead of diplaying some preset values like Close-Close=0, I would like the chart to display no SMA values for the first N-1 bars. How shall I do it?
Here is the code:
CODE:
Please log in to see this code.


Please do not respond with "make your series an indicator".
profile picture

Eugene

#2
To help hide null values, Wealth-Lab 5 Wiki has this tip:
Indicators | How to Plot a Discontinuous Indicator

QUOTE:
DataSeries ma=Open-Open;//is there such a thing as Empty Series?

DataSeries ma = new DataSeries( parameters );
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).