Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

can't find instruction for last chart bar?

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

    can't find instruction for last chart bar?

    please tell me where in the nt user guide I can find something like ''islastbar'' so I can take an ''if'' action on the last bar in my indicator. I've seen it before but can't find it.

    #2
    Originally posted by joemiller View Post
    please tell me where in the nt user guide I can find something like ''islastbar'' so I can take an ''if'' action on the last bar in my indicator. I've seen it before but can't find it.

    Comment


      #3
      Hello joemiller,

      Thank you for your post.

      Koganam's referenced post is a great way to do so. I added the full quote from the post here for ease:
      Originally posted by koganam View Post
      I am going to assume then that all you want is how to get the index of the last bar showing on the screen, and that you know how to query and display the information on the screen with DrawTextFixed()? If that is correct, then there are 2 ways to get the last bar painted, both undocumented and unsupported by NT Support, so do not even ask.
      1. int intLastBarOnChart = ChartControl.LastBarPainted;
      2. int intLastBarPaintedOnChart = this.LastBarIndexPainted;

      The first index is dependent on the COBC property; the second one is absolute.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      78 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      40 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      63 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      63 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      54 views
      0 likes
      Last Post CarlTrading  
      Working...
      X