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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        152 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        89 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        133 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        127 views
        1 like
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        107 views
        0 likes
        Last Post CarlTrading  
        Working...
        X