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 geddyisodin, Yesterday, 05:20 AM
          8 responses
          51 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by cmtjoancolmenero, Yesterday, 03:58 PM
          10 responses
          36 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by DayTradingDEMON, Today, 09:28 AM
          4 responses
          24 views
          0 likes
          Last Post DayTradingDEMON  
          Started by George21, Today, 10:07 AM
          1 response
          17 views
          0 likes
          Last Post NinjaTrader_ChristopherJ  
          Started by Stanfillirenfro, Today, 07:23 AM
          9 responses
          25 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Working...
          X