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 Skifree, Today, 02:50 PM
    0 responses
    2 views
    0 likes
    Last Post Skifree
    by Skifree
     
    Started by owen5819, Today, 02:24 PM
    1 response
    8 views
    0 likes
    Last Post owen5819  
    Started by Skifree, 05-07-2024, 11:38 PM
    2 responses
    26 views
    1 like
    Last Post Skifree
    by Skifree
     
    Started by OllieFeraher, 05-09-2024, 11:14 AM
    4 responses
    14 views
    0 likes
    Last Post MisterTee  
    Started by dcriador, Today, 12:06 PM
    0 responses
    10 views
    0 likes
    Last Post dcriador  
    Working...
    X