Login Page - Create Account

Support Board


Date/Time: Sun, 26 Oct 2025 04:17:13 +0000



MAX function in alert condition not working

View Count: 37

[2025-10-22 20:56:10]
tecman240 - Posts: 17
I'm working on an alert using the MAX function. My understanding of the docs is that spreadsheet functions like MAX can be used in alert conditions.
Comparing the MAX to a number doesn't work:
= AND(ID7.SG1<ID7.SG1[-1], MAX(ID7.SG1[-1:-6])> 85.1)

but comparing MAX to a study subgraph value works:
= AND(ID7.SG1<ID7.SG1[-1], MAX(ID7.SG1[-1:-6])> ID7.SG1)

What is the correct syntax to compare MAX to a number?

thanks for the help.
[2025-10-22 21:37:17]
John - SC Support - Posts: 42557
We are not seeing any issue with this formula:
= AND(ID7.SG1<ID7.SG1[-1], MAX(ID7.SG1[-1:-6])> 85.1)

It works fine for us, although we changed the ID of the study and the value of 85.1 to match to real values in our own chart, but we get proper results of False (0) and True (1).

There must be something about the specific data that is causing you this issue. Break it down and work with it one bit at a time to see where you may be having an issue.
For the most reliable, advanced, and zero cost futures order routing, use 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