Everyting compiles just fine. I guess I'm not sure where I'm supposed to place each part of the code. The defaults go stat.setdefaults, but what about the rest of it?
Here is what I added as defaults:
//Trading Time Filter #1 StartTime1 = DateTime.Parse("06:00", System.Globalization.CultureInfo.InvariantCulture) ; EndTime1 = DateTime.Parse("07:15", System.Globalization.CultureInfo.InvariantCulture) ; //Trading Time Filter #2 StartTime2 = DateTime.Parse("08:35", System.Globalization.CultureInfo.InvariantCulture) ; EndTime2 = DateTime.Parse("10:00", System.Globalization.CultureInfo.InvariantCulture) ;
This is what I added for bools:
bool TradeBlock1 = ((Times[0][0].TimeOfDay > StartTime1.TimeOfDay) && (Times[0][0].TimeOfDay < EndTime1.TimeOfDay)); bool TradeBlock2 = ((Times[0][0].TimeOfDay > StartTime2.TimeOfDay) && (Times[0][0].TimeOfDay < EndTime2.TimeOfDay));
And then this is what I had for my logic:
// If not between start and end time return if (!TradeBlock1 && !TradeBlock2) { return; }
Any help to get this functioning is greatly appreciated
Comment