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 gentlebenthebear, Today, 01:30 AM
        2 responses
        13 views
        0 likes
        Last Post gentlebenthebear  
        Started by Kaledus, Today, 01:29 PM
        2 responses
        8 views
        0 likes
        Last Post Kaledus
        by Kaledus
         
        Started by frankthearm, Yesterday, 09:08 AM
        13 responses
        45 views
        0 likes
        Last Post frankthearm  
        Started by PaulMohn, Today, 12:36 PM
        2 responses
        16 views
        0 likes
        Last Post PaulMohn  
        Started by Conceptzx, 10-11-2022, 06:38 AM
        2 responses
        56 views
        0 likes
        Last Post PhillT
        by PhillT
         
        Working...
        X