Difference between revisions of "Alert"

From MultiCharts
Jump to navigation Jump to search
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
Triggers an alert window where the necessary text can be created. The text can be dynamic, static or absent.   
 
Triggers an alert window where the necessary text can be created. The text can be dynamic, static or absent.   
  
==== Usage ====
+
== Usage ==
 
<syntaxhighlight>
 
<syntaxhighlight>
 
Alert
 
Alert
 
</syntaxhighlight>
 
</syntaxhighlight>
 
   
 
   
==== Notes ====
+
== Notes ==
 +
* If the text isn't set in the alert then Source, Symbol, Resolution, Price is displayed.
 +
* The Alert keyword works in real-time only.
 +
* Detailed information of alerts' settings is available in Formatting Studies > Alerts.
  
If the text isn't set in the alert then Source, Symbol, Resolution, Price is displayed
+
== Example ==
 
 
Alerts are shown on the last bar only
 
 
 
Detailed information of alerts' settings is available in Formatting Studies > Alerts
 
 
==== Example ====
 
 
This statement will call an alert without text message:
 
This statement will call an alert without text message:
  
 
<syntaxhighlight>
 
<syntaxhighlight>
 
Alert;
 
Alert;
 
TEST
 
absolute
 
nil
 
abs
 
ansistring
 
'ansistring'
 
(ansistring + ansistring, ansistring;)
 
"ansistring"
 
 
Text_new(D,T,C,Text("Bar Date/Time is ",Date:0:0,"/",Time:0:0));
 
 
 
fff
 
 
inputs:
 
Formula( RSI( C, 14 ) ),
 
Baseline1( 70 ),
 
Baseline2( 30 ),
 
PlotBaseline1( true ),
 
PlotBaseline2( true ) ;
 
 
variables:
 
intrabarpersist var0( 0 ),
 
intrabarpersist var1( 0 ),
 
intrabarpersist var2( 0 ),
 
intrabarpersist var3( 0 ),
 
intrabarpersist var4( 0 ) ;
 
 
condition1 = GetAppInfo( aiRealTimeCalc ) = 1 ;
 
if condition1 then                                         
 
begin
 
 
if var0 <> CurrentBar then
 
begin
 
var1 = Formula ;
 
var2 = Formula ;
 
var3 = Formula ;
 
var4 = Formula ;
 
var0 = CurrentBar ;
 
end ;
 
 
if Formula > var2 then
 
var2 = Formula ;
 
 
if Formula < var3 then
 
var3 = Formula ;
 
 
Plot1( var1, "FormulaOpen" ) ;
 
Plot2( var2, "FormulaHigh" ) ;
 
Plot3( var3, "FormulaLow" ) ;
 
  Plot4( Formula, "FormulaClose" ) ;
 
 
end ;
 
 
if PlotBaseline1 then
 
Plot5( Baseline1, "Baseline1" ) ;
 
if PlotBaseline2 then
 
Plot6( Baseline2, "Baseline2" ) ;
 
 
 
 
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Line 93: Line 28:
 
<syntaxhighlight>
 
<syntaxhighlight>
 
If Close > Close[1] Then
 
If Close > Close[1] Then
Alert(Text("Price turning up"))
+
  Alert(Text("Price turning up"))
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
[[Category:Alerts]]
 
[[Category:Alerts]]

Latest revision as of 12:09, 18 March 2021

Triggers an alert window where the necessary text can be created. The text can be dynamic, static or absent.

Usage

Alert

Notes

  • If the text isn't set in the alert then Source, Symbol, Resolution, Price is displayed.
  • The Alert keyword works in real-time only.
  • Detailed information of alerts' settings is available in Formatting Studies > Alerts.

Example

This statement will call an alert without text message:

Alert;

This statement creates a dynamic alert text and displays the number of the weekday:

Alert(Text("Day of week is ", DayOfWeek(Date)));

This statement will show static text:

If Close > Close[1] Then
   Alert(Text("Price turning up"))