I am trying to convert my first indicator for the WL4 Code Library and, as might be expected, I am having a problem. Could someone please explain to me what I am doing wrong? Thanks!
Vince
CODE:
Please log in to see this code.
Size:
Color:
Size:
Color:
This is a different version from the one in the TASCIndicators. I do believe that he has published at least 6 different versions of this indicator, and they vary dramatically.
Vince
Size:
Color:
You are mixing WSTL-generated code (driven by WSTL internally) with pure WealthScript. This is not going to work. We warned about that numerous times on this forum.
Solution:
1. Drop your later addition:
CODE:
Please log in to see this code.
2. Code it in old-fasioned way (WL4) and let WSTL do the translation of the whole script. It'll end up with something like this (non-functioning example):
CODE:
Please log in to see this code.
Please don't ask me about the proper syntax. We no longer support WL4 or WSTL.
Size:
Color:
QUOTE:
Code it in old-fasioned way (WL4) and let WSTL do the translation of the whole script. It'll end up with something like this (non-functioning example):
CODE:
Please log in to see this code.
OK, I will do that.
QUOTE:
You are mixing WSTL-generated code (driven by WSTL internally) with pure WealthScript. This is not going to work. We warned about that numerous times on this forum.
I have read a bunch on this portion of the Forum but have missed this point. Does that mean I will need to modify my WL4 scripts rather than edit the C# code directly? Or does it make more sense to attempt to hand translate the code into C# directly and then learn to embed the code modules into the WLP scripts that I will attempt to write? Some guidance is needed here. Thanks!
Vince
Size:
Color:
QUOTE:
Or does it make more sense to attempt to hand translate the code into C# directly and then learn to embed the code modules into the WLP scripts that I will attempt to write?
Yes.
Size:
Color:
Hi All!
Here is my first feeble attempt to convert a WL4 indicator to WLP6.
The WL4 code:
CODE:
Please log in to see this code.
The (almost?) working WLP6 code:
CODE:
Please log in to see this code.
Unfortunately I am getting an error - "error CS0103 @ (125,25): The name "bar' does not exist in the current context"
1) What am I doing wrong?
2) Have I translated it properly?
Thanks!
Vince
Size:
Color:
It's more like this (on-the-fly edit; I haven't verified it). PartialValue can be omitted, it's optional:
CODE:
Please log in to see this code.
Size:
Color:
Thanks Eugene!
When you get a chance could you please see if I coded it correctly? I am in the process of getting my C# "legs" working.
Also, how can I submit this to Community Indicators?
Vince
Size:
Color:
QUOTE:
Also, how can I submit this to Community Indicators?
You have already done so. Thank you for your submission Vince. I'll inspect the code and it will appear in next release of the library if everything is OK.
Size:
Color: