Login Page - Create Account

Support Board


Date/Time: Tue, 26 Nov 2024 11:26:51 +0000



Color Bar Based On Alert Condition Question

View Count: 1216

[2014-05-07 20:57:16]
infpz - Posts: 826
Please see the attached image. There is a Difference - Single Line study being displayed on this ES chart as the main price graph. There is a MACD below which is based on the Difference study. The MACD is ID3.

What I want: The line is colored pink when the MACD (ID3.SG1) is below its signal line (ID3.SG2) and above the zero line (ID3.SG4) OR when the MACD (ID3.SG1) is above its signal line (ID3.SG2) and below the zero line (ID3.SG4).

Here is the forumla I am using:

=OR(AND(ID3.SG1<ID3.SG2,ID3.SG1>ID3.SG4), AND(ID3.SG1>ID3.SG2,ID3.SG1<ID3.SG4))

You'll notice the image has little pink blocks on it, like points. So, I think my code is working, but how do I make it so the line is actually colored pink, rather that just the pink blocks?
image1234.png / V - Attached On 2014-05-07 20:52:19 UTC - Size: 22.99 KB - 437 views
[2014-05-08 14:00:28]
infpz - Posts: 826
Bumping to the top for the Alert Code junkies out there...
[2014-05-08 15:44:45]
Sawtooth - Posts: 4120
It appears that your formula is correct, but that this is a draw style limitation.
It looks like the Draw Style is set to Left Hash.

However, If you set the Draw Style to Line, it won't give you what you want either.
The Color Bar study cannot draw an intermittent line because the Line draw style draws a connecting line from the last TRUE to the new TRUE.

The best you can do is to use Point or Dash or any non-connecting Draw Style.

[2014-05-08 15:50:47]
infpz - Posts: 826
I was afraid you'd say that. Thank you Tom.
[2014-05-08 18:20:55]
Sierra Chart Engineering - Posts: 104368

However, If you set the Draw Style to Line, it won't give you what you want either.
The Color Bar study cannot draw an intermittent line because the Line draw style draws a connecting line from the last TRUE to the new TRUE.
You can do an intermittent line by using Line - Skip Zeros for the Draw Style.

During our webinar, we encountered this very same issue when we set the Draw Style to Line. I recognize that and corrected it by using Line - Skip Zeros. We will update the documentation to indicate this.
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: 2014-05-08 18:21:50
[2014-05-09 17:13:03]
infpz - Posts: 826
Can you direct me to this documentation if it has been updated?
[2014-05-09 17:16:27]
Sierra Chart Engineering - Posts: 104368
The updated documentation is here:
http://www.sierrachart.com/index.php?l=doc/doc_TechnicalStudiesReference.html#s252

This is the section that was updated:
Set the Draw Style of the Color Bar Subgraph to be the same as the Subgraph of the other study you are coloring. In the case where you are coloring a study Line, it is recommended to use the Line-Skip Zeros Draw Style. Otherwise, the appearance of the line will not be correct.

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

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

Login

Login Page - Create Account