Login Page - Create Account

Support Board


Date/Time: Tue, 03 Jun 2025 06:36:07 +0000



Time Line study and custom text label background color

View Count: 134

[2025-05-29 12:46:44]
tokauo - Posts: 42
Hello,
I'm trying to have full colored background and white text in Time Line study, but custom text label subgraphs is not reacting to "label" background color option (next to Auto coloring). Is possible to color background?

Thanks you
Tom
[2025-05-29 13:43:33]
John - SC Support - Posts: 40170
The text that is displayed with the Time Line study is actually a drawing, it is not the Name or Value label. As such, there is no control to allow for a background with text through the subgraphs.

The only way to get what you are wanting would be to modify the source code for the study and setup the drawing as you want it. The code is in the Studies2.cpp file in the ACS_Source folder under your main Sierra Chart installation folder.

Refer to the following:
How to Build an Advanced Custom Study from Source Code

Using Drawing Tools From an Advanced Custom Study: s_UseTool::ReverseTextColor

https://www.sierrachart.com/index.php?page=doc/SierraChartStudyAndSystemProgrammers.php
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2025-05-29 13:52:48]
tokauo - Posts: 42
OK, thanks you.
Is there a study/way that would allow to have a box (with text or without) pinned to the timeline (like the label from the Time Line study) with ability to be shown at time range (e.g. from 9:30-10:00)?
[2025-05-29 16:01:14]
John - SC Support - Posts: 40170
There are a number of ways to have an indicator that would be near the time axis that gives a visual representation for a certain time period. The simplest would be to use the "Spreadsheet Formula" and use a formula like the following to show the bars between 09:30 and 10:30 (including 09:30 and excluding 10:30):
=AND(BARTIME >= TIME(09, 30, 00), BARTIME < TIME(10, 30, 00))

Then set the Input for "Draw Zeros" to "No" and set the subgraph Draw Style to whatever works best for you. Also make sure the study is in the lowest region and then adjust the region height to get it displayed as you want.

You might also want to remove the display of the study name and parameters, so you just see the line, bar, whatever.

Refer to the following:
Spreadsheet Formula

Study/Chart Alerts And Scanning: Available Main Price Graph Identifiers/Variables

Chart Studies: Subgraphs Tab >> Draw Style
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2025-05-30 17:37:01]
tokauo - Posts: 42
Thanks you, it is great!
Is there way to have box in forward projection area (I mean drawn forward)?

I've tried to use "Text with background", if I type "TEST" into "Text to draw" it shows !TTTTTTTTTTTTTTTTTTTTTTTTTTEST" and box overlap time range from formula, is it posible to fix it like: to have text centered (without box overlaping time range from formula) and without extra letters (I found out that if I type 2x spacebar before and after text a line of "TTTT..." disapear)?

Thanks you
Date Time Of Last Edit: 2025-05-30 18:32:56
[2025-05-30 18:41:47]
John - SC Support - Posts: 40170
Is there way to have box in forward projection area (I mean drawn forward)?

There is not a way to do this using the built-in tools. It would require a modification of an existing study or a new study to specifically put the information into the forward projection area.

I've tried to use "Text with background", if I type "TEST" into "Text to draw" it shows !TTTTTTTTTTTTTTTTTTTTTTTTTTEST" and box overlap time range from formula, is it posible to fix it like: to have text centered (without box overlaping time range from formula) and without extra letters (I found out that if I type 2x spacebar before and after text a line of "TTTT..." disapear)?

The reason this does not work is that it is trying to put that text for every bar. There is no option for the solution we gave above, to have text centered across the time frame as you want it.

The only way to do something like this would be to use the "Type Text" tool to draw the text as you want and where you want. Refer to the following:
Chart Drawing Tools: Type Text | Stationary Text
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2025-05-30 22:09:29]
User688525 - Posts: 291
Hi John,
As the text of the Time Line study is a drawing, is this why the text looks different to the text of a label or value? I've noticed the Time Line study text is bold, or thicker, than label or value text.

