Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator value for current bar

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

    Indicator value for current bar

    This question may ahve already been asked, but... how do I display a value of indicator for a current bar (bar that has not closed yet)?

    I use Overlay=true, CaluculateOnBarClose=false, and assign value to indicator as follows

    OnBarUpdate() {
    Value.Set(Close[0]+delta);
    }

    but it doesn't show value for current bar...

    #2
    How are you determining it is not the current value? If you have CalculateOnBarClose = false then it is the current value as determined by the latest OnBarUpdate(). This update is triggered by the latest tick and as such your values will be the latest.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      I see that on the chart (remember it's an overlay) there is no value of indicator matching the current bar; the most recent value shows up 1 bar ago and it is static.

      Comment


        #4
        Please check your indicator selection window then. You may have it still set to true. A code change for CalculateOnBarClose is not applied simply by refreshing the indicator. You need to remove/readd it.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          I think the reason is in that I've added plotted overlay lines by hand, after dummy code was generated by NT wizard. I will try it after the holidays; thank you for the attention

          Update: this indeed was the cause, now it works as it should - thanks for your attention
          Last edited by billitin; 01-19-2009, 03:32 PM. Reason: issue resolved

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          596 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          343 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          556 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          554 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X