I would like to test whether any given datetime is within a session defined in the Session Template for the instrument in context - whether that be the current session, or in the future.
For example:
ES futures use the session template 'CME US Index Futures ETH'.
If today is November 2, 2020 at 3:00 CST, and I pass in a date of November 3, 2020 3:30 CST to IsInSession(), I would expect it to evaluate to 'True'
If I pass in date Firday January 1, 2021 10:00 AM CST, IsInSession() should return 'False' because this is New Year Day.and markets are closed according to the NT8 Holiday calendar
Is this how InSession() works? It's not conclusively clear which session and holiday the datetime given is being compared to.
tia
Comment