I have a class level int where I store a calculation that is done in OnStartUp.
When I try to use the variable in OnBarUpdate it has reverted to zero. I put the identical print statement in both OnBarUpdate and OnStartUp and get two different values. The only place the variable is set is in OnStartUp.
Any ideas what I am doing wrong?
Best Regards,
Scott
From the print statements
OnStartUp
Bars count 2548
last bar in sample 2038
OnBarUpdate
Current bar 20 3/27/2011 7:45:00 PM
last bar in sample 0

Comment