Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

N7T and Alerts and Sounds

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

    N7T and Alerts and Sounds

    The write file works fine....
    The draws work fine....
    No alert and no sound.

    Can anyone see what i did wrong here?

    THANK YOU!!!!

    if (BarOfThisAlert != CurrentBar)
    {
    BarOfThisAlert = CurrentBar;
    if (!Historical)
    if (SoundAlerts) WriteFile...; DOES OK

    if (!Out)
    {
    DrawArrowUp
    DrawText("Text1" + CurrentBar,
    DrawText(
    "Text3" + CurrentBar,
    DrawText(
    "Text2" + CurrentBar,
    DrawText(
    "Text4" + CurrentBar,
    if (SoundAlerts) PlaySound(@"c:\air_raid.wav"); NO WORK
    if (SoundAlerts) Alert("MyAlrt5", NO WORK
    }
    else

    #2
    Hello,

    I just tested this on my side without any issues. So I dont think there are any bugs currently. Issue must be in your if statement or the coding of the file path to the wav file. Remember the PlaySound() and Alert() only work in realtime.

    If you take out the if statement or move the PlaySound() to an area where it will always get executed onBarUpdate() and then add the indicator to a 1 minute chart with CalculateOnBarClose = True. You should hear the alert once every minute at the start of a new bar, do you hear the alert here?

    If not please also let me know what version of NinjaTrader 7 you are using this is located in Control Center->Help->About and is to the right of the NinjaTrader logo.

    I look forward to assisting you further.
    BrettNinjaTrader Product Management

    Comment


      #3
      I took the sound file out of the alert... did i do it wrong?

      DrawText(
      "Text4" WORKS

      if (SoundAlerts) PlaySound(@"c:\air_raid.wav");
      if (SoundAlerts) Alert("MyAlrt7", NinjaTrader.Cbi.Priority.Medium, Close[0].ToString() + " Divergence Short", " ", 600, Color.Red, Color.White);

      THANK YOU,
      Howie

      Comment


        #4
        NT 7.0.015(Live)

        Comment


          #5
          I was asking you to move the PlaySound up to the top after

          OnBarUpdate()
          {
          PlaySound(@"c:\air_raid.wav");


          and see if you heard the sound play on the bar update. This is to test if our if statment is whats causing the problem also to test if you dont hear it at this point every 1 minute on a 1 minute chart with CalculateOnBarClose = true this will let us know the sound file path is not correct.

          Let me know if I can be of further assistance.
          BrettNinjaTrader Product Management

          Comment


            #6
            i did as you said Josh,
            the sound did not work
            i put an Alert there too with no sound "" and that did not work either
            everything else in my indicator works fine.
            I promise to do as you say... what's the next step.
            Howie

            Comment


              #7
              I mean Brett

              Comment


                #8
                Hello,

                In this case this indicates you have an issue with your sounds file, also please make sue your speakers are on and your system is not muted.

                Please use the following line of code that I used to test the sound on my side. This will work as long as you did not change the default installation path for NinjaTrader when you installed NinjaTrader.

                This should produce an alert every minute on a 1 minute chart with live data, the market is closed now so be sure you are testing on an instrument that is receiving live data and is forming bars.


                PlaySound(@"C:\Program Files\NinjaTrader 7\sounds\Alert4.wav");

                Let me know if this does the trick for you.
                BrettNinjaTrader Product Management

                Comment


                  #9
                  thanks for the help Brett.
                  that works
                  for some reason it will NT7 will not play my air_raid.wav.
                  i use it to wake me up.
                  I even copied to NT sound directory and used your path.
                  kinda strange but i'll settle for the door bell.
                  Thank You
                  Howie

                  Comment


                    #10
                    Hello,

                    Its not limited to only the NinjaTrader sounds as I just copied a wav file from windows and tested and it played. Must be something specific to your specific wav file or a codec that is needed to play it. It has to be a standard .wav file for NinjaTrader to play the file.

                    Glad we figured out the issue.

                    Let me know if I can be of further assistance.
                    BrettNinjaTrader Product Management

                    Comment


                      #11
                      It was some wav i downloaded over the net. No big deal Brett. Thank you so very much for helping me get past that problem.
                      Howie

                      Comment


                        #12
                        I hit this issue yesterday, and after a search through this forum I converted my custom wav files to pcm wav and all works fine.

                        Try the attached triple_klaxon.wav. That should wake you up .

                        It was a wav I downloaded that didn't work, but I ran it through the sound editor Audacity, saved it as wav pcm, and all is good. I actually used Audicity to make the klaxon sound three times in a single wav file, which is cool.

                        Hope that helps.
                        Attached Files

                        Comment


                          #13
                          Hey thanks alot MXASJ
                          I owe you one.

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                          0 responses
                          601 views
                          0 likes
                          Last Post Geovanny Suaza  
                          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                          0 responses
                          347 views
                          1 like
                          Last Post Geovanny Suaza  
                          Started by Mindset, 02-09-2026, 11:44 AM
                          0 responses
                          103 views
                          0 likes
                          Last Post Mindset
                          by Mindset
                           
                          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                          0 responses
                          559 views
                          1 like
                          Last Post Geovanny Suaza  
                          Started by RFrosty, 01-28-2026, 06:49 PM
                          0 responses
                          558 views
                          1 like
                          Last Post RFrosty
                          by RFrosty
                           
                          Working...
                          X