Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Does anyone have a working code snippet or indicator that shows how to access the sounds folder listing of wav files as a dropdown in the Indicator options menu?
The sound file list self is simple, the dynamic runtime filled property is a little bit tricky
- use any way to find the ninja install directory
- search in the sounds path all *.wav to a string list, array, collection,...
- now create a dynamic property with a own C# TypeConverter...
- use gomi's recorder and DataManagerNinjaBridge as sample for your own SoundManagerNinjaBridge
- in your indicator add the new converter as [...] statement over your string property and test it
- the indicator dialog shows now a readonly string field with a drop down arrow for open a droplist filled with all sound files and the user can very simple select one file
I need the NT internal call coding that they use in Strategy Analyser. the coding already there inside NT. I just want access to it to call it as an option in an indicator.
Just use an enum property in your indicator as mentioned then do
if (Sound == MySounds.Alert1)
new System.Media.SoundPlayer(@"C:\Program Files (x86)\NinjaTrader 7\sounds\Alert1.wav").Play();
Thanks for your response. The idea that I was hoping for would be that any wav files in the proper folder would become available. Including any custom wav files created or from other custom indicators.
In remember... use the way of gomi's dynamic filled InterfaceList or my own solution as simple SymbolSelection per DropDownListProperty runtime filled with all ninja symbols.
You must only fill a string collection with all (sound) file names from the NT7 sound directory. The content of this list you can dynamic add to your property version... this is all and no very magic work ...
OK, now i have write a little deep C# patch for any "soundfile" propertys... :)
As good sample i have modify Fat Tails "sound" indicators by add only 2 code lines per property for using my new t4tSoundFileManager :)
This is the original: …
->Under this link you find my with Fat Tails indicators tested simple version to grab any NT7 soundfiles to a list and use this as property for indicators/strategies.
Its source code, no free code! If you use this as vendor in your commercial tools, you must add a web link to my site in your tool and any doc for using this feature!