Exit all positions on friday
Created at 07 Jul 2022, 07:43
Exit all positions on friday
07 Jul 2022, 07:43
Hi All,,
Since the market is closed on the weekend , how do we exist all opened positions on Friday at the end.??
PanagiotisCharalampous
07 Jul 2022, 08:28
Hi Alfie,
You can try something like this
if (Server.Time.DayOfWeek == System.DayOfWeek.Friday && Server.Time.TimeOfDay > TimeSpan.ParseExact("21:00", "hh\\:mm", null)) { foreach (var position in Positions) position.Close(); }
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous