I am trying to have an option to toggle between IsExitOnSessionCloseStrategy = true/false, and check whether strategy performs better intraday (with ExitOnSessionClose) or swing (without ExitOnSessionClose).
I am using this code in State == State.SetDefauls
SXOSCBool = false; // Bool to toggle between ExitOnSessionClose SXOSCMin = 15; // integer for minutes that are multiplied by 60 to get seconds.
if (SXOSCBool) // Bool to toggle between ExitOnSessionClose
{
IsExitOnSessionCloseStrategy = true;
ExitOnSessionCloseSeconds = SXOSCMin*60; // integer for minutes that are multiplied by 60 to get seconds.
}
if (! SXOSCBool)
{
IsExitOnSessionCloseStrategy = false;
}

Comment