Now I would like to add an audible alert when the condition is met.
When the condition is satisfied:
DrawText("tag01"+CurrentBar, true, "l", 0, ((High[0] + Low[0])/2), 0, Color.DarkGreen, new Font("Wingdings", 40), StringAlignment.Center, Color.DarkGreen, Color.DarkGreen, 0);
Works perfectly.
To play the alert can I just add?
PlaySound(@"C:\Program Files (x86)\NinjaTrader 7\sounds\Alert1.wav");
I have confirmed the wav file exists in that location.
so the code wld be:
condition code......
DrawText("tag01"+CurrentBar, true, "l", 0, ((High[0] + Low[0])/2), 0, Color.DarkGreen, new Font("Wingdings", 40), StringAlignment.Center, Color.DarkGreen, Color.DarkGreen, 0);
PlaySound(@"C:\Program Files (x86)\NinjaTrader 7\sounds\Alert1.wav");
is that all I need to add?
Comment