Announcement

Collapse
No announcement yet.

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.

    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 Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          574 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          332 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          553 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          551 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X