Support Board
Date/Time: Wed, 05 Feb 2025 09:49:02 +0000
[Programming Help] - How To Setup AUDIO ALERT when Moving Average Slope CHANGES
View Count: 1219
[2020-03-04 13:54:36] |
Trader8188 - Posts: 20 |
How To Setup AUDIO ALERT when MOVING AVERAGE – HULL SLOPE < 0 (TURNS DOWNWARD) MOVING AVERAGE – HULL SLOPE > 0 (TURNS UPWARD) What code do I input in the ALERT CONDITION AREA (ALERTS TAB in study settings)?? I followed the instructions below and inputted this but got an error message: =OR(AND(SG1[0] > SG1[-1],SG1[-1] < SG1[-2]), AND(SG1[0] < SG1[-1],SG1[-1] > SG1[-2])) ERROR MESSAGE >> ERROR #SYNTAX! Simple Alert Condition Formula for Change of Slope of a Study Subgraph Line: To get an alert when a study Subgraph line changes its slope, then use this Simple Alert Condition Formula: =OR(AND(SG1[0] > SG1[-1],SG1[-1] < SG1[-2]), AND(SG1[0] < SG1[-1],SG1[-1] > SG1[-2])). This formula is meant for study Subgraph 1. This will work fine for any of the Sierra Chart Moving Average studies. In the case where this formula is used on another study other than the study being referenced, like in the case of Color Bar Based on Alert Condition, it is necessary to change SG1 to include the study ID number. Refer to Referencing Other Studies for complete details. |
[2020-03-10 23:34:41] |
gayer2428 - Posts: 91 |
Using the Angle study with Simple Alerts you can check the angle of any MA. 1. Add the study Study Angle to your chart. 2. On Settings & Inputs tab: - set "Based On: to <your Moving Average - Hull study id>. (Now Input Data will show Hull MA) - set the Length to 1 - Value per Point: <appropriate for the tick value> - Skip Calc...: <No> 3. On your alert condition: you will reference the new Angle study (let's call it ID99) thus: =OR(AND ID99.SG1 < 0 ... --- Hull MA turned down? ... ID99.SG1 > 0 ... -- Hull MA turned up? |
To post a message in this thread, you need to log in with your Sierra Chart account: