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 Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        626 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        359 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        105 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        562 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        567 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X