Does the python script run once a minute or does the script constantly run being processed once a minute? The reason I ask is variable storage. Can you store a variable to be used the next time the program is run? If so how do you do this?
Does the python script run once a minute or does the script constantly run being processed once a minute? The reason I ask is variable storage. Can you store a variable to be used the next time the program is run? If so how do you do this?
Hello Eric,
I don't fully understand your questions, but here's a shot...
Attached, you'll find an example in which context.trading_days is initialized to zero at the start of the backtest, and then incremented by one upon every handle_data completion.
I don't know of a way to save a value to be used when the backtest is run again. You'll probably need to do this manually, via copy-and-paste back into the algorithm code.
Grant