• 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

  • priceisking
    started a topic Target - Sound File / Stop - Sound file

    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.

  • NinjaTrader_Kate
    replied
    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.

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by NinjaCustomer, Today, 12:14 AM
1 response
5 views
0 likes
Last Post NinjaTrader_Marco  
Started by U0000999, Yesterday, 11:49 PM
0 responses
4 views
0 likes
Last Post U0000999  
Started by ahadari28, Yesterday, 04:01 PM
0 responses
5 views
0 likes
Last Post ahadari28  
Started by TazoTodua, Yesterday, 06:00 AM
2 responses
19 views
0 likes
Last Post TazoTodua  
Started by TazoTodua, Yesterday, 09:06 AM
1 response
12 views
0 likes
Last Post NinjaTrader_ChelseaB  
Working...
X