Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bug: Wrong sound with strategy in market replay

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

    Bug: Wrong sound with strategy in market replay

    I'm testing my automated strategy in market replay and enter positions with stop orders. On EnterLong/ShortStop() the sound played is "Order pending" which is correct.

    But when this order is executed the sound is also "Order pending" and not "Order filled"!

    With manually entered stop orders it is working fine, only when running the strategy it seems messed up.
    I do not play any sounds through my code...

    #2
    symphys,

    Can you please try SampleMACrossOver and see if it behaves the same way for you? Thank you.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Sound is ok when running this strategy.

      Comment


        #4
        Are you submitting several sequential orders? If you have several events that occur on top of each other you could hear different sounds related to different events.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          No. I noticed this behaviour when running market replay with speed.

          But in my case I submit one stop order and it may take even up to 5 or more minutes until it is filled.
          At this time there is no other order pending or entered.

          Comment


            #6
            symphys,

            I suggest you try stripping away strategy logic to try and isolate the root cause since we have determined the functions themselves are not causing the issue.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              I guess I know what the problem is: I use EnterLong/ShortStop() and then immediately set the SetStopLoss() for this order.

              So when NT enters the position it will start playing "Order filled". But since the StopLoss is already set it plays "Order pending" for this new order.

              Can this somehow be fixed?

              Comment


                #8
                symphys,

                Unfortunately this is what will happen when there are sequential sounds to be played. The latest event will be audible, otherwise you'll have a long queue of sound files to play well after the fact. Alternatively, you can turn off the Order Pending sound if you don't want it in Tools>Options.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Wouldn't it be simple to change this behaviour in NT code for such orders?

                  I mean the Stop and ProfitTarget are not really new orders (even if handled by NT in this way) but they are associated with the earlier position...

                  Comment


                    #10
                    symphys,

                    No, NT does not know what you intend with your orders and as such when an event is received in quick succession you will get the sound of the latest event. All it does is react to the events received. If it receives an order filled quickly followed with an order pending event you will get the order pending sound.
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #11
                      Can I programmatically set it to not play a sound only for one specific order?

                      Comment


                        #12
                        symphys,

                        Unfortunately that is not supported. You could turn off sounds completely and then in your code only call PlaySound() when you want to play a sound. Otherwise there is no way to only turn sounds off for one order.
                        Josh P.NinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                        0 responses
                        597 views
                        0 likes
                        Last Post Geovanny Suaza  
                        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                        0 responses
                        343 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by Mindset, 02-09-2026, 11:44 AM
                        0 responses
                        103 views
                        0 likes
                        Last Post Mindset
                        by Mindset
                         
                        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                        0 responses
                        556 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by RFrosty, 01-28-2026, 06:49 PM
                        0 responses
                        555 views
                        1 like
                        Last Post RFrosty
                        by RFrosty
                         
                        Working...
                        X