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

End Date

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

    End Date

    Hello,

    How can I find out End Date which I choose during opening a new chart?


    Thank you in advance.

    Martin
    Attached Files

    #2
    Hi Martin, on this topic please see our reply here - http://www.ninjatrader.com/support/f...ad.php?t=57589
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Hi,
      actually I think it does not solve my problem, because I need to know the EndDate at the beginning, when the CurrentBar is 0.

      Thanx

      Comment


        #4
        Sorry would not be aware of another way. When you have loaded your chart and applied your script you have processed then all bars up to current rightmost bar - with the single series chart scrolled up to show the current bar.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Oh, ok. I even need to know the value in Initialize.
          So that is a bit strange that is not possible, because I am able to define the property manually but not to get it back in code?

          I will try to come up with something, but...

          Comment


            #6
            I wouldn't say not possible per se, since the architecture / C# is very flexible however there's no supported way to set / get those properties I could offer unfortunately.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              So, I guess you don't have a clou how to find out this value in Initialize, the value I mean EndDate or that date of the last bar which will be loaded and shown?

              Comment


                #8
                Correct, could not share a hint how to access it. In supported NinjaScript there's no route for it here...
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by Luigio View Post
                  So, I guess you don't have a clou how to find out this value in Initialize, the value I mean EndDate or that date of the last bar which will be loaded and shown?
                  Not from Initialize(), as Bars data is not yet available. You can, however, access that information from OnStartUp().
                  Code:
                  DateTime EndTime = Bars.BarsData.To;

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by andrewtrades, Today, 04:57 PM
                  1 response
                  8 views
                  0 likes
                  Last Post NinjaTrader_Manfred  
                  Started by chbruno, Today, 04:10 PM
                  0 responses
                  6 views
                  0 likes
                  Last Post chbruno
                  by chbruno
                   
                  Started by josh18955, 03-25-2023, 11:16 AM
                  6 responses
                  436 views
                  0 likes
                  Last Post Delerium  
                  Started by FAQtrader, Today, 03:35 PM
                  0 responses
                  7 views
                  0 likes
                  Last Post FAQtrader  
                  Started by rocketman7, Today, 09:41 AM
                  5 responses
                  19 views
                  0 likes
                  Last Post NinjaTrader_Jesse  
                  Working...
                  X