GetExternalSeries converted from WL4
Author: Jim0000076
Creation Date: 10/13/2012 7:54 AM
profile picture

Jim0000076

#1
I have a code that was converted from WL4 to WL6. It references an external series XAO. Code as follows:

XAO = (int)GetExternalSeries("XAO", WL_CLOSE);

And I receive the following error message/s:

error CS1502 @49(49,15) : The best overloaded method match for 'WealthLab.WealthScript.GetExternalSeries(string.WealthLab.DataSeries)' has some invalid agruments

and

error CS1503 @ (49, 40): Argument '2': cannot convert from 'int' to 'WealthLab.DataSeries'

Does anybody know how to fix or work around this? Many thanks in advance.

Jim
profile picture

Eugene

#2
This question has been raised numerous times since 2008. I'm sure you will find the answer yourself - after carefully searching the WealthScript Translator forum for GetExternalSeries.
profile picture

Eugene

#3
profile picture

Jim0000076

#4
Hello Eugene, Thank you for your response but I had already been through the posts and could not find an answer to my specific question. I tried replacing

CODE:
Please log in to see this code.


with

CODE:
Please log in to see this code.


Then as I am using (well was in WL4) XAO as a filter I had the following converted code

CODE:
Please log in to see this code.


So I replaced this with

First part
CODE:
Please log in to see this code.

and second part

CODE:
Please log in to see this code.



And then I get the following message:

error CS0103 @ (83,27) : The name 'bar' does not exist in the current context


I am not sure what I am doing wrong, but I suspect that it has something to do the with '(int)' in the original GetExternalSeries. Any help would be greatly appreciated, I have looked through the forums long and hard and have not been able to address my specific problem, I suspect that it is something simple but am not sure.

Many thanks in advance.

Jim
profile picture

Eugene

#5
QUOTE:
I am not sure what I am doing wrong,

Mainly two things:

1. Not following the workaround as pointed in my previous post
2. Mixing WealthLab 6 syntax (we call it "pure C#") with WealthScript Translator output. This is not going to work. See my post dated 7/28/2012 2:56 AM here: Willing to hire to translate WL4 script (was: Standard Deviation of Variable)
profile picture

Jim0000076

#6
Eugene, many thanks. I take your point with mixing Wealthlab 6 syntax and Translator output, this makes sense. It was just a work around that I was attempting, I should have explained the following which I had tried first:

If I use WealthScript Translator Output and include

DataSeries XAO = GetExternalSymbol("XAO", true).Close;

instead of

XAO = (int)GetExternalSeries("XAO", WL_CLOSE);

It compiles with no errors but when I back-test it on my dataset I get the following message:

'Error processing <insert symbol name> Series Parameter Name: Price Series Handle not defined.

But when I take out of the code all reference to XAO the code runs perfectly and has no problem identifying symbols. I am not sure why when I reference the external reference that Wealthlab can no longer see the data symbols. Is there a simple solution to this? Thanks in advance.

Jim



profile picture

Eugene

#7
Sorry, I'm not aware of simple solutions to this outdated GetExternalSeries issue. Some scripts are easier to translate manually.
QUOTE:
It compiles with no errors but when I back-test it on my dataset I get the following message:

'Error processing <insert symbol name> Series Parameter Name: Price Series Handle not defined.

No idea without seeing the script. WL6 can't produce this error message, it's thrown out by the unsupported WS Translator, as suggested by the legacy term "Price Series".
profile picture

Jim0000076

#8
Hello Eugene, I have now finished reprogamming entire code in "pure C#", much neater than converted code and probably more robust.

Many thanks for your help and pointing me in the right direction.

Jim
profile picture

Eugene

#9
You're welcome Jim.
profile picture

mikesblack

#10
CODE:
Please log in to see this code.


On a related topic, I would like to use both of the above indexes. What will I need to do to accomplish this? Thanks
profile picture

Eugene

#11
You're asking in the WealthScript Translator forum.

Since GetExternalSymbol is not GetExternalSeries and being a "new" addition (to Version 5), it has nothing to do with WSTL, please either pick an existing thread in the WealthScript forum among dozens that deal with GetExternalSymbol, or start a new one.
profile picture

mikesblack

#12
Will do. Thanks
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).