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

Location for Default Sounds File

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

    Location for Default Sounds File

    Dear Support,

    I know for the most recent NT8 version the default install location for Sounds file was changed. However, the following code does not seem to access the sounds file as it did before. Is statement for alert1Sound in the following code still valid or needs changes? What is the correct code?

    Code:
    private bool         soundOn                = true; // on/off switch for audio alerts
    private string       alert1Sound            = NinjaTrader.Core.Globals.InstallDir+@"\sounds\Alert1.wav"; //audio alert for Condition1
    private int          rearmTime              = 30;
    Many thanks.

    #2
    Hello alligator,

    Thank you for your note.

    The file path you are using in your snipped should still work as expected. What is your condition to play the alert sound? If you add print statements to your script, are you sure that this condition is being met? I was able to create a test script that uses the same fileName string and it plays a sound on the first tick of each bar. Feel free to import this example and test on your end to make sure the sound plays as expected.
    AlertSoundTest_NT8.zip

    Please let me know if I may be of further assistance.
    Emily C.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by pmachiraju, 11-01-2023, 04:46 AM
    8 responses
    148 views
    0 likes
    Last Post rehmans
    by rehmans
     
    Started by mattbsea, Today, 05:44 PM
    0 responses
    5 views
    0 likes
    Last Post mattbsea  
    Started by RideMe, 04-07-2024, 04:54 PM
    6 responses
    33 views
    0 likes
    Last Post RideMe
    by RideMe
     
    Started by tkaboris, Today, 05:13 PM
    0 responses
    5 views
    0 likes
    Last Post tkaboris  
    Started by GussJ, 03-04-2020, 03:11 PM
    16 responses
    3,282 views
    0 likes
    Last Post Leafcutter  
    Working...
    X