Support Board
Date/Time: Sat, 23 Nov 2024 15:48:25 +0000
[Programming Help] - programming simple alert
View Count: 372
[2024-06-17 22:05:05] |
User653934 - Posts: 28 |
I want an alert on all my small time frame charts that goes off when the vwap and 9ema are =. I get a SYNTAX error when I try to program. It's about as clear as mud to me how to do this simple alert. Can anyone help?
Date Time Of Last Edit: 2024-06-17 22:05:46
|
[2024-06-18 02:31:52] |
Sawtooth - Posts: 4118 |
I want an alert on all my small time frame charts that goes off when the vwap and 9ema are =
Use a formula like this: =ID1.SG1=ID4.SG1 where ID1 is the 9EMA and ID4 is the VWAP However, it is unlikely that they would ever be exactly equal. You could use this formula to get an alert if they are within 1 tick of each other: =ABS(ID1.SG1-ID4.SG1)<TICKSIZE Note: Some spreadsheet functions work in Alert syntax. https://www.sierrachart.com/index.php?page=doc/SpreadsheetFunctions.html#ABS_Function Study/Chart Alerts And Scanning: Available Main Price Graph Identifiers/Variables |
[2024-06-18 12:14:58] |
User653934 - Posts: 28 |
I'll go to work on it. Thank you.
|
[2024-07-31 21:16:43] |
User653934 - Posts: 28 |
I'm still getting syntax error. Do I put the 9EMA-Avg where the SG1 is? SC says I can use the unique identifier to the right of the Study. S_ID:27 for instance, but it sets off an alert every bar....
|
[2024-07-31 21:21:49] |
Sawtooth - Posts: 4118 |
What is the ID# of your VWAP study? What is the ID# of your 9EMA study? |
[2024-07-31 21:24:08] |
User653934 - Posts: 28 |
vwap S_ID:108 9ema S_ID:27 They are both SG1 on the study page. Date Time Of Last Edit: 2024-07-31 21:24:30
|
[2024-07-31 22:44:37] |
Sawtooth - Posts: 4118 |
Use a formula like this: =ID27.SG1=ID108.SG1 where ID27 is the 9EMA and ID108 is the VWAP However, it is unlikely that they would ever be exactly equal. You could use this formula to get an alert if they are within 1 tick of each other: =ABS(ID27.SG1=ID108.SG1)<TICKSIZE |
[2024-08-05 10:11:03] |
User653934 - Posts: 28 |
Thank you. How do I specify 1 tick? =ABS(ID27.SG1=ID108.SG1)<1TICK Alert Formula Error - Chart: M2KU24_FUT_CME[CB]5 Min #8 Study: Moving Average - Exponential Error:Formula references unknown study. Formula: =ABS(ID27.SG1=ID108.SG1)<1TICK No alertsound/email. I also tried using S_ID27.SG1 format and it shows the same error. Date Time Of Last Edit: 2024-08-05 10:35:57
|
[2024-08-05 13:10:47] |
Sawtooth - Posts: 4118 |
How do I specify 1 tick?
Use TICKSIZE.Study/Chart Alerts And Scanning: Available Main Price Graph Identifiers/Variables Formula references unknown study
Use the ID# of your 9EMA.I also tried using S_ID27.SG1 format
Don't guess at the syntax. Study/Chart Alerts And Scanning: Alert Condition Formula Format |
[2024-08-06 12:18:02] |
User653934 - Posts: 28 |
The 9ema is ID27. I didn't understand I had to use TICKSIZE, I thought that meant I had to specify the tick size. The formula is no longer giving me error messages. Reading SC specification isn't all that helpful, but you have been. Many thanks.
|
[2024-08-06 12:47:17] |
User653934 - Posts: 28 |
However, despite no error messages, the alert didn't go off when a9ema crossed the vwap. I saw it and made a profitable trade, but no signal.
|
[2024-08-06 12:53:08] |
Sawtooth - Posts: 4118 |
the alert didn't go off when a9ema crossed the vwap
Try this formula:=CROSSOVER(ID27.SG1,ID108.SG1) To see a visual of where this happens, add the Color Bar Based On Alert Condition study, and put the above formula on its Alerts tab. |
[2024-08-06 13:29:28] |
User653934 - Posts: 28 |
Hm, that didn't sound off either...Do I have to specify the formula in the chart settings>alert>alert condition? Do I need to name it?
Date Time Of Last Edit: 2024-08-06 14:00:54
|
[2024-08-19 15:28:34] |
User653934 - Posts: 28 |
Still not triggering alert. Any ideas? Do I need to do anything in General Settings?
Date Time Of Last Edit: 2024-08-19 15:29:36
|
To post a message in this thread, you need to log in with your Sierra Chart account: