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 Question

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

    Alert Sound Question

    Hello,
    Is there a way to a kinda add a multiple choice of 4 or 5 different alert sounds to choose from when coding in an alert sound.

    Example: PlaySound(@"C:\Program Files\NinjaTrader 6.5\sounds\Alert2.wav");

    So instead of just having to use one alert sound like the Alert2.wav....I would be able to choose from 4 or 5 different sound files from a drop down box or just access the entire sound file itself to have a choice of different sounds.
    If so, could someone show me an example of how to do this or better yet point me to an existing indicator that has this coded in already.

    Thanks

    #2
    Create yourself a user parameter. Then just create yourself some if-statements.

    Code:
    if (someVar == 1)
        PlaySound(....Alert1.wav);
    else if (someVar == 2)
        PlaySound(....Alert2.wav);
    else if (...etc)
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by helpwanted, Today, 03:06 AM
    1 response
    5 views
    0 likes
    Last Post sarafuenonly123  
    Started by Brevo, Today, 01:45 AM
    0 responses
    7 views
    0 likes
    Last Post Brevo
    by Brevo
     
    Started by aussugardefender, Today, 01:07 AM
    0 responses
    5 views
    0 likes
    Last Post aussugardefender  
    Started by pvincent, 06-23-2022, 12:53 PM
    14 responses
    242 views
    0 likes
    Last Post Nyman
    by Nyman
     
    Started by TraderG23, 12-08-2023, 07:56 AM
    9 responses
    384 views
    1 like
    Last Post Gavini
    by Gavini
     
    Working...
    X