How to create named series?
Author: redliontrader
Creation Date: 6/8/2008 9:40 AM
profile picture

redliontrader

#1
Wealth-Lab Version 5 (.NET) 5.0

I need a pointer to a thread or documentation or code snippet to on how to create a named series in WL5.

TIA
profile picture

Eugene

#2
See WealthScript Programming Guide, "DataSeries".
profile picture

redliontrader

#3
I read through the programmer's guide. I am looking for the piece about how to register a dataseries to a bar object.

from quick ref:

Locates a "Named DataSeries" that exists within the Bars object. Named DataSeries can be registered with a Bars object by specific Data Providers. A common example of a possible Named DataSeries is open interest for futures data. Another example are additional data fields that are imported in ASCII files.

tia

profile picture

Eugene

#4
I am looking for the piece about how to register a dataseries to a bar object.

Named DataSeries are "attached" to a Bars object by specific Data Providers. It's not an arbitrary operation. For example, suppose you were given a CSV file containing standard DataSeries e.g. Date, Close etc. plus a couple of specific columns like "Unadjusted close" and "Contract Expiration". If you choose to declare them rather than skip, Wealth-Lab will be able to find them later (using FindNamedSeries).


P.S.
Since you didn't specify why'd you want to register a DataSeries to a Bars object, maybe there's some specific task on your mind?
profile picture

redliontrader

#5
I am trying to port the KaseDev stops and I want to do a dataseries "cache" like DrKoch does in the following example:
CODE:
Please log in to see this code.


But I don't know how to port the CreateSeries call from WL4

profile picture

Eugene

#6
Here it goes:

CODE:
Please log in to see this code.
profile picture

redliontrader

#7
Thank you Eugene!
Even better than a pointer.
profile picture

richard1000

#8
So can I turn the DevStops into sell at trailing stops? I tried SellingAtTrailingStop(bar +1, p, Dev1, "Dev") but I get an error stating DevStops cannot be converted to 'double'. I also tried

public double DevStops(Bars bars, int period, DataSeries TR2DSeries, int trFactor, double sdFactor): base(bars, "Kase DevStops")

but still get an error.

BTW, this thread should be transferred to WL .NET forum.
profile picture

Eugene

#9
Please read any basic C# 101 book/resource from the Wealth-Lab Wiki FAQ (Support - Knowledge Base) first, then check out the WealthScript Programming Guide on DataSeries and how to get a single value.
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).