Start of a new trading week?
Author: Humanbean
Creation Date: 2/8/2009 2:23 PM
profile picture

Humanbean

#1
Hello
Is there a way to know we are entering a new week?
For example...first trading day of a week and last trading day of the week etc.?

Thanks
profile picture

Cone

#2
CODE:
Please log in to see this code.
profile picture

Eugene

#3
A slightly different method which accounts for Black Swan type of weeks like 09/10/2001 and 09/17/2001:
CODE:
Please log in to see this code.
profile picture

Humanbean

#4
Thats perfect
Thanks to both of you.
profile picture

sedelstein

#5
I was looking for the last day of the trading week as I want to update some data to find symbols to trade on Monday

this works but is there perhaps a more efficient way to achieve the result?

CODE:
Please log in to see this code.


Thanks
profile picture

Eugene

#6
Sure there is:

CODE:
Please log in to see this code.


Community Components should be installed but no need in the "using" directive.

P.S. Note that it takes the actual last trading day of the week into consideration, whatever it may be e.g. Thursday.
profile picture

sedelstein

#7
Thanks!
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).