How to clear Variables (need manual rerun of Strategy)
Author: TCust
Creation Date: 6/14/2011 2:18 PM
profile picture

TCust

#1
Hello

I have many variable's, and if I change Slider in Strategy Parameters, many variables not clear ( before recalculate ) and add new value and save old value.

If we have many (count) variable's x++; or array's, Strategy not correct recalculate, need manual Run the Strategy for clear variable's and correct recalculate with new Slider value.

How correct clear variable's in code?

I create varibles in:

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

Eugene

#2
That's exactly because of defining the variables at class level:
CODE:
Please log in to see this code.

Define them in the Execute() method body if you don't want them to persist between strategy runs.
profile picture

TCust

#3
Ok Thanks :)

Correct code with (count) variable's for clear and other...

CODE:
Please log in to see this code.
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).