• 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

how exit happens on same bar?

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

    how exit happens on same bar?

    i.e. I have EnterLongStop order, which fills at X price.



    in OnOrderUpdate, I set ExitLongLimit Order to make a protective stop.
    However, it exits on same bar, and what's the main thing here - it exits on the previous price (which havent been hit after entry).

    After that,i've found that I should have used ExitLongStopMarket, and it will work well.


    but, now i face another problem. I tested 2 variations with same chart:



    if 1st , i use:
    ExitLongStopMarket(0, true, 1, order.AverageFillPrice - TickSize, ...)
    in 2nd , i use:
    ExitLongStopMarket(0, true, 1, order.AverageFillPrice, ...)

    and as you see, 2nd chart doesnt trigger exit. Why? the only difference is `-TickSize`
    Last edited by TazoTodua; 09-10-2018, 02:26 PM.

    #2
    Hello TazoTodua,

    Thank you for your note.

    You could expect an exit on the same bar if worked close enough to the entry price and that stop price was within the entry candle. Without a more granular series Ninjatrader would not know the order in which prices traded for that candle. To avoid situations where the stop price wasn’t traded but Ninjatrader is showing your stop as filled you should add a secondary tick series to the script, see the following,
    https://ninjatrader.com/support/foru...ead.php?t=6652

    Regarding the 2nd chart not showing a fill, are you seeing errors on the log tab of the control center?

    I look forward to your reply.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the information
      Last edited by Michelle151; 12-21-2018, 10:27 PM.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NinjaCustomer, Yesterday, 11:35 PM
      0 responses
      2 views
      0 likes
      Last Post NinjaCustomer  
      Started by sdauteuil, Yesterday, 11:29 PM
      0 responses
      1 view
      0 likes
      Last Post sdauteuil  
      Started by williamzz, Yesterday, 09:50 PM
      0 responses
      19 views
      0 likes
      Last Post williamzz  
      Started by Steve L, Yesterday, 05:01 PM
      0 responses
      6 views
      0 likes
      Last Post Steve L
      by Steve L
       
      Started by Trader-Joe, Yesterday, 04:06 PM
      1 response
      14 views
      0 likes
      Last Post NinjaTrader_ShawnB  
      Working...
      X