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

Target - Sound File / Stop - Sound file

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

    Target - Sound File / Stop - Sound file

    I have a strategy with stopOrder and targetOrder defined based on my logic. How can i force it to use the "Target Filled" & "Stop Filled" sound files.


    // Stop-Loss order 4 ticks below our entry price
    stopOrder = ExitLongStopMarket(0, true, execution.Order.Filled, execution.Order.AverageFillPrice - StopLoss * TickSize, "LSTOP", "L");

    // Target order 8 ticks above our entry price
    targetOrder = ExitLongLimit(0, true, execution.Order.Filled, execution.Order.AverageFillPrice + ProfitTarget * TickSize, "T", "L");


    When these get executed currently, it plays "order pending" and "order filled". Instead of "target filled' and "stopped filled"


    How can i force it to use the "Target Filled" & "Stop Filled" sound files.

    #2
    Hello priceisking,

    Thank you for your post.

    Exit orders aren't recognized as stops and targets in the system, so that is why you receive the "Order filled" audio every time any order is filled. If you want a different sound to play when your stops/targets are executed, you'd pretty much have to turn off the default system sounds (through Tools > Options > General) and add sounds using PlaySound() to denote your executions and fills.

    Here's a link to our help guide on PlaySound():

    https://ninjatrader.com/support/help...?playsound.htm

    Note that if you use SetProfitTarget() and SetStopLoss() instead, the appropriate sounds would play.

    Please let us know if we may be of further assistance to you.
    Last edited by NinjaTrader_Kate; 06-18-2019, 02:23 PM.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Kate View Post
      Note that if you use SetProfitTarget() and SetStopLoss() instead, the appropriate sounds would play.
      Hello,

      I know this post is oldish but it is the only one I found on point.
      Using manual trading via the DOM trade action sounds are correct, played as configured.
      Using a strategy the stop loss sound played is not correct, not as configured. "order filled" sound is played.
      I am using SetProfitTarget() and SetStopLoss().

      Version 8.0.27.1 64-bit
      Live trading with the simulator.

      Cheers,

      Mark
      Last edited by Mark--; 03-09-2023, 12:17 PM.

      Comment


        #4
        Hello Mark,

        Thank you for the suggestion.

        It is expected behavior for ATM strategy-generated orders to play the "Stop Filled" and "Target Filled" sounds. Orders generated by a NinjaScript strategy, even if they are from the SetStopLoss() and SetProfitTarget() methods, play the "Order Filled" sound by default. I apologize for any confusion or inconvenience, as it appears the guidance provided by Kate in post number 2 was inaccurate. As she mentioned, you could play any sound you'd like with PlaySound():


        I have submitted a feature request to the Development Team related to stop and target orders generated by Set() methods playing the stop/target filled sounds rather than "Order Filled." I will follow up with an internal tracking number for your reference as soon as it is created.

        Thanks in advance for your patience.
        Emily C.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Emily View Post
          Orders generated by a NinjaScript strategy, even if they are from the SetStopLoss() and SetProfitTarget() methods, play the "Order Filled" sound by default.
          Hello,

          Thanks for the response.

          I did a test to verify I was not mistaken (or dreaming) about the sounds played for a strategy.
          For profit target "Target Filled" is played (as configured)
          For stop loss "Order Filled" is played.

          As to PlaySound, yes I use it when an order is placed.


          Cheers,

          Mark


          .

          Comment


            #6
            Hello Mark,

            Thank you for your reply.

            I appreciate you pointing out the difference between a profit target and a stop loss being filled. Admittedly, I only tested a stop loss submitted via SetStopLoss() yesterday and got "Order Filled." I did not test out when the profit target is filled. Since this is inconsistent, I have submitted a report to the development team to further investigate. I will post here once I have an update. In the meantime, please feel free to reach out with any additional questions or concerns.

            Thank you for your patience.
            Emily C.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Emily View Post
              I appreciate you pointing out the difference between a profit target and a stop loss being filled. ... I have submitted a report to the development team to further investigate.
              You are welcome and sounds good.

              Comment


                #8
                Hello Mark,

                Thank you for your patience.

                I apologize for the delay in offering an update. The internal tracking number for this issue is NT-1214. Please reference this internal tracking number when contacting Platform Support if you ever have questions regarding this issue.

                When a fix is implemented, you'll find a description including the issue number in the release notes:Please don't hesitate to reach out with any additional questions or concerns.
                Emily C.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by f.saeidi, Today, 11:02 AM
                1 response
                1 view
                0 likes
                Last Post NinjaTrader_BrandonH  
                Started by geotrades1, Today, 10:02 AM
                4 responses
                12 views
                0 likes
                Last Post geotrades1  
                Started by rajendrasubedi2023, Today, 09:50 AM
                3 responses
                15 views
                0 likes
                Last Post NinjaTrader_BrandonH  
                Started by lorem, Today, 09:18 AM
                2 responses
                11 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by geddyisodin, Today, 05:20 AM
                4 responses
                30 views
                0 likes
                Last Post geddyisodin  
                Working...
                X