DataSeries Starts at Zero
Author: Bandit292
Creation Date: 2/8/2010 6:28 PM
profile picture

Bandit292

#1
Using WL5.6, I have created a custom Data Series that uses the last 80 bars. How do I keep the first value in the series from starting on the x-axis (at zero)? The zero starting point screws up automatic Y-axis scaling and makes the data series hard to read all jammed up next to the data in the price pane.

Thanks,
jam
profile picture

Eugene

#2
All DataSeries contain the same number of values as bars in the chart. You can't change the pre-filling of empty bars with zeroes. To keep from starting at 0, you may, for example, pass another starting value like YourSeries[Bars.Count-80] to all the preceding bars. However, this will be "peeking in the future" so you need to check that this DataSeries isn't accessed before Bars.Count-80.
profile picture

Bandit292

#3
Eugene,

I thought that might be the case - thanks for confirming. On another note ...

I am self taught in VB, struggling to learn C#. Can you point me in the right direction for some code samples and guidance addressing how to create a simple stand alone Indicator that I can integrate into the WL5 drag-and-drop sets?

Thanks,
jam
profile picture

Eugene

#4
Unfortunately, I can't point you to such a document - until Fidelity's legal dept finally gives the API docs the green light. There's a tutorial on creating custom indicators and building indicator libraries.

Wealth-Lab API documentation - call Fidelity today!

For now, you're welcome to review the open source code of our indicator libraries:

Home - Community.Indicators
Home - TASCIndicators
profile picture

avishn

#5
Re: Data series starts at zero

I think something like this should help make chart more readable --
CODE:
Please log in to see this code.
profile picture

Eugene

#6
This is even better :)
profile picture

Bandit292

#7
Eugene,

I called Fidelity today to express my interest in the API Documentation. It took a few transfers to finally get an answer. I was told to expect a release sometime during the 1st quarter 2010.

Avishn,

The FirstValidValue option works well. No chart scaling problems, and I don't mind the constant value extending to the start of the data series.

Thanks,
jam
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).