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

accessing previous plot values

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

    accessing previous plot values

    Hello, i using a non time based custom bar type - not unlike range bars.
    Given we do not know when the current bar will close, various time calculations to determine the number of minutes/seconds duration for the previous bar cant be determined until it closes and the first tick of the current bar (ie new bar just opened).
    This i see and have the Time methods to calculate this.

    What i am trying to do is then update the plot of the previous value ....

    which was set something like

    Values[0].Set(somevalue);

    even if i maintain in my own separate dataseries the values i need to reset previous plot to, is there a way to update the previous value?

    Do i need to do a plot override for this to repaint the values with updated values?

    As it happens i only really need access to the previous bars plot ie not the whole series from the first bar.

    thanks

    #2
    Hello Soulfx,

    Thank you for your note.

    Yes, you can set the value for the number of bars ago for the data series that you would like to change.

    Values[0].Set(1, somevalue);

    This will change the value from one bar ago.

    Let me know if I can be of further assistance.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Perfect thanks - i was trying various syntax's using [] brackets but it wasn't happening - thanks for the correct syntax and thankfully no need to override plot (which i have done for other indicators)
      I did a search on this and the help and nothing came up so hopefully will help someone else too
      thanks again

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by funk10101, Today, 09:43 PM
      0 responses
      6 views
      0 likes
      Last Post funk10101  
      Started by pkefal, 04-11-2024, 07:39 AM
      11 responses
      37 views
      0 likes
      Last Post jeronymite  
      Started by bill2023, Yesterday, 08:51 AM
      8 responses
      44 views
      0 likes
      Last Post bill2023  
      Started by yertle, Today, 08:38 AM
      6 responses
      26 views
      0 likes
      Last Post ryjoga
      by ryjoga
       
      Started by algospoke, Yesterday, 06:40 PM
      2 responses
      24 views
      0 likes
      Last Post algospoke  
      Working...
      X