I am wondering if there is a way to set a variable to exclude holidays from my strategy. I currently use the following for holidays in C# -
if(Position.MarketPosition == MarketPosition.Flat && ToDay(Time[0]) == 20160101)
return;
This works but requires me to code this for every holiday/days i dont want the strategy to operate.
I am wondering if anyone has code that I can set this via a calendar picker as a variable when deploying the strategy.