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

referencing previous variable value

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

    referencing previous variable value

    I suspect this is any easy question...

    Is there an easy way to reference the value of a variable for the previous bar (or several bar's back) similar to the way you can reference an indicators value from several bars back.

    e.g. I want to know the value for the integer variable "OBosc" 1 bar ago.

    I try if (OBosc[1] == 0) ....etc.

    But this doesn't work.

    rsi77

    #2
    Hello,

    Yes, you can do this if its saved in a DataSeries:
    DenNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by cutzpr, Today, 08:54 AM
    0 responses
    2 views
    0 likes
    Last Post cutzpr
    by cutzpr
     
    Started by benmarkal, Today, 08:44 AM
    0 responses
    2 views
    0 likes
    Last Post benmarkal  
    Started by Tin34, Today, 03:30 AM
    2 responses
    21 views
    0 likes
    Last Post Tin34
    by Tin34
     
    Started by sastrades, Yesterday, 09:59 AM
    2 responses
    33 views
    0 likes
    Last Post brucerobinson  
    Started by ETFVoyageur, Today, 12:52 AM
    1 response
    18 views
    0 likes
    Last Post Leeroy_Jenkins  
    Working...
    X