Login Page - Create Account

Support Board


Date/Time: Sat, 18 May 2024 12:47:36 +0000



[Programming Help] - color coded bars

View Count: 1128

[2018-04-03 23:41:35]
User28682 - Posts: 233
Hi,does SC have the ability to color code a bar or mark a bar?

ex: color or mark a bar on a chart if that bar closes in the top 25% of its range?

Thanks!
[2018-04-04 02:37:18]
Sierra Chart Engineering - Posts: 104368
Yes. Refer to:
Color Bar Based on Alert Condition
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
[2018-04-06 04:04:03]
User28682 - Posts: 233
Thanks, I would like to mark a bar when the previous bar closes in the lower 25% of its range(bar) AND the current bar closes
in the top 25% of its range. After looking at your examples, would this formula work:

(C[1]-L[1])/ABS(H[1]-L[1])< .25 AND (C-L)/ABS(H-L)> .75

so the marker or bar that gets color coded would be the second of the two bars in the test after all is true

If this formula is OK, would it go in the "input" on the main graph?

Thanks!
[2018-04-06 04:23:46]
Sierra Chart Engineering - Posts: 104368
For the proper use of the AND function, refer to:
https://www.sierrachart.com/index.php?page=doc/SpreadsheetFunctions.html#AND_Function

Here are the instructions to enter that formula for the main price graph:
Study/Chart Alerts And Scanning: To Enter an Alert Condition on the Main Chart/Price Graph
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
[2018-04-07 00:26:36]
User28682 - Posts: 233
So something more like this:

OR(AND(C[1]-L[1])/ABS(H[1]-L[1])< .25, AND (C-L)/ABS(H-L)> .75)

Thanks much!
[2018-04-07 05:58:24]
Sierra Chart Engineering - Posts: 104368
That does not look right. Try this:

= AND(C >= (H- ((H-L) * .25) ), C[-1] <= (L[-1] + ((H[-1]-L[-1]) * .25) ) )
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: 2018-04-07 05:59:09
[2018-04-08 04:19:59]
User28682 - Posts: 233
Thank you! It worked well.

I then tried to produce an alert for an inside bar:

current High is < previous bar high AND Low is > previous bar low

using:

= AND(H<H[-1],L>L[-1])

This doesn't work without getting an error message, any suggestions?

Thanks!
Date Time Of Last Edit: 2018-04-08 04:34:06
[2018-04-10 15:36:04]
User28682 - Posts: 233
Does my formula look right for an inside bar?

= AND(H<H[-1],L>L[-1])

Thanks again for your help!
[2018-04-12 17:00:09]
User28682 - Posts: 233
I'm not sure why, but I guess I may not get a response to my question above?

Thanks.

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

Login

Login Page - Create Account