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

Execute a script instead of a sound file

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

    Execute a script instead of a sound file

    I have a closed-source-code indicator which can play sound files when triggered. Is there a way to make NT7 run another indicator ( which I have the source-code to and which can run text-to-speech ) instead of the static sound-file? Or any other trick I can try to make this work? Maybe alter the mime-type of .wav files?

    #2
    Hello vlc,

    Thanks for your post.

    NinjaTrader uses PCM .WAV files. You could create custom sounds in this format, place them under C:\Program Files (x86)\NinjaTrader 7\sounds or C:\Program Files\NinjaTrader 7\sounds, and use them in your script.
    BrandonNinjaTrader Customer Service

    Comment


      #3
      Yes, but not what I'm after. I'll explain the problem, but I suspect this isn't really going to be possible. The closed-source indicator, plays a .wav file, but I have that indicator on several charts and in the Market Analyser several times. So when it says "Trade Setup Found" , it takes a while to figure-out where. So, I was hoping that instead of pointing it to a static .wav file, I could point it to a script that looks like a .wav, but actually generates the sound dynamically so it would say " Trade Setup found on 5 minute chart" .
      Say(" Trade setup found on "+ BarsPeriod.Value.ToString("0") + " " + BarsPeriod.Id + "chart.");

      As it is, I would need to create a .wav file specifically for each instance of the indicator, and if I happen to change the timeframe of the chart, the .wav file would be incorrect again.

      Comment


        #4
        Hello vlc,

        I do not believe there is an easy trick to make this work. The only possibility I see would be for you to run your other indicator before applying the closed-source indicator to the chart. You would have to adjust your indicator's code so that on startup it checks the sounds folder that the closed-source indicator uses (preferably not the NinjaTrader sounds folder if you have the ability to change the location) for a txt file which contains information on what kind of chart the current sounds are configured for. If the file does not exist or lets the indicator know that the sounds are configured for a different chart, it would need to generate new .wav files and replace them as well as generate or update the txt file. Then when the closed-source indicator requested a sound file, it would retrieve the correctly-generated .wav file for the current chart.

        It is possible I am misunderstanding the situation however. If you believe this is the case, please provide additional information so I can investigate further.

        Thank you in advance.
        Michael M.NinjaTrader Quality Assurance

        Comment


          #5
          No, its OK. I'll just do without this extra bell'n'whistle.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by alifarahani, Today, 09:40 AM
          6 responses
          33 views
          0 likes
          Last Post alifarahani  
          Started by Waxavi, Today, 02:10 AM
          1 response
          17 views
          0 likes
          Last Post NinjaTrader_LuisH  
          Started by Kaledus, Today, 01:29 PM
          5 responses
          14 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by Waxavi, Today, 02:00 AM
          1 response
          12 views
          0 likes
          Last Post NinjaTrader_LuisH  
          Started by gentlebenthebear, Today, 01:30 AM
          3 responses
          17 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X