Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

TraceOrder confusion

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

    TraceOrder confusion

    What is happening here with respect to the time the order is placed?

    code:
    if (entryOrder == null && (Close[0] > Open[0]))
    {
    entryOrder = EnterLong("mar****rder");
    }

    TraceOrder output:
    3/2/1993 12:00:00 AM Entered internal PlaceOrder() method at 3/2/1993 12:00:00 AM: Action=Buy OrderType=Market Quantity=100 LimitPrice=0 StopPrice=0 SignalName='mar****rder' FromEntrySignal=''

    as well, please see attached image - the date of that market order according to the data box is 3/3/1993

    the way I understand this, the entry condition is met on the close of 3/2/1993. according to the image, the buy order is placed on the open of 3/3/1993. according to the TraceOrder output, the market order is placed on 3/2/1993 at 12:00AM, which is actually BEFORE the entry condition was even met. what is going on here?? i am very confused.

    (i am using yahoo for ohlc daily bars)

    thanks kindly for any help,

    ben
    Attached Files

    #2
    This is expected. You are in a historical/backtest environment and as such all your bars are being processed at the end of each bar. On 3/2 you got the signal to place in the trade. Since 3/2 is already over, the next tradeable location is 3/3 and so that is why you see the order go in on 3/3.
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    160 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    307 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    245 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    348 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    178 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X