Is it possible to reset to default values private variables with public access modifier set in #region properties, whose values have been changed throughout the code?
I mean if for instance a private int with a public access modifier with original value of 2 set in State.SetDefaults. If later in OnBarUpdate this value is changed to 3. Is there a way to make it reset to default (2), or another variable needs to be created to store the original value to then restore it?
Also, if the above variable has been changed throughout the code OnBarUpdate to 3 and it calculates OnBarClose, when a new bar elapses, will the value of this private variable with public access be again 2 (the default value) or it will remain 3 (so it's not affected by its default value set on State.SetDefaults).
Thanks in advance!
Comment