Login Page - Create Account

Support Board


Date/Time: Sun, 24 Nov 2024 06:58:32 +0000



How to prevent an alert from firing more than once every x minutes?

View Count: 220

[2024-06-19 00:01:19]
jsandlan - Posts: 46
I'm using the Color Bar Based On Alert Condition study to fire an alert when a set of conditions are true.
The alert tends to fire frequently and I would like to only allow it to fire 1 time in every 15 minute interval.
Is it possible to set the frequency of an alert from the Color Bar Based On Alert Condition study for every x minutes?

Thanks,
Jackson
[2024-06-19 14:24:55]
John - SC Support - Posts: 36238
There is not a way to do this directly within the study or by using the alerts.

You might be able to do this using the Spreadsheet study to give you a switch that you can reference, but you would have to be careful about either a race condition or a circular reference. Refer to the following for a starting place:
Spreadsheet Example Formulas and Usage: Buy on First Signal and Ignore Multiple Signals
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-06-19 16:15:10]
jsandlan - Posts: 46
Is the Color Bar Based On Alert Condition study code available in the Sierra Chart directory?
Would preventing an alert from firing more than once per x minutes be possible using a custom ASCIL study?
I was thinking about adding additional functionality to the Color Bar Based On Alert Condition study and creating a custom study that allows throttling the alert.

Jackson
[2024-06-19 17:50:41]
John - SC Support - Posts: 36238
The "Color Bar Based on Alert Condition" study source code is NOT available.

But a custom study would allow you to do what you want, as it can keep track of the information you need through a persistent variable. Refer to the following:
sc.GetPersistentIntFromChartStudy()

List of Third Party Sierra Chart Study and System Programmers
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account