Login Page - Create Account

Support Board


Date/Time: Sat, 28 Dec 2024 07:26:52 +0000



[Programming Help] - Alert Condition for Greater than AND Less than

View Count: 1390

[2016-04-22 10:56:20]
devildriver6 - Posts: 3
I require an alert condition for colored bars, and cannot seem to get the coding correct.
Idea is as follows:

2 indicators, 3 settings....

ID:4.SG1
ID:4.SG2

ID:5.SG1

All formulas are based on the CLOSE of the bar, not H / L.
I might need 5 seperate instances of color bars based on alert condition, which I'm fine with...

Here are the different colors:

Bars are green when > all 3.
Bars are dark green when > ID:4.SG1 and > ID:4.SG2, but less than ID:5.SG1
Bars are blue when < ID4:SG1 and > ID4:SG2
Bars are dark red when < ID4:SG1 and < ID4:SG2, but > ID5:SG1
Bars are red when < all 3.
[2016-04-22 13:13:19]
Sawtooth - Posts: 4143
Try these,respectively:
=AND(C>ID:4.SG1,C>ID:4.SG2,C>ID:5.SG1)
=AND(C>ID:4.SG1,C>ID:4.SG2,C<ID:5.SG1)
=AND(C<ID:4.SG1,C>ID:4.SG2)
=AND(C<ID:4.SG1,C<ID:4.SG2,C>ID:5.SG1)
=AND(C<ID:4.SG1,C<ID:4.SG2,C<ID:5.SG1)
[2016-04-22 18:51:38]
devildriver6 - Posts: 3
That's PERFECT.

How do I save this as a set and apply to charts with other indicators already on that chart?
[2016-04-22 20:02:58]
Sawtooth - Posts: 4143
You can save this set but it would require that the other chart's indicators are using the same ID#s.

Here's how to save this set as a Study Collection:
1) Duplicate the chart, then focus the duplicated chart
2) Remove all studies except the 5 color bar studies
3) Give the Study Collection a name, check 'Prompt To Remove Existing Studies', click Save All.
4) Delete duplicated chart
5) To select the Study Collection, go to Analysis on the main menu.
Date Time Of Last Edit: 2016-04-22 21:32:55

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

Login

Login Page - Create Account