• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

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

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by MarkaAllgood, Today, 01:17 AM
    0 responses
    3 views
    0 likes
    Last Post MarkaAllgood  
    Started by assik, Today, 01:00 AM
    0 responses
    4 views
    0 likes
    Last Post assik
    by assik
     
    Started by manueldecastro, Yesterday, 11:55 PM
    0 responses
    4 views
    0 likes
    Last Post manueldecastro  
    Started by ntbone, 07-13-2019, 11:37 PM
    10 responses
    30 views
    0 likes
    Last Post ntbone
    by ntbone
     
    Started by nicknamed, Yesterday, 05:10 PM
    1 response
    17 views
    0 likes
    Last Post NinjaTrader_EricB  
    Working...
    X