Login Page - Create Account

Support Board


Date/Time: Mon, 13 May 2024 05:37:00 +0000



How to draw a vertical line at 3rd friday every month?

View Count: 1580

[2016-07-11 15:47:15]
BrMa - Posts: 77
Dear ladies and gentlemen,

I'm looking for a way to mark the 3rd friday of a month in a chart with daily bars to mark the expiration of options of the underlying.
The vertical grid does not seem to help me because I wouldn't like to have a vertical line e.g. every 21 days but really every 3rd friday. And I could not find any study helping me doing this.

Can you please help me out?
Thanks a lot in advance!

Regards, Markus
[2016-07-11 16:33:01]
Sierra Chart Engineering - Posts: 104368
There is no study available which does this.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2016-07-11 16:35:35]
Sierra Chart Engineering - Posts: 104368
We could add a study that will draw line at the specified Date but it would have to be a specific date and not something like the third Friday.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2016-07-11 16:38:22]
BrMa - Posts: 77
First of all, thank you very much for your fast reply!
Can I implement this functionality programming it in ACSIL? Just to be sure not to use my time for something impossible... ;-)

Regards, Markus
[2016-07-11 17:07:44]
Sierra Chart Engineering - Posts: 104368
Yes you can but it is easy enough for us to add. It would really be best for us to add this.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2016-07-11 18:19:57]
Sawtooth - Posts: 3995
You can do it with the Color Bar Based On Alert Condition study using this formula:
=BARDATE=(DATE(YEAR(BARDATE),MONTH(BARDATE),1+7*3)-WEEKDAY(DATE(YEAR(BARDATE),MONTH(BARDATE),8-6)))
Date Time Of Last Edit: 2016-07-11 19:02:05
[2016-07-12 06:30:09]
BrMa - Posts: 77
Looks good!
THANK YOU! :-)
Regards, Markus
[2016-07-12 12:32:10]
Sawtooth - Posts: 3995
If you'd rather have a vertical line, instead use the Color Background Based On Alert Condition study, with 'Use Vertical Line...' set to Yes.
[2016-07-12 13:16:01]
BrMa - Posts: 77
Dear togilb,

great hint - thank you! :-)
Regards, Markus
[2022-04-20 12:32:12]
user_xyz - Posts: 375
Tom - thanks for your contributions!

I've been using this alert to mark OPEX dates for some time and just realized this month OPEX 4/15 isn't printing, thoughts?
[2022-04-20 15:50:49]
Sawtooth - Posts: 3995
I've been using this alert to mark OPEX dates for some time and just realized this month OPEX 4/15 isn't printing, thoughts?
4/15 was a market holiday (Good Friday), so there was no Daily bar, hence no alert.

For this special situation, use this formula instead:
=IF(BARDATE=DATE(2022,4,14),1,BARDATE=(DATE(YEAR(BARDATE),MONTH(BARDATE),1+7*3)-WEEKDAY(DATE(YEAR(BARDATE),MONTH(BARDATE),8-6))))

This will mark the Thursday 4/14/2022 bar, plus the 3rd Fridays of other months.
Date Time Of Last Edit: 2022-04-20 19:36:17
[2022-05-04 20:48:29]
user_xyz - Posts: 375
Tom one more question if we wanted to mark quarterly OPEX cycles? Pls and thank you!
[2022-05-04 22:43:15]
Sawtooth - Posts: 3995
we wanted to mark quarterly OPEX cycles?
So you want to mark the last day of these months: Mar, Jun, Sep, Dec?
[2022-05-04 22:49:18]
user_xyz - Posts: 375
Yes. I'm assuming creating a new alert Color Background Based On Alert Condition for quarterly dates and change the order to display on top? Or if there is a way to add to existing keeping it all in one alert might be cleaner. I've found sometimes the easiest way (but creates clutter) is to just have multiple alerts.
Date Time Of Last Edit: 2022-05-04 22:50:35
[2022-05-05 03:32:21]
Sawtooth - Posts: 3995
I would use another instance of the color background study.

This formula will work for 2022:
=OR(
BARDATE=WORKDAY(EOMONTH(DATE(2022,3,1),0)+1,-1),
BARDATE=WORKDAY(EOMONTH(DATE(2022,6,1),0)+1,-1),
BARDATE=WORKDAY(EOMONTH(DATE(2022,9,1),0)+1,-1),
BARDATE=WORKDAY(EOMONTH(DATE(2022,12,1),0)+1,-1))

You'll need to edit the dates as needed.

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account