How to get the last trading day

cybedard

New member
Joined
Sep 10, 2019
Posts
3
Likes
0
Hi all
I'm programming my own study. How do you get the last trading day for a specific instrument, considering weekends and banking holidays?
Thx
 

Spin

Well-known member
Joined
May 22, 2019
Posts
477
Likes
191
The last trading day is always the last day you get data for from your broker / data-feed.

So perhaps this might help ?
getStartOfPrevDay to get the beginning of the last day and getStartOfDay (minus one milisecond) to get the end
 
Top