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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    118 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    166 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    85 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    130 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    88 views
    0 likes
    Last Post PaulMohn  
    Working...
    X