Support Board
Date/Time: Fri, 04 Jul 2025 15:45:16 +0000
Study Line Color Based On Values
View Count: 1601
[2016-08-10 04:46:35] |
User147461 - Posts: 33 |
I've searched the Support Board for a code example with no luck. Here is what I'm trying to code: My study produces a signal line that oscillates between a low value of 0 and a high value of 100. I want to color the signal line green when the value is <= 20, red when >= 80 and gray when > 20 and < 80. How do I change the signal line color using 3 different colors with ACSIL? Thank you! |
[2016-08-10 06:04:13] |
|
This is controlled through sc.Subgraph[].DataColor: ACSIL Interface Members - sc.Subgraph Array: sc.Subgraph[].DataColor[] 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-08-10 16:54:28] |
User147461 - Posts: 33 |
Thanks for the link! Got it working. if (SignalLine[sc.Index] > OverBoughtInput.GetFloat() && OverBoughtInput.GetFloat() != 0) SignalLine.DataColor[sc.Index] = OverBoughtColor.GetColor(); else if (SignalLine[sc.Index] < OverSoldInput.GetFloat() && OverSoldInput.GetFloat() != 0) SignalLine.DataColor[sc.Index] = OverSoldColor.GetColor(); else SignalLine.DataColor[sc.Index] = SignalLine.PrimaryColor; |
To post a message in this thread, you need to log in with your Sierra Chart account: