Code help / Sound Alert, on latest bar(only)

 
How do I program the condition/signal (with an indicator) so that it is triggering the acoustic alert only if s predifined condition is true FOR THE LAST BAR in the chart?
(now the alert is triggered as soon as I add the indicator to the chart window (due to previous signals in the chart)
I'd appreciate any help, thanks
 

Fxnew

Check values once per bar by something like

if((Close[1]>1.5550) && (Volume[0]=1)) // Check the close of the last bar once on first tick of new bar
  {
    // do alert here
  }

FWIW

-BB-

Reason: