Confused about Trading Hours
Created at 04 Aug 2020, 14:41
Confused about Trading Hours
04 Aug 2020, 14:41
private bool IsTradingHours()
{
if (Server.Time.DayOfWeek == DayOfWeek.Friday && Server.TimeInUtc.TimeOfDay > new TimeSpan(20, 0, 0))
{
return false;
}
return true;
}
Hi,
I don't want my robot to trade near closing hours every friday both in live and backtesting. Is the code above the best way to deal with it where after 8PM Friday, no trade will be executed?
I find that when I'm back testing time is UTC +3. I trade with IC Markets.
Thanks,