Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Sound Alerts not Firing

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

    Sound Alerts not Firing

    Hi There,

    Problem: Sound Alerts built into indicator are not playing when conditional is met.

    With the release of NT 8.0.27.1, I am of course aware that X86 has been moved over to Program Files. In the indicator, my current path is:

    PlaySound(NinjaTrader.Core.Globals.InstallDir + @"\sounds\MomentumAlert.wav");

    Prior to the update, everything was fine. Now they no longer work. I do note that the X86 file is still there, and also that the entire file was copies and moved over. Is there something I need to update in the above line of code?

    Specifically the relevant construct is:

    {
    Draw.ArrowUp(this, "EntryPoint"+CurrentBar, false, 0, Low [0] - (TickDistance * TickSize), Brushes.Yellow); Alert[0] = 7; // yellow up

    if (soundAlert == true)

    PlaySound(NinjaTrader.Core.Globals.InstallDir + @"\sounds\MomentumAlert.wav");
    }


    Thanx
    JM
    Last edited by johnMoss; 01-18-2023, 10:50 AM.

    #2
    Hello, thanks for writing in. Please first check the Log tab of the Control Center for any errors. You can also test if the line of code is getting hit by placing a Print method right above it, just to see if the code is being hit but no sound is being produced. If that is the case, there must be an issue with the path to the installation. You can also print this out to confirm it is correct.

    Code:
    [B]{
    Draw.ArrowUp(this, "EntryPoint"+CurrentBar, false, 0, Low [0] - (TickDistance * TickSize), Brushes.Yellow); Alert[0] = 7; // yellow up
    
    Print("NinjaTrader install directory: " + NinjaTrader.Core.Globals.InstallDir);
    if (soundAlert == true)
    {
        Print("Playing sound alert");
        PlaySound(NinjaTrader.Core.Globals.InstallDir + @"\sounds\MomentumAlert.wav");
    }
    
    
    }[/B]​
    ​

    Comment


      #3
      Duh ... My Bad. Check the Log File...

      I'm being an idiot. The system did warn on the update install that you may have to move some files. I did go looking for that note again but didn't find it in the release notes. Built-In sound files were installed but not after-markets, i.e. anything I made and put in the sound file. Thanx, all good.
      JM

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      637 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      366 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      107 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      569 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      571 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X