Simple Script bombs
Author: angel57
Creation Date: 8/18/2008 12:11 AM
profile picture

angel57

#1
I get the following error for the simple script listed below. Any suggestions?

An unhandled exception of type 'System.Reflection.TargetParameterCountException' occurred in System.Windows.Forms.dll

Additional information: Parameter count mismatch.


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

Eugene

#2
Hi Dale,

I can't reproduce the error in WLP/WLD 5.1, and find nothing here that could cause any problem. Are you sure that the code snippet is posted in its entirety?

Was this code previously saved to disk and now produces the error when re-opening? If the problem persists after restarting Wealth-Lab, then please create a support ticket, indicating which tool was used (i.e. Strategy Window/Monitor), data, settings etc.

P.S. Please use the CODE tags to help legibility. I've made the change for you.
profile picture

angel57

#3
Hi Eugene,

I am using WLP 5.0.76.0. Would love to have a copy of 5.1, but not available yet in USA. The code I posted is the entire code. I only tested on a few symbols (SDS and SPY), and it crashes the same for each. Tried on a different computer and got the same thing. The code started bombing when I had more stuff in it, then I reduced to just the lines I posted, and it still dies. So then I saved to disk, reboot PC, reloaded code, and problem still occurs. Then tried on another PC, same problem. I will write up a ticket. Thanks for your quick response.
profile picture

angel57

#4
Forgot to mention, I am using 1 minute bars for the input data for SDS and SPY.
profile picture

Eugene

#5
Please include the strategy XML file, this is what we'd like to take a look as well. I can recollect a couple of bugs in 5.0 when an innocuous code was crashing WLP and the reason was in some technical information stored along with strategy code.

If you're using Windows XP, strategy file can be found here:
QUOTE:
C:\Documents and Settings\Windows User Name\Application Data\Fidelity Investments\WealthLabPro\1.0.0.0\Data\Strategies\
For Vista:
QUOTE:
C:\Users\Windows User Name\AppData\Roaming\WealthLabPro\1.0.0.0\Data\Strategies\

profile picture

Eugene

#6
As we've closed the Support Ticket, let's mark it here as well: on rare occasions, WLP 5.0 stores incorrect data in the Indicators tag of Strategy's XML file. If you experience crashes out of the blue with a simple code like above, navigate to the file and remove that tag. This is fixed in 5.1.