Support Board
Date/Time: Wed, 15 Jan 2025 22:44:41 +0000
L > ID1.SG1 20 Bars Back
View Count: 2074
[2017-09-21 13:42:44] |
infpz - Posts: 826 |
Hello, if I want to be notified when the low of bar has been greater than ID1.SG1 for 20 bars back, how would I code that without something like the below? AND(L[-20]>ID1.SG1[-20],L[-19]>ID1.SG1[-19],L[-18]>ID1.SG1[-18], L[-17]>ID1.SG1[-17],L[-16]>ID1.SG1[-16],L[-15]>ID1.SG1[-15],L[-14]>ID1.SG1 [-14],L[-13]>ID1.SG1[-13],L[-12]>ID1.SG1[-12],L[-11]>ID1.SG1[-11],L[-10]>ID1.SG1[-10], L[-9]>ID1.SG1[-9],L[-8]>ID1.SG1[-8],L[-7]>ID1.SG1[-7],L[-6]>ID1.SG1[-6], L[-5]>ID1.SG1[-5],L[-4]>ID1.SG1[-4],L[-3]>ID1.SG1[-3],L[-2]>ID1.SG1[-2],L>ID1.SG1) Date Time Of Last Edit: 2017-09-21 13:43:31
|
[2017-09-21 16:15:37] |
Sawtooth - Posts: 4153 |
You could shorten it by using the MIN function: =L>MIN(ID1.SG1[-20]:ID1.SG1) Date Time Of Last Edit: 2017-09-21 17:17:51
|
[2017-09-21 16:19:41] |
infpz - Posts: 826 |
The : function is what I was missing - thanks Tom as always. PZ
|
[2017-09-21 16:31:48] |
Sawtooth - Posts: 4153 |
Actually you'll need to use this instead: =L>MIN(ID1.SG1[-20],ID1.SG1[-19],ID1.SG1[-18],ID1.SG1[-17],ID1.SG1[-16],ID1.SG1[-15], ID1.SG1[-14],ID1.SG1[-13],ID1.SG1[-12],ID1.SG1[-11],ID1.SG1[-10], ID1.SG1[-9],ID1.SG1[-8],ID1.SG1[-7],ID1.SG1[-6],ID1.SG1[-5], ID1.SG1[-4],ID1.SG1[-3],ID1.SG1[-2],ID1.SG1[-1],ID1.SG1) The MIN and MAX functions in Simple Alerts do not do ranges. Date Time Of Last Edit: 2017-09-21 17:17:42
|
[2017-09-21 16:36:31] |
infpz - Posts: 826 |
OK, but this refers only to he current bar low, right? I need to check if the low of the bar X bars back was above ID1.SG[-X]. So it seems like I have to use my text above, which unfortunately does not fit in the alert field. |
[2017-09-21 17:51:42] |
Sierra Chart Engineering - Posts: 104368 |
Ranges of Subgraph values and main price graph values will be supported in an upcoming release. For now you need to use the Spreadsheet System/Alert study: Spreadsheet Systems, Alerts and Automated Trading Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |
[2017-09-21 17:58:56] |
Sawtooth - Posts: 4153 |
In that case, because of the 375 character limit of Simple Alerts, you'll need to use a spreadsheet study with a formula like this: =AND(D23>ID1.SG1@23,D22>ID1.SG1@22,D21>ID1.SG1@21,D20>ID1.SG1@20,D19>ID1.SG1@19,D18>ID1.SG1@18,D17>ID1.SG1@17,D16>ID1.SG1@16,D15>ID1.SG1@15,D14>ID1.SG1@14,D13>ID1.SG1@13,D12>ID1.SG1@12,D11>ID1.SG1@11,D10>ID1.SG1@10,D9>ID1.SG1@9,D8>ID1.SG1@8,D7>ID1.SG1@7,D6>ID1.SG1@6,D5>ID1.SG1@5,D4>ID1.SG1@4,D3>ID1.SG1@3)
To copy, triple click to highlight all of it. (Or you could use 20+ spreadsheet columns, each with shorter formulas.) |
[2017-09-21 18:05:17] |
infpz - Posts: 826 |
Great - thanks all.
|
To post a message in this thread, you need to log in with your Sierra Chart account: