Support Board
Date/Time: Fri, 07 Feb 2025 15:13:14 +0000
[Programming Help] - Alert if Price touched e.g Moving average
View Count: 604
[2022-07-25 12:03:39] |
User361939 - Posts: 167 |
Hello, I am trying to create alert if price cross or only touched e.g moving avarage level. With this formula i get only alert when price cross moving avarage. I want to have alert even price didn't "cross" but just touched moving avarage. How should looks formula to cover this outcome? =OR (CROSSFROMABOVE(C, ID29.SG1), CROSSFROMBELOW (C, ID29.SG1)) Best Regards |
[2022-07-25 12:34:28] |
Sawtooth - Posts: 4173 |
Try this: =OR (CROSSFROMABOVE(L, ID29.SG1), CROSSFROMBELOW (H, ID29.SG1)) Note that all comparisons are always from one bar to another; there is no intrabar comparison. |
[2022-07-25 14:11:29] |
User361939 - Posts: 167 |
Thank you, but still it is only showing alert when price cross. What should be in formula to cover case i attached? |
Screenshot_3.png / V - Attached On 2022-07-25 14:11:24 UTC - Size: 8.11 KB - 113 views |
[2022-07-25 17:04:09] |
Sawtooth - Posts: 4173 |
What should be in formula to cover case i attached?
The formula I gave in post #2 will alert when the Low crosses the MA, with the setting used in the attached pic.Put the formula on the Alerts tab of the Color Bar Based On Alert Condition study so you can see where the alerts occur. |
Low crosses MA alert.PNG / V - Attached On 2022-07-25 17:03:40 UTC - Size: 24.78 KB - 123 views |
To post a message in this thread, you need to log in with your Sierra Chart account: