2) in that case, if i have applied different TradingHours for the symbol in DataSeries Dialog, how can i find (with indicator) if current bar is inside Holiday according to it's original TradingHours template? I have started to code something like this, but i think it's not good way or even don't know how to complete it accurately. Any help?
bool isInsideHoliday = false;
foreach (KeyValuePair<DateTime, string> holiday in TradingHours.Holidays)
{
var target = holiday.Key;
if (Time[0] > target && Time[0] < target.AddDays(1) )
isInsideHoliday = true;
}
foreach (KeyValuePair<DateTime, PartialHoliday> holiday in TradingHours.PartialHolidays)
{
...
}

Comment