How to avoid Strategy execution every time I change settings like timeframe, data range, position size?
Author: Serebrennikov
Creation Date: 10/14/2015 12:44 AM
profile picture

Serebrennikov

#1
Every time when I change strategy's parameter, strategy starts, and my pc hangs all the time. How can I start the strategy only by pushing button "Go"?
profile picture

Eugene

#2
Please follow suggestions in the FAQ | Strategies and WealthScript...

How to keep Strategy from executing when I drag a Strategy parameter slider?

...or in our Knowledge Base:

WealthScript Techniques | Don't execute Strategy on open


P.S. Data collection takes time. Don't forget to disable on demand data update and keep your data up to date.
profile picture

Serebrennikov

#3
QUOTE:
This convenient feature is by design and applies to single-symbol backtests only. Consequently, if you click on DataSet title to switch to multi-symbol mode before changing a parameter, the strategy will not re-execute.

To keep a specific ChartScript from executing right after it is opened, in Wealth-Lab Developer/Pro V4 you were placing {$NO_AUTO_EXECUTE} in your ChartScript; usually at the top. Wealth-Lab Developer/Pro 6 lacks this directive.

It is not that I want
I want to change period, timeframe, position size, parameters
If I do something of these strategy starts. What for is the button "Go" then???
profile picture

Eugene

#4
QUOTE:
It is not that I want

Really? Your words were: "Every time when I change strategy's parameter..."

QUOTE:
I want to change period, timeframe, position size, parameters

And now this is different to what you asked before, don't you find it?

Changing "Scale", "Data Range", or "Position Size" will re-run the Strategy. There's no point to change them if you don't want immediate reaction. This behavior is by design and is not subject to change. If your PC "hangs all the time", your code efficiency may be suboptimal so you need to work on its improvement and follow my advice on data collection.

The Go button is there to execute an already compiled Strategy. Hence the "Run..." button is equivalent to "Compile" + "Go".
profile picture

Serebrennikov

#5
QUOTE:
"Really? Your words were: "Every time when I change strategy's parameter...""


In Russian all of these ( period, timeframe, position size, parameter) are strategy's parameters

I change Data Range and then want to Optimize and I need wait 30-40 s. It's very inconveniently
Think about it, please
I think it'll be good to use button "Go"
profile picture

Eugene

#6
In Wealth-Lab, Strategy Parameters is a term coined in the User Guide > Programming Trading Strategies > Strategy Parameters (a.k.a. Straps). I've edited the misleading topic title to better reflect your request.

We are not going to make changes to the way the program works just because someone's code is slow. If you're dissatisfied with your strategy's performance, you should either consider to program it in a more speed-wise manner or keep in mind that selecting from the dropdown lists should be made when you're about to execute a Strategy. Also when in testing mode, consider loading less data to speed up its processing and keep your data always up to date.
profile picture

Serebrennikov

#7
QUOTE:
The Go button is there to execute an already compiled Strategy. Hence the "Run..." button is equivalent to "Compile" + "Go".


There are 2 buttons when using Editor
And no button when use the whole Wealth-Lab
profile picture

Eugene

#8
As suggested in a related discussion, you might also want to:

1) make an intentional syntax error in your strategy and compile it, or
2) add a logic (e.g. using a "binary" Strategy parameter) to Abort() Strategy execution by default and only activate it when the Strap has been changed to the proper position

In other words, don't expect a Wealth-Lab's behavior to change (because it's a mature application). Instead, being a bit more creative pays off.
profile picture

Panache

#9
If you really want a Go button, put a message box at the beginning of your program.

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

Serebrennikov

#10
WOW, Super!
Thank you very much
You saved my time
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).