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 Rapine Heihei, 04-23-2024, 07:51 PM
    2 responses
    30 views
    0 likes
    Last Post Max238
    by Max238
     
    Started by Shansen, 08-30-2019, 10:18 PM
    24 responses
    943 views
    0 likes
    Last Post spwizard  
    Started by Max238, Today, 01:28 AM
    0 responses
    9 views
    0 likes
    Last Post Max238
    by Max238
     
    Started by rocketman7, Today, 01:00 AM
    0 responses
    7 views
    0 likes
    Last Post rocketman7  
    Started by wzgy0920, 04-20-2024, 06:09 PM
    2 responses
    28 views
    0 likes
    Last Post wzgy0920  
    Working...
    X