Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Sound Alert Help

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

    Sound Alert Help

    Dear Support,
    Hi, ChelseaB,

    I have used similar code to the following for generating sound alerts for many indicators. In this case the alert Draw.Text and and Draw.Line are fine and drawn in both chart and market analyzer, however the sound alert is not played.

    I am using a daily and 5M chart, the last NT8 version, and my sound file is located in the default NT location.

    Anything changed in the most recent NT version or something wrong with the Alert line code?

    Code:
    // Draw Divergences
    
    [COLOR=#e74c3c]private string         alert3Sound             = NinjaTrader.Core.Globals.InstallDir+@"\sounds\RegularDivergence.wav";[/COLOR]
    
    Draw.Line(this,"dive1"+ (showHistory ? CurrentBar.ToString() : ToString()), false, CurrentBar - lastlobar, lastlo, CurrentBar-prevlobar, prevlo, Brushes.DarkGreen, DashStyleHelper.Dot, 1);
    Draw.Text(this,"rgdBuy"+ (showHistory ? CurrentBar: 0), IsAutoScale,"rgd".ToString(), CurrentBar -(lastlobar+prevlobar)/2, (prevlo+lastlo)/2,-10, Brushes.DarkGreen, textFont, TextAlignment.Center, Brushes.Transparent, Brushes.Transparent, 0);
    
    DivergenceDetect[0] = 1;
    
    [COLOR=#e74c3c]Alert("rgdUp", Priority.High,Instrument.MasterInstrument.Name + " "+BarsPeriod.ToString() + " RGD Buy" , alert3Sound, rearmTime, Brushes.DarkGreen,Brushes.GreenYellow);[/COLOR]

    #2
    Hello aligator,

    Thank you for your post.

    Do any sounds come from the platform? If not, it may be muted in your volume settings for Windows.

    If you run a compile in the editor, do you hear the compile completed sound?

    Thanks in advance; I look forward to assisting you further.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Kate View Post
      Hello aligator,

      Thank you for your post.

      Do any sounds come from the platform? If not, it may be muted in your volume settings for Windows.

      If you run a compile in the editor, do you hear the compile completed sound?

      Thanks in advance; I look forward to assisting you further.
      Yes to all your questions. As I said earlier, other actions based on the same conditions (i.e. Draw.Text, Draw.Line) work fine. Only the sound Alert will not sound.

      Comment


        #4
        Hello aligator,

        Thank you for your reply.

        Do you receive any kind of error message in the log regarding the sound? If so, what is the full text of the error?

        If you go to the Program Files (x86) > NinjaTrader 8 > Sounds folder is the RegularDivergence.wav file located in that folder? If you click it in that folder and open it in your sound file player of choice, does the sound play?

        Thanks in advance; I look forward to assisting you further.
        Kate W.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Kate View Post
          Hello aligator,

          Thank you for your reply.

          Do you receive any kind of error message in the log regarding the sound? If so, what is the full text of the error?

          If you go to the Program Files (x86) > NinjaTrader 8 > Sounds folder is the RegularDivergence.wav file located in that folder? If you click it in that folder and open it in your sound file player of choice, does the sound play?

          Thanks in advance; I look forward to assisting you further.
          Thank you Kate, I resolved a misspelling issue.
          Last edited by aligator; 08-21-2020, 12:00 PM.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by TradeForge, 04-19-2024, 02:09 AM
          2 responses
          28 views
          0 likes
          Last Post TradeForge  
          Started by aprilfool, 12-03-2022, 03:01 PM
          3 responses
          327 views
          0 likes
          Last Post NinjaTrader_Adrian  
          Started by giulyko00, Today, 12:03 PM
          1 response
          5 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by f.saeidi, Today, 12:14 PM
          2 responses
          5 views
          0 likes
          Last Post f.saeidi  
          Started by AnnBarnes, Today, 12:17 PM
          1 response
          2 views
          0 likes
          Last Post NinjaTrader_Zachary  
          Working...
          X