Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

What bar does order execute?

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

    What bar does order execute?

    I have a strategy with two symbols. Each uses a 1m timeframe. So, each bar prints at the same time. On which bar should I see the order executed? It appears the order is getting placed two bars after the diamond is drawn. Shouldn't it be placed one bar after? Isn't the order like saying, "place order next bar at market?"

    Code summary. The actual code is much longer.

    if (BarsInProgress == 0)
    {
    placeLong = true;
    DrawDiamond(....);
    }

    if (BarsInProgress == 1 && placeLong)
    {
    EnterLong();
    }

    Thanks,

    Folls

    #2
    During backtest, the order will be filled (if fillable) on the bar after the Enter() method is called. To verify, add a Print(Time[0]) statement when you call EnterLong().

    In real-time, the order is submitted when the method is called and it will be plotted when it is actually filled based on the time stamp of the execution.
    RayNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    65 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    149 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    162 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    99 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    286 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X