Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Alert in strategy - No sound playing

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

    Alert in strategy - No sound playing

    Hi

    I put an alert in my strategy with the Alert() function to give me an alert when the strategy go long or go short or exit a position.

    Everything is working except I do not get the sound in alert1.wav played.
    The alert is showing up in the alert output window. I can hear the "order pending" + "order accepted" + "order filled" that is default with NT.

    And I see the orders being executed on the main control window and in the log tab.

    The only thing not working is playing the sound from the alert wave file.
    When I double click on the actual wave file in the NT /sounds folder, it is loaded into Window media player and plays properly.

    Can anyone point to the possible problem or have seen this before ?

    Thanks in advance.
    Last edited by qewcool; 01-20-2010, 06:49 AM.

    #2
    qewcool, any errrors you spot in the log tab of the Control Center?

    Would you mind posting the code of your Alert() call here?

    Thanks

    Comment


      #3
      Hi

      I dont see any errors in the log tab.

      I only have the order/position/execution category confirmation message which are not errors.

      an error would show up in the log tab in the category column as "error" ? or categorized as something else ?

      the code is :

      Alert("LEalert", NinjaTrader.Cbi.Priority.High, "LEalert", "Alert1.wav", 10, Color.Black, Color.Yellow);

      Thanks for your help
      Last edited by qewcool; 01-20-2010, 08:47 AM.

      Comment


        #4
        ge,

        Just a thought.

        Put some Print() statement directly above where the Alerts are in your code, and keep the output window open just to ensure the Alert() function is being called.
        mrlogik
        NinjaTrader Ecosystem Vendor - Purelogik Trading

        Comment


          #5
          I know the alert is being called because the alert message is being written in the alert output window.

          So visually I do see the alert. its only the sound that is not playing.

          Comment


            #6
            Hmm, the code looks fine to me, you might need to give a fresh .NET a try here.

            Comment


              #7
              Okay,

              I would add
              Code:
              if(!Historical)
                PlaySound("Alert1.wav");
              to verify NT is able to play sounds properly on your machine.
              mrlogik
              NinjaTrader Ecosystem Vendor - Purelogik Trading

              Comment


                #8
                how do you reinstall .net ?

                just to make sure I dont mess everything up.

                Comment


                  #9
                  Just send me a note to support at ninjatrader dot com Attn Bertrand and mention this thread, I'll take care then, thanks.

                  Comment


                    #10
                    tested with the playsound() function and it is working

                    using this code :
                    if(!Historical)
                    PlaySound("Alert1.wav");


                    so why is the Alert() function not working ? are they basically the same as far as the sound part ?

                    do I still need to try to reinstall .net ?

                    Comment


                      #11
                      If you are placing the Alert at the same time it is going to be playing sounds like Order Accepted, etc. you may or may not hear the alert sound as they overlap and will only play one.
                      Josh P.NinjaTrader Customer Service

                      Comment


                        #12
                        Ok I will try to put playsound() at the same time as the Alert() see if it changes anything.

                        As to the format of the sound file, can one play an mp3 file instead of a wav file ? I want to try putting in a longer sound file to see if it changes anything.

                        As an option can one disable the "order accepted" / "order filled" sound cues in order to force NT to play the alarm sound that we choose instead and not allow it to choose between which sound to play ?

                        Also anyway to specify the volume at which NT play its sounds ?
                        Last edited by qewcool; 01-20-2010, 06:14 PM.

                        Comment


                          #13
                          Yes, you can disable the other sounds.

                          Tools->Options->General tab.
                          mrlogik
                          NinjaTrader Ecosystem Vendor - Purelogik Trading

                          Comment


                            #14
                            Thanks mrlogik - it would need to be a .wav qewcool and unfortunately can't change the volume for the NT sounds directly - some sound card driver allow to adjust the volume per program externally though.

                            Comment


                              #15
                              Thanks to all for the help
                              Ill try to experiment further within these parameters.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              669 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              378 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              111 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              575 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              580 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X