WL6 hangs when clicking into Strategy Parameters Sliders
Author: Ben_Zurich
Creation Date: 9/6/2012 9:27 AM
profile picture

Ben_Zurich

#1
I don't know how and when this condition first occured but I can no longer click into the Strategy Parameters sliders without causing WL6 to hang.

Double clicking on a Strategy Parameter and typing in another value works well, however.

Optimizing works too.

I am using Visual C# and there are no breakpoints set.

What could cause this condition ?
profile picture

Eugene

#2
Show us the Strategy code, and we'll try to determine what went wrong.
profile picture

Ben_Zurich

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

Eugene

#4
There's nothing wrong with initializing the StrategyParameter[] arrays and filling them in runtime the way you do, I just double-checked. However, what happens during your Strategy execution is impossible for me to know: your 480 lines of code won't compile without 3rd party assemblies and then won't work without specific TXT/XML files. Anything can happen. When it hangs, break debugging and VS should take you right to the malfunctioning code routine.
profile picture

Ben_Zurich

#5
Thank you for your answer. The processing never reached my breakpoints, but I have found the reason anyway:

Clicking into the sliders causes the system to hang when the corresponding strategy parameter field "Step" equals to zero.

The optimizer, on the other hand, causes the system to hang when the corresponding strategy parameter field "Start" is greater than "Stop".

The Monte Carlo method apparently doesn't use the "Step" field, and that's why I have set it to zero and run into that problem.
profile picture

Eugene

#6
QUOTE:
Clicking into the sliders causes the system to hang when the corresponding strategy parameter field "Step" equals to zero.

Indeed, it will appear as "hung" but clicking "Cancel optimization" brings the system back to life, so no problem here.
QUOTE:
The optimizer, on the other hand, causes the system to hang when the corresponding strategy parameter field "Start" is greater than "Stop".

Exhaustive optimization? No, it's foolproof: will run once but will not hang.

You have a complex code (partially residing in external assemblies), and in this case I strongly suggest you to employ unit testing. When your code generates StrategyParameters, it can (and will) error out depending on input, so covering those procedures with unit tests could help troubleshoot this kind of code problems early.
profile picture

Ben_Zurich

#7
Thank you for the advice.

PS: The hanger while optimizing occured with Monte Carlo Optimization.
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).