Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help! when conditions are met,it will draw arrow,text & alert but does not play sound

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Help! when conditions are met,it will draw arrow,text & alert but does not play sound

    Help!
    this indicator codes are for multi charts:--
    when conditions are met,it will draw arrow,text & alert but does not play sound.
    I am not sure I got the right instrument names
    =============================================
    if (Instrument.FullName == "AUDUSD") {PlaySound(@"C:\Program Files(x86)\NinjaTrader7\sounds\AU.wav");} else;
    if (Instrument.FullName == "EURJPY") {PlaySound(@"C:\Program Files(x86)\NinjaTrader7\sounds\EJ.wav");} else;

    return;

    #2
    JC2000, can you please try a $ sign in front of the instrument name for those spot currency symbols?

    So, if (Instrument.FullName == "$AUDUSD") ....

    Thanks,

    Comment


      #3
      I did add the $ in front but still not working

      Comment


        #4
        JC2000,

        I got this to work using if (Instrument.FullName == "$AUDCAD")

        If this is set to CaculateOnBarClose == True you're only going to hear the alert at the beginning of each bar. You may want to switch to CalulateOnBarClose == False to ensure that the sound is being triggered.

        Also check the Log tab of the Control Center for any errors related to playing these files.
        MatthewNinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CaptainJack, 05-29-2026, 05:09 AM
        0 responses
        475 views
        0 likes
        Last Post CaptainJack  
        Started by CaptainJack, 05-29-2026, 12:02 AM
        0 responses
        316 views
        0 likes
        Last Post CaptainJack  
        Started by charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        253 views
        1 like
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        340 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        305 views
        0 likes
        Last Post CarlTrading  
        Working...
        X