Difference between revisions of "AlertEnabled"

From MultiCharts
Jump to navigation Jump to search
m
 
(2 intermediate revisions by 2 users not shown)
Line 19: Line 19:
 
Variable: ID(-1);
 
Variable: ID(-1);
  
If AlertEnabled=False And LastBarOnChart_S=True Then
+
If AlertEnabled = False And LastBarOnChart_S = True Then
  
 
ID = Text_New_S(Date, Time_S, Low, "Alerts are disabled. See Format Study > Properties > Alerts");  
 
ID = Text_New_S(Date, Time_S, Low, "Alerts are disabled. See Format Study > Properties > Alerts");  

Latest revision as of 20:59, 26 February 2012

Returns True if the alerts have been turned on in Format Study > Alerts. This information can make script execution more efficient by discarding redundant calculations.

This function can also be used to notify the user that he will not see the alerts until the relevant option is turned on.

Usage

AlertEnabled

Notes

  • Alerts are only generated for the last bar.
  • There is a difference between AlertEnabled and CheckAlert: AlertEnabled returns True/False for all the bars on the chart while CheckAlert does so for the last bar only.
  • AlertEnabled will return True if alerts have been enabled.

Example

The example below shows how a user can be notified that he has forgotten to turn on the alerts:

Variable: ID(-1);

If AlertEnabled = False And LastBarOnChart_S = True Then

ID = Text_New_S(Date, Time_S, Low, "Alerts are disabled. See Format Study > Properties > Alerts");