Changes
Jump to navigation
Jump to search
Created page with "Sets the alert status for a trendline with the specified ID number; returns a value of 0 if alert status was successfully modified, and a value of -2 if the specified trendlin..."
Sets the alert status for a trendline with the specified ID number; returns a value of 0 if alert status was successfully modified, and a value of -2 if the specified trendline ID number is invalid.
==== Usage ====
<syntaxhighlight>TL_SetAlert(TL_ID,AlertStatus)</syntaxhighlight>
==== Parameters ====
[[TL_ID]] - a numerical expression specifying the trendline ID number
[[AlertStatus]] - a numerical expression specifying the alert status for the trendline:
0 - Alert disabled
1 - Breakout intra-bar
An alert is triggered if the High crosses over the trendline or the Low crosses under the trendline. Alert triggering conditions are evaluated intra-bar.
2 - Breakout on close
An alert is triggered if the Close of the previous bar was below the trendline and the Close of the current bar is above the trendline, or if the Close of the previous bar was above the trendline and the Close of the current bar is below the trendline. Alert triggering conditions are evaluated at Close of a bar.
==== Notes ====
A trendline-specific ID number is returned by [[TL_New]] when the trendline is created.
==== Example ====
<syntaxhighlight>Set alert status to "Breakout on close" for a trendline with the ID number of 3:
Value1=TL_SetAlert(3,2);</syntaxhighlight>
[[Category:Trendline Drawing]]
==== Usage ====
<syntaxhighlight>TL_SetAlert(TL_ID,AlertStatus)</syntaxhighlight>
==== Parameters ====
[[TL_ID]] - a numerical expression specifying the trendline ID number
[[AlertStatus]] - a numerical expression specifying the alert status for the trendline:
0 - Alert disabled
1 - Breakout intra-bar
An alert is triggered if the High crosses over the trendline or the Low crosses under the trendline. Alert triggering conditions are evaluated intra-bar.
2 - Breakout on close
An alert is triggered if the Close of the previous bar was below the trendline and the Close of the current bar is above the trendline, or if the Close of the previous bar was above the trendline and the Close of the current bar is below the trendline. Alert triggering conditions are evaluated at Close of a bar.
==== Notes ====
A trendline-specific ID number is returned by [[TL_New]] when the trendline is created.
==== Example ====
<syntaxhighlight>Set alert status to "Breakout on close" for a trendline with the ID number of 3:
Value1=TL_SetAlert(3,2);</syntaxhighlight>
[[Category:Trendline Drawing]]