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

Problem with sounds... no sound.

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

    Problem with sounds... no sound.

    I've been trying to get PlaySound(); to work with little success.



    After trying to put it into a few custom indicators which were working otherwise, I wanted to see if it worked and just left it in the OnBarUpdate() section without any qualifiers to see if it would make a noise with a new bar but no luck.

    protectedoverridevoid OnBarUpdate()
    {

    PlaySound(
    @"C:\Program Files (x86)\NinjaTrader 6.5\sounds\Alert1.wav");
    }

    It seems to make the chart that I apply it to hang also (the bartimer stops).

    Any help would be appreciated.

    #2
    Hello,

    Thank you for your forum post.

    Are you on a 64 bit PC?

    Also, what version of NinjaTrader are you using? This is found in the Control Center->Help->About to the right of the NinjaTrader logo.


    I look forward to assisting you further.

    Comment


      #3
      Here is the info.

      Thanks again.

      Originally posted by NinjaTrader_Brett View Post
      Hello,

      Thank you for your forum post.

      Are you on a 64 bit PC?

      yes

      Also, what version of NinjaTrader are you using? This is found in the Control Center->Help->About to the right of the NinjaTrader logo.

      6.5.1000.16
      .NET Version: 2.0.50727.4952


      I look forward to assisting you further.

      Comment


        #4
        Hello,

        When you run this can you please check the log tab in the control center are any errors listed here?

        Also, just to double check this will no sound on historical data and must run on live data.

        Comment


          #5
          Thanks Brett.
          I figured it out.
          I was testing using real time data outside regular trading hours.
          This made the stream of ticks really slow.
          The alerts were triggering but sometimes on a serious delay because it seems as though the next tick has to come in in order for the bar to close and the alert to trigger. In after hours, there can be quite a space between each new event.

          Thanks for your help.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by DJ888, Today, 10:57 PM
          0 responses
          2 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Started by MacDad, 02-25-2024, 11:48 PM
          7 responses
          158 views
          0 likes
          Last Post loganjarosz123  
          Started by Belfortbucks, Today, 09:29 PM
          0 responses
          7 views
          0 likes
          Last Post Belfortbucks  
          Started by zstheorist, Today, 07:52 PM
          0 responses
          7 views
          0 likes
          Last Post zstheorist  
          Started by pmachiraju, 11-01-2023, 04:46 AM
          8 responses
          151 views
          0 likes
          Last Post rehmans
          by rehmans
           
          Working...
          X