Login Page - Create Account

Support Board


Date/Time: Wed, 27 Nov 2024 04:56:42 +0000



Fridays on Chart

View Count: 412

[2023-06-09 18:10:02]
User377189 - Posts: 172
How do i get text or symbol on chart to show the day is Friday.
[2023-06-09 18:46:55]
John - SC Support - Posts: 36309
I know it sounds crazy, but there is not a way to get the text for the day of the week to display on the chart without writing a bit of code to do it, as the built-in studies work on numbers and not text. And even though you can enter text in the Spreadsheet, there is not a way to actually display it out.

The one option available is that you can view the Day of the Week as a number. If you enter the following formula in the Spreadsheet Formula study, you will get a value between 0 and 7, where 0 is Sunday and 7 is Saturday:
=WEEKDAY(TODAY())

You can then use the "Text Display for Study" to display that number somewhere more obvious.

Refer to the following:
Spreadsheet Formula

Text Display For Study
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2023-10-02 04:54:04]
j4ytr4der_ - Posts: 938
In case someone else comes across this and is thrown for a loop... with the WEEKDAY function, 0 is not Sunday, 1 is Sunday.

https://www.sierrachart.com/index.php?page=doc/SpreadsheetFunctions.html#WEEKDAY_Function

Returns an integer representing the day of the week for the given Serial DateTime Value. The return value will be in the range of 1-7 (1=Sunday, 7=Saturday). Returns #VALUE! if the given DateTime cannot be interpreted as a serial date value.

[2023-10-02 05:25:55]
j4ytr4der_ - Posts: 938
Oh and while I'm at it, I suppose I should answer the original question. You can display the date in text on a chart.

1. Set up a Spreadsheet Study.
2. In cell O2, put
=CONCATENATE(MONTH(J41),"/",DAY(J41),"/",YEAR(J41))
(This will give you the date as text which you can also display on your chart if you wish)
3. In cell P2, put
=IF(O3=2,"MON",IF(O3=3,"TUE",IF(O3=4,"WED",IF(O3=5,"THU",IF(O3=6,"FRI","WEEKEND")))))

Now add a Text Display study to your chart, and select the appropriate cell from your spreadsheet (you'll have to set its subgraph to Hidden as well in the Spreadsheet Study itself). And there you have it, a text label of the current day on your chart. It'll have a colon at the end of it but, gets the job done.
Date Time Of Last Edit: 2023-10-02 05:59:02

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

Login

Login Page - Create Account