Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Enter Order on Close of the Session

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

    Enter Order on Close of the Session

    Hi

    I need to automate an order entry at the close of the session, which ideally would be right the opposite of the "ExitOnClose" instruction.

    I am not finding a solution that effectively triggers the order everyday at the (close - n) seconds.

    I am wondering if you can shed some light on what is the best approach to handle this?

    The code runs in 10 minute bar aggregation and I want the order to be sent in the last few seconds of the session end, exactly in the same way the "ExitOnClose" instruction handles it.

    Thanks

    #2
    Hi zerosum666,

    Unfortunately there is nothing built in to monitor for end of session. It must all be custom coded. You could work with time. If you are working historically, you can refer to bar's time stamp with Time[0]. For real time, the C# property DateTime.Now gets the time for your PC clock. Either of these can be checked for an entry condition.

    Ryan M.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    77 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    45 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    28 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    32 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    64 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X