If a custom study is created from the source code, is there a way for the text to be the same as a label or value?

Thank you
[2025-05-31 08:55:34]
tokauo - Posts: 42
There is not a way to do this using the built-in tools. It would require a modification of an existing study or a new study to specifically put the information into the forward projection area.

OK, thanks you.

For anyone else, who would like to do this as well, I have used a "Time Range Highlight" study with "Display in forward projection area" in the 2nd region of chart, than I disabled "Adjust Regions Tool Always Active with Current Tool" in Tool settings so as I can not to accidentally move the region.

One problem is, that it looks like if region include study, there is an minimal high (about 5px) or padding etc. (I've already tried to play with region data lines - it didn't help)?
Is there way to make region height (let's say extremely) 1px?

Thanks you
Date Time Of Last Edit: 2025-05-31 11:22:48
[2025-06-02 13:40:05]
John - SC Support - Posts: 40170
As the text of the Time Line study is a drawing, is this why the text looks different to the text of a label or value?

Yes.

If a custom study is created from the source code, is there a way for the text to be the same as a label or value?

You would have to set the font information as you want it. Refer to the following:
Using Drawing Tools From an Advanced Custom Study: s_UseTool::FontSize
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2025-06-02 13:42:23]
John - SC Support - Posts: 40170
One problem is, that it looks like if region include study, there is an minimal high (about 5px) or padding etc. (I've already tried to play with region data lines - it didn't help)?
Is there way to make region height (let's say extremely) 1px?

We are not certain exactly what you are asking, but there is not a way to set a region to be an exact number of pixels. The ACSIL function for setting the size of a region does it by percentage. Refer to the following:
ACSIL Interface Members - Functions: sc.SetGraphRegionHeightPercentage
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2025-06-02 14:39:27]
tokauo - Posts: 42
We are not certain exactly what you are asking, but there is not a way to set a region to be an exact number of pixels. The ACSIL function for setting the size of a region does it by percentage. Refer to the following:
ACSIL Interface Members - Functions: sc.SetGraphRegionHeightPercentage

If you take a lok at screenshot I have attached. I added "Time Range Study" to region 2 (at time from 0:00 to 12:00 - dark gray line) to highlight that time range, I would like to have this line thinner (I don't need exact pixels, just thinner line), but I can't push region 2 any lover (it is even impossible to hide it by draging top line down). So... is there any settings that controls minimum height of region or anthing that is blocking me from pushing it lover?

Thanks you

https://www.sierrachart.com/image.php?Image=1748874401719.png
[2025-06-02 16:19:50]
John - SC Support - Posts: 40170
We are a bit confused by this statement: "but I can't push region 2 any lover (it is even impossible to hide it by draging top line down)."

We tried this with a Time Range Highlight and the region can be set small enough that nothing is visible. So you should be able to do this on your system. There are no settings that control the smallest height of a region. This is controlled internally and it looks like it is 2 or 3 pixels.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2025-06-02 17:09:06]
tokauo - Posts: 42
We are a bit confused by this statement: "but I can't push region 2 any lover (it is even impossible to hide it by draging top line down)."

It means that high of region 2 represented by dark line of "Time Range Study" can not be (I can not make) thinner - than it is on image I posted above.

(I'm sorry) I forgot to mention that I have set Chart > Regions > Region Number 2 (List) to "Hidden", to get rid of extra blank space (for Header?) at top of region 2...
If I set it back to Visible... than yes... study of region 2 can be hidden, but there is still free space at top of region 2 (for Header?)... so it basically means, that for some reason, if there is an study, I have always some space of chart occupied by region 2 and it can not be pushed completely down like there is not region 2.
If it is not right, what can I try or look for? (I already tried that on new chartbook)

Thanks you
[2025-06-02 21:13:20]
John - SC Support - Posts: 40170
There is nothing further you can do. There is always going to be a bit of space for the header for the region, even if nothing is displayed in it.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing

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

Login

Login Page - Create Account