Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

ActualTradingDayEndLocal vs GetTradingDayEndLocal

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

    ActualTradingDayEndLocal vs GetTradingDayEndLocal

    It is not clear from the documentation what the difference between ActualTradingDayEndLocal and GetTradingDayEndLocal is.

    From the documentation

    ActualTradingDayEndLocal - "Returns the session's End-Of-Day(EOD) in the user's configured timezone.
    GetTradingDayEndLocal - "Converts the trading day end time from the exchange timezone to the local time zone, and returns a DateTIme object in the local timezone."

    More specifically why would I want to use ActualTradingDayEndLocal when I can call GetTradingDayEndLocal passing in the time for the current bar?

    #2
    Hello ntbone,

    The main difference here is that one of these objects is a property of the SessionIterator which corresponds to the current session iterator. The other is a method which can be used to retrieve a value based on an input. Per the documentation for GetTradingDayEndLocal this is specifically used for:
    Converts the trading day end time from the exchange timezone to local time,
    Passing in the bar time would be of no help as the method is expecting an exchange time which is then converted to a local time.

    You can use the help guide samples combined with Prints to see how each of these items works, you can also try using the Bar time to see what the result is if it is not clear.

    assuming you are using the sample from: https://ninjatrader.com/support/help...oniterator.htm

    Code:
    Print("The ActualTradingDayEndLocal is " + sessionIterator.ActualTradingDayEndLocal);
    Print("The GetTradingDayEndLocal is " + sessionIterator.GetTradingDayEndLocal(sessionIterator.ActualTradingDayExchange));
    The ActualTradingDayEndLocal is 6/28/2019 3:00:00 PM
    The GetTradingDayEndLocal is 6/28/2019 3:00:00 PM


    or

    Code:
    Print("The ActualTradingDayEndLocal is " + sessionIterator.ActualTradingDayEndLocal);
    Print("The GetTradingDayEndLocal is " + sessionIterator.GetTradingDayEndLocal(Time[0]));
    The ActualTradingDayEndLocal is 6/28/2019 3:00:00 PM
    The GetTradingDayEndLocal is 6/27/2019 3:00:00 PM

    Please let me know if I may be of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Brevo, Today, 01:45 AM
    0 responses
    3 views
    0 likes
    Last Post Brevo
    by Brevo
     
    Started by aussugardefender, Today, 01:07 AM
    0 responses
    3 views
    0 likes
    Last Post aussugardefender  
    Started by pvincent, 06-23-2022, 12:53 PM
    14 responses
    239 views
    0 likes
    Last Post Nyman
    by Nyman
     
    Started by TraderG23, 12-08-2023, 07:56 AM
    9 responses
    384 views
    1 like
    Last Post Gavini
    by Gavini
     
    Started by oviejo, Today, 12:28 AM
    0 responses
    6 views
    0 likes
    Last Post oviejo
    by oviejo
     
    Working...
    X