Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Alert '.wav' file not playing

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

    Alert '.wav' file not playing

    I am trying to use the ninjascript Alert function in NT 8 (used it many times in NT 7 code).
    However, it is not playing the sound.
    I have a print statement showing the sound file it should be playing (Alert1.wav) and that looks good in the output window.
    I see the line show up in the Alerts Log window with proper color and warning level so that proves the Alert method is firing correctly.
    But I do not hear the wav file playing.
    I can hear other NT 8 sounds like 'Order Filled', etc.

    Here is the block of code:
    Code:
    if (arrowDirection > 0)
    {
      Print(Time[0] + ", playing audio alert: Alert1.wav");
      Alert("audioAlert", Priority.Low, "Potential LONG", "Alert1.wav", 20, Brushes.LightSkyBlue, Brushes.Black);
    }
    else
    {
      Print(Time[0] + ", playing audio alert: Alert1.wav");
      Alert("audioAlert", Priority.Low, "Potential SHORT", "Alert1.wav", 20, Brushes.PaleVioletRed, Brushes.Black);
    }
    Any suggestions?

    Gary

    #2
    Hi Gary,

    Thanks for your post.

    In NinjaTrader8 you will need to provide a string with the sound file name and location. Please see the example in the helpguide: http://ninjatrader.com/support/helpG...-us/?alert.htm

    Comment


      #3
      Oops, I missed that in the code breaking changes list.

      Thanks Paul.

      Gary

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      82 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      43 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      64 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      68 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      56 views
      0 likes
      Last Post CarlTrading  
      Working...
      X