Hi, ChelseaB,
I have used similar code to the following for generating sound alerts for many indicators. In this case the alert Draw.Text and and Draw.Line are fine and drawn in both chart and market analyzer, however the sound alert is not played.
I am using a daily and 5M chart, the last NT8 version, and my sound file is located in the default NT location.
Anything changed in the most recent NT version or something wrong with the Alert line code?
// Draw Divergences [COLOR=#e74c3c]private string alert3Sound = NinjaTrader.Core.Globals.InstallDir+@"\sounds\RegularDivergence.wav";[/COLOR] Draw.Line(this,"dive1"+ (showHistory ? CurrentBar.ToString() : ToString()), false, CurrentBar - lastlobar, lastlo, CurrentBar-prevlobar, prevlo, Brushes.DarkGreen, DashStyleHelper.Dot, 1); Draw.Text(this,"rgdBuy"+ (showHistory ? CurrentBar: 0), IsAutoScale,"rgd".ToString(), CurrentBar -(lastlobar+prevlobar)/2, (prevlo+lastlo)/2,-10, Brushes.DarkGreen, textFont, TextAlignment.Center, Brushes.Transparent, Brushes.Transparent, 0); DivergenceDetect[0] = 1; [COLOR=#e74c3c]Alert("rgdUp", Priority.High,Instrument.MasterInstrument.Name + " "+BarsPeriod.ToString() + " RGD Buy" , alert3Sound, rearmTime, Brushes.DarkGreen,Brushes.GreenYellow);[/COLOR]
Comment