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 rdtdale, Today, 01:02 PM
    0 responses
    1 view
    0 likes
    Last Post rdtdale
    by rdtdale
     
    Started by alifarahani, Today, 09:40 AM
    3 responses
    15 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by RookieTrader, Today, 09:37 AM
    4 responses
    18 views
    0 likes
    Last Post RookieTrader  
    Started by PaulMohn, Today, 12:36 PM
    0 responses
    7 views
    0 likes
    Last Post PaulMohn  
    Started by love2code2trade, 04-17-2024, 01:45 PM
    4 responses
    41 views
    0 likes
    Last Post love2code2trade  
    Working...
    X