Difference between revisions of "TL GetAlert"

From MultiCharts
Jump to navigation Jump to search
m (Reverted edits by 176.8.90.7 (talk) to last revision by 194.84.116.138)
Line 1: Line 1:
Returns the alert status for a trendline with the specified ID number; returns a value of -2 if the specified trendline ID number is invalid.  
+
Returns the alert status for a trendline with the specified ID number.
 +
 
 +
TL_GetAlert returns a value of -2 if the specified trendline ID number is invalid.  
 
   
 
   
==== Usage ====
+
== Usage ==
 
<syntaxhighlight>TL_GetAlert(TL_ID)</syntaxhighlight>  
 
<syntaxhighlight>TL_GetAlert(TL_ID)</syntaxhighlight>  
  
Where: [[TL_ID]] - a numerical expression specifying the trendline ID number
+
Where:  
  
==== Return ====  
+
:'''TL_ID''' - a numerical expression specifying the trendline ID number.
 +
 
 +
== Return values ==
 
Alert status:  
 
Alert status:  
  
0 - Alert disabled  
+
:'''0''' - Alert disabled.
  
1 - Breakout intra-bar  
+
:'''1''' - Breakout intra-bar - Alert triggering conditions are evaluated intra-bar.
 +
::''For example:'' An alert is triggered if the High crosses over the trendline or the Low crosses under the trendline.
  
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 - Alert triggering conditions are evaluated at Close of a bar.
 
+
::''For example:'' 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.  
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 ====  
+
== Notes ==
A trendline-specific ID number is returned by [[TL_New]] when the trendline is created.  
+
* A trendline-specific ID number is returned by [[TL_New]] when the trendline is created.
 +
* Use [[TL_SetAlert]] to set an alert for a specified trendline.
 
   
 
   
==== Example ====
+
== Example ==
Assign a value, indicating the alert status for a trendline with the ID number of 3, to Value1 variable:  
+
Assign a value, indicating the alert status for a trendline with the ID number of 3, to the Value1 variable:  
  
<syntaxhighlight>Value1=TL_GetAlert(3);</syntaxhighlight>
+
<syntaxhighlight>Value1 = TL_GetAlert(3);</syntaxhighlight>
 
   
 
   
 
[[Category:Trendline Drawing]]
 
[[Category:Trendline Drawing]]

Revision as of 17:05, 8 March 2012

Returns the alert status for a trendline with the specified ID number.

TL_GetAlert returns a value of -2 if the specified trendline ID number is invalid.

Usage

TL_GetAlert(TL_ID)

Where:

TL_ID - a numerical expression specifying the trendline ID number.

Return values

Alert status:

0 - Alert disabled.
1 - Breakout intra-bar - Alert triggering conditions are evaluated intra-bar.
For example: An alert is triggered if the High crosses over the trendline or the Low crosses under the trendline.
2 - Breakout on close - Alert triggering conditions are evaluated at Close of a bar.
For example: 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.


Notes

  • A trendline-specific ID number is returned by TL_New when the trendline is created.
  • Use TL_SetAlert to set an alert for a specified trendline.

Example

Assign a value, indicating the alert status for a trendline with the ID number of 3, to the Value1 variable:

Value1 = TL_GetAlert(3);