Announcement

Collapse
No announcement yet.

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

    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.

        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.

            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...

                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 Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  580 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  335 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  102 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  554 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  552 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X