Support Board
Date/Time: Sun, 24 Nov 2024 01:42:21 +0000
Time-based condition alert
View Count: 178
[2024-07-11 19:42:01] |
ppoignot - Posts: 10 |
Hello ! I have an alert condition with this code, which looks to see if SG1 is <= to -18 on the 5th previous period. But, I want the alert to trigger if SG1 is, at least once <= to -18 over the last 5 periods. Can you help me? Thanks ! AND(CROSSFROMBELOW(ID18.SG1, ID18.SG2),MIN (ID18.SG1[-5]) <= -18) |
[2024-07-11 21:48:51] |
John - SC Support - Posts: 36238 |
We are confused by the "CROSSFROMBELOW()" that you have in what you posted. That does not make any sense with the test that a value is less than -18. An alert to test if any of the last 5 items is less than -18 would look like the following: =OR(ID18.SG1[-5] < -18, ID18.SG1[-4] < -18, ID18.SG1[-3] < -18, ID18.SG1[-2] < -18, ID18.SG1[-1] < -18) In this case the current bar (ID18.SG1 or ID18.SG1[0] if you prefer) is not being tested, if you want it you would need to add it to the list. 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: