How to use DayOfWeek for omitting trades during specific days of the week
Created at 01 Mar 2018, 18:20
MA
How to use DayOfWeek for omitting trades during specific days of the week
01 Mar 2018, 18:20
hi,
would appreciate if someone can help me with how to set the day of week as parameter and then using it inside the onBar logic to "NOT TRADE on that day of week"
i tried this but it doesnt work.
[Parameter("nonTradingDay", DefaultValue = 0)] public int DoW { get; set; } protected override void OnBar() { if(Time.DayOfWeek != DoW) { //do not trade } }