Login Page - Create Account

Support Board


Date/Time: Wed, 01 May 2024 22:48:41 +0000



Combing AND,OR functions in alert

View Count: 806

[2016-09-27 09:46:38]
User842703 - Posts: 55
I'm trying to create an alert condition to colour background using the following conditions:

=AND (ID21.SG1 < ID21.SG2, ID11.SG1[0] <= ID11.SG1[-5], ID11.SG1[-5] <= ID11.SG1[-10]) - both conditions to be true plus one of the following:

=OR (ID20.SG1[0] <= ID20.SG1[-5], ID20.SG2[0] < ID20.SG2[-1])

which work fine on their own but when trying to combine them using a number of different configurations - inserting commas, removing the = sign, nothing seems to work.

I can't find any examples in the documentation - is there any way to to do this?

Edit - I think I've found the solution by just leaving them like this and not combining them
Edit 2 - although this doesn't give an error message it doesn't give a true result so original query about combining them still valid
Date Time Of Last Edit: 2016-09-27 10:15:35
[2016-09-27 12:56:09]
jackw - Posts: 57
=AND(
AND (ID21.SG1 < ID21.SG2, ID11.SG1[0] <= ID11.SG1[-5], ID11.SG1[-5] <= ID11.SG1[-10])
,
OR (ID20.SG1[0] <= ID20.SG1[-5], ID20.SG2[0] < ID20.SG2[-1])
)

This will return true if all the conditions in your AND statement are true, and one of the conditions in your OR statement is true.
[2016-09-27 16:23:14]
User842703 - Posts: 55
Thanks, that works.

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

Login

Login Page - Create Account