Compiled Strategy error: Unable to cast object of type ... to type WealthScript
Author: Carova
Creation Date: 6/10/2018 6:53 PM
profile picture

Carova

#1
Hi All!

Still trying to resolve two issues with Visual Studio compiled strategies. The first:

When I open the compiled Strategy ib WLPro I get the "Helper" error message in the file attached. Here is the code from the construction of the Helper for the Class ASDSystem:
CODE:
Please log in to see this code.


The second issue is when I attempt to run the compiled strategy I get an error that there is no JIT Debugger (error message attached). I have attempted to disable the JIT debugger in VS (under Tools/Options/Debugging/ without success.

Any thoughts?

Vince

profile picture

Eugene

#2
QUOTE:
When I open the compiled Strategy ib WLPro I get the "Helper" error message in the file attached.


CODE:
Please log in to see this code.


QUOTE:
The second issue is when I attempt to run the compiled strategy I get an error that there is no JIT Debugger (error message attached). I have attempted to disable the JIT debugger in VS (under Tools/Options/Debugging/ without success.

Searching StackOverflow and Microsoft forums is your best bet. These are the go-to sources for Visual Studio issues.

P.S. If it's a modal Windows error dialog, you could strike Ctrl-C to copy the underlying error message and Ctrl-V to paste it when replying (a standard Windows shortcut). It's a good idea to click "Details" and copy/paste the detailed exception message when it happens.
profile picture

Carova

#3
QUOTE:
When I open the compiled Strategy ib WLPro I get the "Helper" error message in the file attached.


CODE:
Please log in to see this code.


When I try to do that VS "complains" (I get the squiggly red line under it and when I press Alt+Enter it suggests "ASDSystemHelper" which is why I posted my question. The error is:

QUOTE:
The type or the namespace name "ASDSystem" could not be found...



I have searched both StackOverflow and the MS Dev forums extensively prior to posting my question. Neither had any solution that resolved the problem which is why I was wondering if it is an issue peculiar to WealthLab.

Vince



profile picture

Carova

#4
Update:

I solved the problems (poor "bracing" on my part).

Vince
profile picture

Eugene

#5
Glad to have helped.

Since your VS issues so far have been syntax errors and copy/paste issues I'd recommend you use the open source code of Strategies.ActiveTrader as boilerplate. The project's up to date for WL 6.9 (it targets .NET 4.5+) and should work out of the box.
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).