Optimization Parameter in WLD 6.1
Author: Assenzio
Creation Date: 1/16/2011 2:30 PM
profile picture

Assenzio

#1
I am trying to understand C# in WLD 6 (I am an old user of WLD 4). I wrote this simple script:

CODE:
Please log in to see this code.


My questions are:

1. Why I cannot see the parameters included in this script on the left of WLD 6 ?
2. How to optimize just one of the two variable (i.e. Uscita) at a time ?
3. Why if I try to optimize the script (just the Uscita variable, deleting the other ones) in Exhaustive mode the system need more than 5 hours to resolve when it work on just 10 years of data and with just 150 signals ?!?
4. If I don't delete the Entrata paramater it need less runs but the optimization, after reaching 100%, does not stop at all (time remaining 0 and elapsed still running) !?
5. Stopping (Cancel) the optimization. Then If I try to reoptimize WLD is not able to do it again, needs a lot of seconds of freezing then works again.
profile picture

Eugene

#2
1 - You're placing them in an inappropriate place. StrategyParameters (Straps) should be class level variables. Furthermore, the CreateParameter method should be called in the constructor of the class.

Check out this illustrative tutorial in the WealthScript Programming Guide: Programming Trading Strategies > Strategy Parameters.

2 - Currently, by removing a parameter from the Strategy Parameters box of the Optimization Control inside the Optimization tab. If memory serves, restoring the WL4-like functionality of enabling/disabling a parameter by using a checkbox is a registered feature request (Robert please correct me if I'm wrong).

3 - Probably because you're optimizing in Raw Profit mode? In this case, multiply the 250 parameter combinations by the DataSet symbol count. Switch to Portfolio Simulation mode, disable on demand data update (greatly speeds WL6 up in general if you keep your DataSets up to date), run the code below, do you still see it? What kind of DataSet you're running it on (symbols, bar scale, data provider)?

4, and 5 - Run the corrected code first:

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

Assenzio

#3
Everything clear and fine now, thank you.
profile picture

Assenzio

#4
One more thing ... why the IF needs : or ; ? How to access to the "bar" data value of Index ?

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

Eugene

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

1 - The IF clearly doesn't need a ":" here - in C#, that's a ternary operator. Could you clarify the question?
2 - Here's how:
CODE:
Please log in to see this code.
profile picture

Assenzio

#6
Damn ... I forget that the "problem" with C# is that it diversify among upper/lower cases! :) I wrote If (with a capital I) not if ... that's the problem.
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).