Login Page - Create Account

Support Board


Date/Time: Tue, 07 May 2024 11:41:43 +0000



Behavior of sc.AlertOnlyOncePerBar

View Count: 703

[2019-03-07 23:02:10]
User257019 - Posts: 25
Hello team, I hope you are doing well.

I´m generating a really simple ASCIL code while learning but sc.AlertOnlyOncePerBar is not working as sound is being generated with every tick within the same bar :(

Could you please help me understanding why that basic is not working? I would highly appreciate it. Thanks a lot!


#include "sierrachart.h"

SCDLLName("High volume alert")

SCSFExport scsf_HighVolAlert(SCStudyInterfaceRef sc)
{
  
  if (sc.SetDefaults)
  {

    sc.GraphName = "Relevant volume alert";
    sc.AutoLoop = 1;
    sc.FreeDLL = 1;

    sc.AlertOnlyOncePerBar = true;
    sc.ResetAlertOnNewBar = true;

    return;
  }

  if (sc.BaseDataIn[SC_VOLUME][sc.Index] > 1500)
  {
    
    sc.SetAlert(5);

  }

[2019-03-08 15:54:20]
User257019 - Posts: 25
I´m answering myself.

The study has by default the check on "Alerts > Enabled" enabled under the study settings in the GUI. Once I unchecked the "Enabled" button, I started getting only one alert per bar.

:)
[2019-03-08 16:04:18]
Sierra Chart Engineering - Posts: 104368
We are still going to check on this. You should not have to do that.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2019-03-08 17:01:57]
Sierra Chart Engineering - Posts: 104368
We tested this and do not observe multiple alerts per bar. Just one:


Alert - Chart: Replay 480X: NQH19 30 Min #1 | Study: Relevant volume alert | Formula: Custom study condition is TRUE. | Last Price: 6992.75 | Bar start date-time: 2019-03-08 11:30:00 | Alert: (5)
Alert - Chart: Replay 480X: NQH19 30 Min #1 | Study: Relevant volume alert | Formula: Custom study condition is TRUE. | Last Price: 6984.25 | Bar start date-time: 2019-03-08 11:00:00 | Alert: (5)
Alert - Chart: Replay 480X: NQH19 30 Min #1 | Study: Relevant volume alert | Formula: Custom study condition is TRUE. | Last Price: 6969.00 | Bar start date-time: 2019-03-08 10:30:00 | Alert: (5)
Alert - Chart: Replay 480X: NQH19 30 Min #1 | Study: Relevant volume alert | Formula: Custom study condition is TRUE. | Last Price: 6955.00 | Bar start date-time: 2019-03-08 10:00:00 | Alert: (5)
Alert - Chart: Replay 480X: NQH19 30 Min #1 | Study: Relevant volume alert | Formula: Custom study condition is TRUE. | Last Price: 6946.75 | Bar start date-time: 2019-03-08 09:30:00 | Alert: (5)
Alert - Chart: Replay 480X: NQH19 30 Min #1 | Study: Relevant volume alert | Formula: Custom study condition is TRUE. | Last Price: 6950.00 | Bar start date-time: 2019-03-08 09:00:00 | Alert: (5)
Alert - Chart: Replay 480X: NQH19 30 Min #1 | Study: Relevant volume alert | Formula: Custom study condition is TRUE. | Last Price: 6967.00 | Bar start date-time: 2019-03-08 08:30:00 | Alert: (5)
Alert - Chart: Replay 480X: NQH19 30 Min #1 | Study: Relevant volume alert | Formula: Custom study condition is TRUE. | Last Price: 6982.25 | Bar start date-time: 2019-03-08 08:00:00 | Alert: (5)
Alert - Chart: Replay 480X: NQH19 30 Min #1 | Study: Relevant volume alert | Formula: Custom study condition is TRUE. | Last Price: 6982.00 | Bar start date-time: 2019-03-08 07:30:00 | Alert: (5)
Alert - Chart: Replay 480X: NQH19 30 Min #1 | Study: Relevant volume alert | Formula: Custom study condition is TRUE. | Last Price: 6984.75 | Bar start date-time: 2019-03-08 06:30:00 | Alert: (5)

And the simple alert formula was enabled, but there was no formula entered. But that should not conflict.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2019-03-08 17:02:29
[2019-03-11 16:46:27]
User257019 - Posts: 25
Hello team, I really don´t know what happened but I can confirm now I´m not having the issue... Strange :S

Thanks for everything, just wanted to share with you, that I´m liking ACSIL more and more everyday :)
[2019-03-11 17:52:35]
Sierra Chart Engineering - Posts: 104368
This is good.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to 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