Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ExitOnClose and Overnight Margin for ES

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

    ExitOnClose and Overnight Margin for ES

    Hi,

    I'm trading ES futures and developing an automated strategies.
    1. I'm setting my time to EST(NY time) and wanted to know when is the ExitOnClose triggered?

    2. If I don't want to hold the contract for overnight margin till what time(EST) I need to sell it? Is it until the lock time 5:30pm EST?

    Thanks in advance!

    #2
    freewind, the ExitOnClose time is tied to the applied session template you use when starting up the strategy via the chart or strategies tab - you should contact your broker directly to clarify margin requirements, normally the overnights are used at the end of the US regular trading day (16 EST).

    Comment


      #3
      i want to close all position when it is 16:14:15. are the following codes correct ?



      if ( ToTime(Time[0]) == 161445)
      {
      ExitLong("", "");
      ExitShort("", "");
      return;
      }

      Comment


        #4
        Hello asteriskstar,

        That is close, although it will only work if there is a bar stamp exactly at 161445. This condition will then never be true for minute charts which always end on the minute.

        A couple alternatives here is using a time range for the bar's time stamps or working off your computer clock.

        if ( ToTime(Time[0]) >= 161400 && ToTime(Time[0]) <= 161500 )

        if ( ToTime(DateTime.Now) == 161445 )
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

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