• 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 ttodua; 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 madams212121, 03-26-2020, 05:46 PM
      6 responses
      46 views
      0 likes
      Last Post grose
      by grose
       
      Started by trade_noob, Today, 05:51 PM
      0 responses
      3 views
      0 likes
      Last Post trade_noob  
      Started by grose, Today, 05:45 PM
      0 responses
      2 views
      0 likes
      Last Post grose
      by grose
       
      Started by Teebone21, Today, 04:26 PM
      0 responses
      4 views
      0 likes
      Last Post Teebone21  
      Started by Bikotoru, Yesterday, 04:34 PM
      2 responses
      23 views
      0 likes
      Last Post Bikotoru  
      Working...
      X