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:



    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.

    Support for the development of custom automated trading strategies using NinjaScript.


    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 Kaledus, Today, 01:29 PM
      0 responses
      1 view
      0 likes
      Last Post Kaledus
      by Kaledus
       
      Started by PaulMohn, Today, 12:36 PM
      1 response
      14 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by yertle, Yesterday, 08:38 AM
      8 responses
      36 views
      0 likes
      Last Post ryjoga
      by ryjoga
       
      Started by rdtdale, Today, 01:02 PM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_LuisH  
      Started by alifarahani, Today, 09:40 AM
      3 responses
      17 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X