for developing my strategy further, now starting with the time filters, first of all, the days where no trades will be triggered.
That is for example the period between around christmas and new years eve, plus X, Dec.15th to Jan. 30th
to be set in the OnBarUpdate there is the function as follows, but how to take only the months and days? I have seen that there can be used C# time structures, but don´t know enough about it to program it.
protected override void OnBarUpdate()
{
// Compare the date of the current bar to Dec.15th to Jan.30th, but for every year, not only the actual year
if (ToDay(Time[0]) < "year"1215) && (ToDay(Time[0] > "year"0130)
{
// Do something
}
}

Comment