1,501
edits
(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...") |
|||
(3 intermediate revisions by 3 users not shown) | |||
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 | 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 == | |||
<syntaxhighlight> | <syntaxhighlight> | ||
AlertEnabled | AlertEnabled | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== 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 == | |||
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 18: | 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"); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:Alerts]] | [[Category:Alerts]] |