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 Hwop38, 05-04-2026, 07:02 PM
        0 responses
        160 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        308 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        245 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        349 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        179 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Working...
        X