Login Page - Create Account

Support Board


Date/Time: Mon, 16 Sep 2024 19:16:16 +0000



Post From: Ma crossover alert with downtrending condition for at least 30 bars.

[2024-07-23 17:29:56]
John - SC Support - Posts: 34453
How do you do this will depend on how you want to define a "Downtrend" for the MA35.

If it is enough that the current value is less than the value 30 bars previously, then the following formula would work to test this.:
=SG2 < SG2[-30]

But if you require that the trend has been down at each bar along the way, then you would need to test each bar against the previous, so your test for this would look like the following:
=AND(SG2[-29] < SG2[-30], SG2[-28] < SG2[-29], SG2[-27] < SG2[-28], ...)

We are not sure what item you are wanting to test in the crossover, but if you are testing SG2 crossing from below against SG1, then the following could be your alert condition:
=AND(SG2 < SG2[-30], CROSSFROMBELOW(SG2, SG1))

All of the information on alerts can be found on the following page:
Study/Chart Alerts And Scanning
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing