Login Page - Create Account

Support Board


Date/Time: Fri, 10 May 2024 03:00:00 +0000



Bar Numbering Colour

View Count: 731

[2021-02-17 18:36:55]
User202740 - Posts: 12
Hi, is there any option to colour the numbers of the bar numbering study? For instance, Colour the numbers in red each 6 candles...
[2021-02-17 19:14:00]
John - SC Support - Posts: 31509
There is no easy way that we can think of to do this. You might be able to program something to work using the Spreadsheet Study, but we cannot think of how this could be done offhand.

There are two issues you have to deal with: 1) How to program the number of bars - a Modulo function could be used to easily do this, but this is not available in either the Alerts or Spreadsheets; 2) How to get the different colors - The Color Bar Based on Alert Condition study will not work in this situation, so you would have to have 2 different subgraphs and determine when to use one over the other.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2021-02-19 21:20:06]
Sierra Chart Engineering - Posts: 104368
The Bar Numbering study does use a Subgraph and you can color each element at each chart bar a different color:
ACSIL Interface Members - sc.Subgraph Array: sc.Subgraph[].DataColor[]

Refer to:
How to Build an Advanced Custom Study from Source Code
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
Date Time Of Last Edit: 2021-02-20 14:27:36
[2021-02-19 23:19:34]
Sawtooth - Posts: 3993
You can do it with this combination of studies, in post #8:
how to re-color every x bars?

Then in the Color Bar study settings:
- Set the 'Based On' to the Bar Numbering study
- Set the 'Output When Condition True' to 'Use Input Data'
- Set the 'Input Data' to 'Number'
- On the Subgraphs tab, set the DrawStyle to Value On Low

If you want all of the bar numbers, unHide the Bar Numbering study.
In this case, the Color Bar study must be below the Bar Numbering study in the Studies to Graph list.
[2021-02-20 00:05:02]
User202740 - Posts: 12
Thank you so much for both replies.

To Sierra Chart Engineering: I don't have any programming skills so if you can add the necessaries lines to the original code I would be appreciated.

To tomgiilb: I have just tried out your method and it worked :) But the result is identical to the "Bar Numbering" study. I want the result as the attached image, only specific numbers in colour while the rest remains the same.
imageupload.PNG / V - Attached On 2021-02-20 00:03:31 UTC - Size: 257.92 KB - 178 views
Attachment Deleted.
[2021-02-20 01:46:42]
Sawtooth - Posts: 3993
UnHide the Bar Numbering study and the others will be there.
Just be sure the Color Bar study is below the Bar Numbering study in the Studies to Graph list so that the Color Bar study overpaints its color.

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

Login

Login Page - Create Account