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?
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!
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
NinjaTrader
User Defined Text Inputs for Ninja 7
Collapse
X
-
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?Tags: None
-
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.
Please let us know if you need further assistance.Alan P.NinjaTrader Customer Service
-
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 proptradingshop, 03-21-2024, 09:50 AM
|
5 responses
26 views
0 likes
|
Last Post Today, 05:17 AM | ||
Started by MaupinFinche, Today, 05:08 AM
|
0 responses
5 views
0 likes
|
Last Post
by MaupinFinche
Today, 05:08 AM
|
||
Started by Enkidu, Yesterday, 06:40 AM
|
9 responses
35 views
0 likes
|
Last Post
by Enkidu
Yesterday, 01:11 PM
|
||
Started by Mestor, 03-10-2023, 01:50 AM
|
12 responses
309 views
0 likes
|
Last Post
by z.franck
Today, 04:29 AM
|
||
Started by AgriTrdr, 07-16-2023, 12:54 PM
|
32 responses
269 views
0 likes
|
Last Post
by f.saeidi
Yesterday, 06:49 AM
|
Comment