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

Alert sound doesnt work

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

    Alert sound doesnt work

    HI
    I have this line where i want to make sure audio alert is producing sound but its not.
    Alert("Alert" + unique, Priority.High, "Up trend line broken", "Alert2.wav", 100000, Brushes.Black, Brushes.Red);

    I try to modify it but there is an error and i cant figure out how to resolve it
    Alert("Alert" + unique, Priority.High, "Up trend line broken", "NinjaTrader.Core.Globals.InstallDir + @"\sounds\Alert1.wav"", 100000, Brushes.Black, Brushes.Red);

    #2
    Hello tkaboris,

    If you see an error you need to include that in your post so we know how to assist.

    To make an alert with a sound you need to format the alert command and path like shown in the help guide. You can copy and paste code from the help guide to test different concepts.

    Code:
    Alert("myAlert", Priority.High, "Reached threshold", NinjaTrader.Core.Globals.InstallDir+@"\sounds\Alert1.wav", 10, Brushes.Black, Brushes.Yellow);
    https://ninjatrader.com/support/helpGuides/nt8/alert.htm
    JesseNinjaTrader Customer Service

    Comment


      #3
      Its asking for absolute path. Where do sounds located?
      soundLocation A string representing the absolute file path of the .wav file to play

      Comment


        #4
        Hello tkaboris,

        an absolute path is the full path to the file. Did you try using the sample from the help guide? That shows the correct code to use.
        JesseNinjaTrader Customer Service

        Comment


          #5
          I am sorry it worked, i had extra double quotes placed...

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Austiner87, Today, 03:42 PM
          1 response
          18 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by cshox, Today, 11:11 AM
          2 responses
          16 views
          0 likes
          Last Post cshox
          by cshox
           
          Started by algospoke, Today, 06:53 PM
          0 responses
          11 views
          0 likes
          Last Post algospoke  
          Started by mlprice12, 12-21-2021, 04:55 PM
          3 responses
          298 views
          0 likes
          Last Post paypachaysa  
          Started by lorem, 04-25-2024, 09:18 AM
          20 responses
          87 views
          0 likes
          Last Post lorem
          by lorem
           
          Working...
          X