Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Imported Wav files not activating

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

    Imported Wav files not activating

    I am testing various ema strategies. I have placed wav files in the sounds folder of NT6.5. The resident voice gives me order filled through my EMA strategy, but I wish to set an ALERT voice to say Entered Short or Entered Long or Exit Long or Exit Short so as to audibly identify the specific Interval chart that activated.None of the wav files I have imported activate. I placed a rearm of 10 secs on each. These files were entered through the Wizard's/play sound / and Alert function.

    #2
    Unfortunately overwriting the existing sounds files is not supported.

    Note: You could play custom sounds in NinjaScript by PlaySound() : http://www.ninjatrader-support.com/H...PlaySound.html

    Comment


      #3
      .Wav Files not overwritten

      I am trading using an active LIVE account. However, I have the SIM account checked as to allow me real time Sim trading, unless that is not the case. I am not replaying historical data. The NT reference you sent about PLAYSOUND()...Calls to this method are ignored on historical data, it will only work in real-time seems to indicate that I should be hearing the audible .wav file. These files were created and dragged to the sound folder. No files were overwritten. SHOULD I NOT HEAR THE FILE? Are LIVE and SIM two different feeds? If I were to go LIVE should I then hear them?

      Comment


        #4
        You will hear the file:
        - if it's in a sound format which windows can replay and
        - you issue the PlaySound command on the realtime NinjaScript strategy (sim of live account does not matter, will not work on historical data) and
        - the filename parameter in the PlaySound command is correct

        If still not working, then I would not know.

        Comment


          #5
          Should this not work

          The following is my wizard code. I am not having success with this latest revision. I must have a dot, jot or titel off somewhere.

          #region Using declarations
          using System;
          using System.ComponentModel;
          using System.Diagnostics;
          using System.Drawing;
          using System.Drawing.Drawing2D;
          using System.Xml.Serialization;
          using NinjaTrader.Cbi;
          using NinjaTrader.Data;
          using NinjaTrader.Indicator;
          using NinjaTrader.Strategy;
          #endregion
          // This namespace holds all strategies and is required. Do not change it.
          namespace NinjaTrader.Strategy
          {
          ///<summary>
          /// 5 and 6 EMA crossing below. Exit 56LONG
          ///</summary>
          [Description("5 and 6 EMA crossing below. Exit 56LONG")]
          publicclass EMA56SHORTexit56LONG : Strategy
          {
          #region Variables
          // Wizard generated variables
          privateint fast = 5; // Default setting for Fast
          privateint slow = 6; // Default setting for Slow
          // User defined variables (add any user defined variables below)
          #endregion
          ///<summary>
          /// This method is used to configure the strategy and is called once before any strategy method is called.
          ///</summary>
          protectedoverridevoid Initialize()
          {
          Add(EMA(
          5));
          Add(EMA(
          6));
          CalculateOnBarClose =
          true;
          }
          ///<summary>
          /// Called on each bar update event (incoming tick)
          ///</summary>
          protectedoverridevoid OnBarUpdate()
          {
          // Condition set 1
          if (CrossBelow(EMA(5), EMA(6), 1))
          {
          EnterShort(DefaultQuantity,
          "");
          PlaySound(
          @"C:\Program Files\NinjaTrader 6.5\sounds\EnterShort.wav");
          }
          // Condition set 2
          if (CrossAbove(EMA(5), EMA(6), 1))
          {
          ExitShort(
          "", "");
          PlaySound(
          @"C:\Program Files\NinjaTrader 6.5\sounds\ExitShort.wav");
          }
          }

          Comment


            #6
            At first glance I can not find any error in your script.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            579 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            334 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
            554 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