RearmAlert()

<< Click to Display Table of Contents >>

Navigation:  NinjaScript > Language Reference > Common > Alert, Debug, Share >

RearmAlert()

Previous page Return to chapter overview Next page

Definition

Rearms an alert created via the Alert() method.  

 

Note:  A NinjaScript generated alert by may need to be rearmed after the alert is triggered depending on the Alert() methods rearmSeconds parameter.

 

 

Method Return Value

This method does not return a value.

 

Syntax

RearmAlert(string id)

 

Parameters

id

A unique string id representing an alert id to rearm

 

 

Examples

ns

protected override void OnBarUpdate()
{
  //rearms "myAlert" on each new trading session
  if(Bars.IsFirstBarOfSession)
    RearmAlert("myAlert");
}