#region Variables
private bool boolAlertSounded = false;
protected override void OnBarUpdate()
if (FirstTickOfBar) boolAlertSounded = false; //reset the bool flag at the start of the bar
if (Open[0]>Open[1])
{
DrawArrowUp("My up arrow" + CurrentBar, false, 0, Low[0], Color.Lime);
if (!boolAlertSounded)
PlaySound("ahooga.wav");
//PlaySound("ESAlert.wav");
boolAlertSounded = true; // set the bool flag to stop sound play
}
Thanks in advance
DJ
Comment