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 DustyContrer, Today, 04:02 AM
          0 responses
          3 views
          0 likes
          Last Post DustyContrer  
          Started by ETFVoyageur, Today, 02:15 AM
          0 responses
          11 views
          0 likes
          Last Post ETFVoyageur  
          Started by Board game geek, Today, 01:34 AM
          0 responses
          9 views
          0 likes
          Last Post Board game geek  
          Started by morrnel, 05-12-2024, 06:07 PM
          3 responses
          44 views
          0 likes
          Last Post wzgy0920  
          Started by FishTrade, Yesterday, 11:11 PM
          0 responses
          7 views
          0 likes
          Last Post FishTrade  
          Working...
          X