6.2 Named DataSeries bug workaround
Author: streak
Creation Date: 7/27/2011 8:09 AM
profile picture

streak

#1

Hi

have checked the Wiki "Named DataSeries bugs" workaround but still cannot get the following loop to work (simply trying to plot the series negative);

CODE:
Please log in to see this code.


Without the loop the code works fine. However, with it, there's a Runtime error: Obj not set to an instance... at WLD.Strategies.testCOT.Execute()

Is there something wrong in my code or am I not handling the workaround correctly?

Thanks
Jon
profile picture

Eugene

#2
Sorry but GetExternalSymbol does not populate Named DataSeries.
profile picture

Eugene

#3
Open Issues > Named DataSeries bugs
profile picture

streak

#4

So what would be the easiest way to make the Named DataSeries negative (ie the series 'Trdrs_ProdShort' from a custom ascii DataSeries field)?
profile picture

Eugene

#5
This workaround applied to working with Bars/DataSeries directly i.e. no external symbol.

1. The easiest way is to add this symbol to your trading DataSet. For example, using the WatchList provider.
2. If this is undesirable, you might want to create a Strategy that would make the Named DataSeries negative and push it to Wealth-Lab's global memory (GOP) using SetGlobal and temporarily change your actual code to retrieve it from the GOP via GetGlobal. The idea is to start Wealth-Lab, run the dummy Strategy on your COT DataSet, and retrieve the DataSeries from global memory in your trading Strategy.
profile picture

streak

#6

I made a typo in typing the code in (late last night). The code from my strategy should have read GetExternalSymbol not GetExternalSeries.

The symbol in GetExternalSymbol (ie 'COTsymb') is from an existing ascii DataSet with custom fields. If I have it correct, then the bug is not related to this already populated fLong.FindNamedSeries("Trdrs_ProdShort");

In the same strategy I can declare a DataSeries and initialise it with one of the existing 'custom' series subtacted from another, like;
CODE:
Please log in to see this code.


However, to make a series negative I could not do, figured that this was due to the bug Math operations (*,-,+ etc.) throw exception on Named DataSeries. And so tried to loop each bar and make its value negative, which I cannot make work. But shouldn't it?




Also is there any schedule to have available operators similar to those in WLD4 like 'SubtractValueSeries' etc?



profile picture

Eugene

#7
QUOTE:
If I have it correct, then the bug is not related to this already populated

Correct.
QUOTE:
But shouldn't it?

Seems like you completely overlooked my reply from 7/27/2011 9:07 AM.
QUOTE:
Also is there any schedule to have available operators similar to those in WLD4 like 'SubtractValueSeries' etc?

No 'schedule' ever existed since that would be an unnecessary complication compared to elegant C# operator overloading i.e. *, +, / and so on.
profile picture

streak

#8

Regards your comment;
QUOTE:
Seems like you completely overlooked my reply from 7/27/2011 9:07 AM.


No, I did not overlook it. I failed to understand it;
QUOTE:
This workaround applied to working with Bars/DataSeries directly i.e. no external symbol.


Does your "This workaround " refer to the Wiki workaround which I had discussed, or to the two suggestions you made in that post?

Given the first case; the workaround draws from 'NamedDataSeries1' & 'NamedDataSeries2' which I'd have thought come from an external symbol.

Given the latter; Your first suggestion involved adding the symbol to DataSet(s). This is what I have done and figured it understood from my first post. For your second suggestion, I just wondered if I really have to go to such lengths when given, as you put it, "elegant C# operator overloading"

All I am trying to achieve is to subtract each element of an existing data series from zero.

Thanks
Jon




profile picture

Eugene

#9
Jon,

You've added the external symbol with Named DataSeries to your trading DataSet (workaround for bug #1). Next step is to work around bug #3 from the Wiki (broken math ops on Named DS) and introduce a loop. Was it done?
profile picture

streak

#10

Eugene

Figure my not understanding some of your suggestions comes from interpreting/categorising what series terminology applies to what series. ie;

- 1# An ascii dataset's OHLCV series is not a 'GetExternalSymbol', but
- 2# An additional custom field within that same datset is a 'GetExternalSymbol'.
- 3# The series in 2# above is a 'named series', the series in #1 is not, but
- 4# A dataseries may on the 'fly' and initialised from 2# above (any maybe with some operand applied) is not a named series?
- 5# Does the term named data series only apply to a series directly assigned from a call to .FindNamedSeries?


As for making a series negative, I've been able to achieve it, and without the loop which I had tried;
My main problem was in assigning .FindNamedSeries from the primary series Bars object rather than the already assigned GetExternalSymbol Bars object. After that another blank series was assigned from fLong.Close - fLong.Close, and finally the wanted negative series subtracted from that.

Without a scrutinising check it's all worked and without the loop. This is in Ver 6.1

So maybe another workaround to the 3rd bug in Wiki is to create an intermediary series?

Thanks again
Jon
profile picture

Eugene

#11
QUOTE:
Figure my not understanding some of your suggestions comes from interpreting/categorising what series terminology applies to what series. ie;

Conceptually it hasn't changed from version 4. A Named DataSeries is a property of the Bars object, the source doesn't matter: Bars, GetExternalSymbol - it's always about a Bars object and the linked collection of NamedDataSeries. It's just the series of bugs in 6.2 that complicates things here that was found too late.
QUOTE:
Without a scrutinising check it's all worked and without the loop. This is in Ver 6.1

No wonder, because the bug isn't there.
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).