Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

When does ChangeOrder get filled during backtesting?

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

    When does ChangeOrder get filled during backtesting?

    Hi there. I'm running a backtest on a strategy in Unmanaged Mode. Right now, when I enter a position, I enter a corresponding limit order as a profit target. I then want to update the profit target price on each OnBarUpdate. However I've run into an issue where if the limit order is not hit on the 1st bar, I issue a ChangeOrder to update the profit target, but it seems that the original profit target limit price gets hit, not the updated price.

    When exactly does NinjaTrader fill a ChangeOrder during a backtest? Does it wait for a full bar after the ChangeOrder is received?

    Thanks so much!

    Shane

    #2
    Shane, please run with TraceOrders set to 'true' to exactly tell at which bar which order and at which price is placed here.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    388 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    258 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    216 views
    1 like
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    300 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    268 views
    0 likes
    Last Post CarlTrading  
    Working...
    X