AlertOncePerBar.efs

ICE Data Services -


AlertOncePerBar.efs 
  

File Name: AlertOncePerBar.efs


Description:
Demonstrates how to allow an alert to be triggered only once per bar.


Formula Parameters:
NA

Notes:
NA

Download File:
AlertOncePerBar.efs




EFS Code:
/*********************************Provided By : eSignal. (c) Copyright 2003*********************************/var vFlag = false;function main() {    if (getBarState() == BARSTATE_NEWBAR)        vFlag = false;        var vData1 = 5;    var vData2 = 1;        if (vData1 > vData2 && vFlag == false) {        Alert.playSound("train.wav");        setBarBgColor(Color.yellow);        vFlag = true;    }        return;}