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

User Defined Text Inputs for Ninja 7

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

    User Defined Text Inputs for Ninja 7

    I'd like to be able to input different sound file names for the alerts when I use an indicator with different timeframes and symbols. I was able to find some information here:

    http://ninjatrader.com/support/forum...ead.php?t=5782

    But it doesn't describe how to write the script with text inputs, only number inputs. What sort of modifications would I need to create user defined text inputs?

    #2
    Hello TrendTracker,

    Thank you for your note.

    To create user defined text inputs you could use the strategy wizard via Control Panel>Tools>New NInjaScript>Strategy. Hit next twice and you’ll have the option to define User Defined Variables. On this page you’ll select String under the Type drop down, then put in a default name such as a sound file path. You could either now unlock the code and you’ll see the code you need to add to your script (see Link below too) or you could continue to build the strategy, setting the condition and then having that condition, when true, play a sound (pick any sound file for now). Then unlock the code, you’ll replace the filename in PlaySound( <file name>) with the user defined input you named earlier. This will give you the ability to choose the file name when applying your indicator or strategy.

    I’ve attached a link to a forum post detailing the code you would need to add as well as a screen shot of a strategy I just created which will play the sound path you enter when applying the strategy.

    http://ninjatrader.com/support/forum...ad.php?t=86387

    Please let us know if you need further assistance.
    Attached Files
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Wow - thank you very much for such a speedy and complete answer. I won't be able to work on it until this weekend, but I don't see having any problems given such a detailed response. Thank you again.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by aligator, Today, 02:28 PM
      0 responses
      1 view
      0 likes
      Last Post aligator  
      Started by daniel_weber8, Today, 01:21 PM
      1 response
      20 views
      0 likes
      Last Post NinjaTrader_ChristopherS  
      Started by jungsoohuh, Today, 12:07 PM
      1 response
      28 views
      0 likes
      Last Post NinjaTrader_PaulH  
      Started by SharonSS, Today, 11:54 AM
      1 response
      21 views
      0 likes
      Last Post NinjaTrader_Jim  
      Started by crystalet, Today, 11:20 AM
      3 responses
      23 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X