The NT8 Help Guide indicates that the OnStateChange() if (State == State.SetDefaults) block should be kept "as lean as possible."
I cannot seem to find why this block of code's size has any special need to be small compared to the rest of a script. This get set logic is only loaded and processed once when the script is initialized. I am trying to make my strategies as efficient as possible, and this is just something that I have been wondering about.
All code should be as concise as possible, but should some these values be set elsewhere in the script like in if (Bar.IsFirstBarOfSession)? My scripts do not change the initial values of my property parameters outside of if (State == State.SetDefaults). Is there something specific to this state that is taxing on a computer's resources?
Thank you for any info.

Comment