Login Page - Create Account

Support Board


Date/Time: Thu, 02 May 2024 03:16:43 +0000



Post From: A 'beefed up' email alert system?

[2022-11-29 15:31:09]
4LifeNeo - Posts: 36
Hello Sierra Chart team,

Hope you're doing well. I've come to this post because I was looking to see if there's a possibility to remove the footer message (and possibly other items) from email alerts - the part where it says: "To stop receiving further Alert notification messages to this email address, click the following link:"

I've found a way to remove the lengthy formula section by using a second "Color Bar Based On Alert Condition" to check if the first one's condition is true (it would send the email if it is). There are other items that I want to remove as well, but this part is the main one for now. It's not a big deal when reading the email, but could create a problem when it's parsed.

I've read...

Text of alerts sent by email
How To Edit The Alert Email Template?
Advanced Custom Study Interface and Language (ACSIL)

However, I am not sure how to use the functions "sc.AlertWithMessage" and "sc.SendEmailMessage" mentioned in those threads.

I've tried to create a .cpp file and this is what I've got - I just change the names to "EmailAlert" and am not sure how to proceed after. Any help you could provide would be appreciated. If there's an easier way to do this with the current version, please let me know. Thank you in advance.

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// The top of every source code file must include this line
#include "sierrachart.h"

// For reference, refer to this page:
// Advanced Custom Study Interface and Language (ACSIL)

// This line is required. Change the text within the quote
// marks to what you want to name your group of custom studies.
SCDLLName("EmailAlert")

//This is the basic framework of a study function. Change the name 'TemplateFunction' to what you require.
SCSFExport scsf_TemplateFunction(SCStudyInterfaceRef sc)
{
  // Section 1 - Set the configuration variables and defaults
  if (sc.SetDefaults)
  {
    sc.GraphName = "EmailAlert";

    sc.AutoLoop = 1; //Automatic looping is enabled.
    
    sc.Subgraph[0].Name = "Name";
    sc.Subgraph[0].DrawStyle = DRAWSTYLE_LINE;
    sc.Subgraph[0].PrimaryColor = RGB (0, 255, 0);
    
    sc.Input[0].Name = "Float Input";
    sc.Input[0].SetFloat(0.0f);
    
    return;
  }
  
  
  // Section 2 - Do data processing here
  
  
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////