Math on custom DataSeries
Author: iliakan
Creation Date: 7/19/2009 12:46 PM
profile picture

iliakan

#1
Hi,

I created custom dataseries object for day volumes.

CODE:
Please log in to see this code.


But Wealth Lab refuses to apply maths to it.
E.g. Peak.Series(volumes, 7, PeakTroughMode.Percent); gives error in ctor about non-existing object reference.

What's up? Any special properties that I missed ?
profile picture

Eugene

#2
This is an unsupported way of creating data series. For the supported ones, please see the WealthScript Programming Guide, DataSeries > Filling a Custom DataSeries > How to: Create a DataSeries filled with zeroes.
profile picture

iliakan

#3
But when I create dataseries like "Close-Close", I can't Add any data to it.
profile picture

iliakan

#4
My DataSeries store price-indexed volume, not bars.
profile picture

Cone

#5
Actually, the following method is better than what the Help writer was aware of at the time -
CODE:
Please log in to see this code.

Like the Close-Close method, this initializes a DataSeries filled with zeroes. You should not try to add data to it, instead change the data that exists to different values.
profile picture

iliakan

#6
My dataseries should be price-based. They keep "price -> volume" relation.
That's why I need to create them from the scratch.

The purpose of making them "dataseries" is: I want to apply WL Maths functions.
profile picture

Cone

#7
I guess I don't understand what you're trying to do then, sorry. Is the idea to create a DataSeries that doesn't have the same number of bars as any other DataSeries that the script has access to?
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).