Login Page - Create Account

Support Board


Date/Time: Mon, 03 Mar 2025 22:20:43 +0000



[Programming Help] - How can I use the

View Count: 634

[2021-11-05 01:35:52]
User854802 - Posts: 43
Hi

I am trying to figure out what formula I need to customize the "color background on alert condition" so that I can put a highlighted background for Mondays. So I can apply it to my 1H chart and I can easily see when each week starts.

I have attached an image of what I am trying to achieve.

Thanks for any help!
imageScreenshot_1.jpg / V - Attached On 2021-11-05 01:35:08 UTC - Size: 628.04 KB - 147 views
[2021-11-05 13:03:21]
Sawtooth - Posts: 4179
Use this formula:
=WEEKDAY(BARDATE)=2

https://www.sierrachart.com/index.php?page=doc/SpreadsheetFunctions.html#WEEKDAY_Function
Study/Chart Alerts And Scanning: Available Main Price Graph Identifiers/Variables
[2021-11-06 00:02:20]
User854802 - Posts: 43
Thank you so much Tom!

It is working. Now I guess it was my fault for not phrasing it correctly. But I am curious now how I can get it be not exactly Mondays from 12am-11:59pm, but rather the first futures trading day of the week.

So have it shade from Sunday 6pm EST (market open) to Monday 5pm ET (market close).

Would greatly appreciate if anyone has a suggestion for how to program the shading based on that condition.

Thanks again
imageScreenshot_1.jpg / V - Attached On 2021-11-06 00:00:02 UTC - Size: 523.9 KB - 157 views
[2021-11-06 02:16:11]
Sawtooth - Posts: 4179
Use this formula:
=OR(
AND(BARTIME>=TIMEVALUE("18:00:00"),WEEKDAY(BARDATE)=1),
AND(BARTIME<TIMEVALUE("17:00:00"),WEEKDAY(BARDATE)=2))
[2021-11-06 20:43:38]
User854802 - Posts: 43
Works great! Thanks

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

Login

Login Page - Create Account