i made a sample strategy, please chek this. When the strategy run, it changes the value of AccountCash only once with 50000.
Reproduce:
- Change Fast property: Min = 9, Max = 10, Increment = 1
- Do NOT change AccountCash.
- Run Optimization
Because of the settings, it will run twice.
Result in Output window:
Initialize: 150000
Initialize: 150000
OnStartUp: 150000
OnBarUpdate: 200000
OnTermination: 200000
-------------
Initialize: 150000
Initialize: 200000
OnStartUp: 200000
OnBarUpdate: 250000
OnTermination: 250000
-------------
It can be seen that at second run the setting value will not be 150000, but 200000 wich is the result of the previous run.
Tamas


Comment