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 tsantospinto, 04-12-2024, 07:04 PM
        6 responses
        98 views
        0 likes
        Last Post tsantospinto  
        Started by rocketman7, Today, 02:12 AM
        5 responses
        25 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by ZenCortexReal, Today, 08:54 AM
        0 responses
        1 view
        0 likes
        Last Post ZenCortexReal  
        Started by ZenCortexReal, Today, 08:52 AM
        0 responses
        0 views
        0 likes
        Last Post ZenCortexReal  
        Started by trilliantrader, 04-18-2024, 08:16 AM
        7 responses
        28 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Working...
        X