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 charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      70 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      152 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      162 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      100 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      288 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X