Executing some code only once while backtesting on
Author: andreanaldi
Creation Date: 10/24/2008 11:01 AM
profile picture

andreanaldi

#1
How can I execute some code only once at the beginning or at the end of the process of backtesting on a dataset ?
It could be useful for example to make an operation that must be done only once, like cleaning a database or opening a connection to a DB or calling an external process.
A
profile picture

Cone

#2
Use a boolean variable in the WealthScript-derived class. Example in Eugene's code here.
profile picture

Eugene

#3
Could this work (untested)?

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

andreanaldi

#4
Works fine.

Thank you.
A
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).