When using if (State == State.Historical) return; that will prevent historical trades, when you start the strategy without historical trades it will immediately trade as soon as it enters realtime if your condition is true which it was. When you don't use this condition the strategy will place historical trades and will start differently because it may or may not be in a historical position when entering realtime.
In regard to your latest post I am not sure what you are asking in relation to the code.

Comment