I’m really confused, here.
I have several variables being set within the GUI, using the standard code.
[Display(Name = "Parameter A", Description = "Set Parameter A", Order = 1, GroupName = "Parameters")]
public bool prmA
{ get; set; }
But, the program is ignoring the GUI settings and changing the variables back to their defaults every OnBarUpdate.
Here is the output from Output 1:
Start Time 1 = 4/10/2026 6:30:20 AM, Current Time = 4/10/2026 6:30:20 AM
Parameters active: A = True, B = True, C = False, D = True
Start Time 1 = 4/10/2026 6:30:20 AM, Current Time = 4/10/2026 6:30:20 AM
Parameters active: A = True, B = True, C = True, D = True
This is bothersome for two reasons: 1. OnBarUpdate seems to be running twice on the same bar, and 2. as you can see, Parameter C was false, as it was set in the GUI in this test case, but then, on the same bar and in complete opposition to the user settings, it changes Parameter C to true.
???