• 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 NinjaCustomer, Today, 12:29 AM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_ChrisSch  
    Started by smgrvd, Today, 12:08 AM
    0 responses
    4 views
    0 likes
    Last Post smgrvd
    by smgrvd
     
    Started by ronaldgreene828, Yesterday, 07:50 PM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_EricB  
    Started by nailz420, 07-17-2019, 08:38 AM
    2 responses
    13 views
    0 likes
    Last Post nailz420  
    Started by bouncetherubble, Yesterday, 06:56 PM
    0 responses
    6 views
    0 likes
    Last Post bouncetherubble  
    Working...
    X