PDA

View Full Version : alert


zooinek
05-20-2009, 03:33 PM
Hi,

i have problems with Alert
I have code:

private int alertId=0;
private int arrowId=0;
OnBarUpdate() {
...
if (something) {
DrawArrowLine("Arrow"+arrowId, ...other atributes...);
arrowId++;
Alert("Alert"+alertId, Priority.High, "message", "sound.wav", 0, Color.White, Color.Black);
alertId++;
}
...
}

now. when something is true, it will draw arrow and i hear the sound. Thats OK. But sometimes, atribut "something" is false and indicator will not draw the arrow in this case (thats ok), but it makes the sound anyway and thats not ok. I dont know why??
Could you help me please?

Thank you

NinjaTrader_Josh
05-20-2009, 03:40 PM
You sure its actually the same alert? You can test this by printing the values of your alertId and and arrowId. Then looking inside the Alerts window to find the alert name and correlate it to having no arrow on the chart.

zooinek
05-20-2009, 04:05 PM
And where can i find Alers window please?

NinjaTrader_Josh
05-20-2009, 04:13 PM
File->New->Alerts