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

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 f.saeidi, Yesterday, 12:14 PM
          9 responses
          23 views
          0 likes
          Last Post f.saeidi  
          Started by Tim-c, Today, 03:54 AM
          0 responses
          3 views
          0 likes
          Last Post Tim-c
          by Tim-c
           
          Started by FrancisMorro, Today, 03:24 AM
          0 responses
          3 views
          0 likes
          Last Post FrancisMorro  
          Started by Segwin, 05-07-2018, 02:15 PM
          10 responses
          1,772 views
          0 likes
          Last Post Leafcutter  
          Started by Rapine Heihei, 04-23-2024, 07:51 PM
          2 responses
          31 views
          0 likes
          Last Post Max238
          by Max238
           
          Working...
          X