Difference between revisions of "AlertEnabled"

From MultiCharts
Jump to navigation Jump to search
(Created page with "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 f...")
 
m
Line 1: Line 1:
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.  
+
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.  
  
==== Usage ====
+
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 ==
 
<syntaxhighlight>
 
<syntaxhighlight>
 
AlertEnabled  
 
AlertEnabled  
 
</syntaxhighlight>
 
</syntaxhighlight>
  
==== Notes ====
+
== Notes ==
* Alerts are only generated for the last bar
+
* 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
+
* 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
+
* AlertEnabled will return True if alerts have been enabled.
 
   
 
   
==== Example ====
+
== Example ==
 
 
 
The example below shows how a user can be notified that he has forgotten to turn on the alerts:
 
The example below shows how a user can be notified that he has forgotten to turn on the alerts:
  
Line 23: Line 24:
  
 
</syntaxhighlight>
 
</syntaxhighlight>
 
 
  
 
[[Category:Alerts]]
 
[[Category:Alerts]]

Revision as of 12:40, 7 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");