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 DannyP96, 05-18-2026, 02:38 PM
        1 response
        27 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        117 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        69 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        226 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        415 views
        0 likes
        Last Post CaptainJack  
        Working...
        X