I am trying to do some date calculations on bars to track time periods for an indicator.
I created a class to do the work, and as a part of the class I need to hold some state for prior bar information.
My question is, where do I instantiate this class? My thought is State.Configure or State.SetDefaults, but Im not sure. I know I cant do it on bar update because it will be constantly instantiating a new class and thus I can't hold state.
thanks.
Comment