Login Page - Create Account

Support Board


Date/Time: Sun, 09 Mar 2025 20:38:45 +0000



Syntax error when combing alerts with OR Statement

View Count: 361

[2022-03-10 13:27:20]
User505884 - Posts: 11
When I'm running the following alerts on their own, they work perfectly fine:

Alert 1:
AND(C <= H, C >= ((H - L) * .80 + L), L < L[-1])

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

But, when I try to combine the 2 with a OR statement, I get a syntax error. I've tried now for hours and can't see the issue. Can someone please have a look and let me know where I'm going wrong?

Combined Alert:
AND(AND(C <= H, C >= ((H - L) * .80 + L), L < L[-1]), OR (AND(H <= H[-1], L >= L[-1])))
[2022-03-10 13:33:47]
Sawtooth - Posts: 4181
Put the OR in front:
=OR(AND(C <= H, C >= ((H - L) * .80 + L), L < L[-1]),AND(H <= H[-1], L >= L[-1]))

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

Login

Login Page - Create Account