+1 888 340 6572

AlertEnabled

From MultiCharts

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");