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

Session times

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

    Session times

    I would like to ask, that if

    Bars.Session.GetNextBeginEnd(checkAtTime, out currentSessionBegin, out currentSessionEnd)

    is called in multi-instrument strategy - how that works?
    • A) can provide various session times depending on currently processed instrument
    • B) provides same session times, because it checks the primary Instrument only


    Which one is true A) or B) ?
    Last edited by misova; 09-05-2015, 02:50 PM.

    #2
    Hello misova,

    Thank you for your post.

    It would be whatever bar series called the OnBarUpdate() method.

    I would use BarsArray[barsSeries Index].Session.GetNextBeginEnd().

    Comment


      #3
      Thank you,

      I am just curious, how that works, that the method needs same Bars on 2 places.

      1st - the method is invoked on the Bars object
      2nd - it takes the same Bars object as parameter on which it is invoked

      One can invoke the method on Bars A and pass there a parameter with Bars B?
      On which one Bars then results will be returned?

      It would be intuitive and logical, that method should automatically use the object on which it is invoked, so no more passing it as parameter should be needed...
      Last edited by misova; 09-07-2015, 07:56 AM.

      Comment


        #4
        Hello,

        Using the standard overloads for this you could pass in either bar series, that is what the overload that includes Bars would be used for.

        In either case you are invoking on that series, either you provide the bars to the method using its overload, or you call the method from the bar series Session as Patrick provided.

        The expected result would be the output for whichever series you have provided to GetNextBeginEnd.

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

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Touch-Ups, Today, 10:36 AM
        0 responses
        1 view
        0 likes
        Last Post Touch-Ups  
        Started by geddyisodin, 04-25-2024, 05:20 AM
        8 responses
        61 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by jxs_xrj, 01-12-2020, 09:49 AM
        4 responses
        3,289 views
        1 like
        Last Post jgualdronc  
        Started by Option Whisperer, Today, 09:55 AM
        0 responses
        5 views
        0 likes
        Last Post Option Whisperer  
        Started by halgo_boulder, 04-20-2024, 08:44 AM
        2 responses
        22 views
        0 likes
        Last Post halgo_boulder  
        Working...
        X