• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtesting Look forward

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

    Backtesting Look forward

    When backtesting a strategy, In NinjaTrader 7, you could reference the next bar by Close[-1].. 5 bars into the future with Close[-5], etc. This was very helpful when building a dataset for machine learning where I could easily output the value of all the indicators at that instant and include the "answer" of what the stock will do x bars into the future.

    In NinjaTrader8, I can not seem to find a way to do this. Does anyone have any ideas?

    #2
    Hello frostengine,

    Thank you for your patience.

    You can use GetValueAt(). For example, Close.GetValueAt(CurrentBar + 4), which would pull the close four bars ahead of the current bar.

    For information on GetValueAt() please visit the following link: http://ninjatrader.com/support/helpG...getvalueat.htm

    Please let me know if you have any questions.
    Patrick H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by teafortwo, Yesterday, 04:26 AM
    4 responses
    12 views
    0 likes
    Last Post bltdavid  
    Started by borjanews, Yesterday, 06:13 PM
    0 responses
    4 views
    0 likes
    Last Post borjanews  
    Started by Austiner87, Yesterday, 05:13 PM
    0 responses
    2 views
    0 likes
    Last Post Austiner87  
    Started by Austiner87, Yesterday, 04:59 PM
    0 responses
    4 views
    0 likes
    Last Post Austiner87  
    Started by Austiner87, Yesterday, 04:58 PM
    0 responses
    1 view
    0 likes
    Last Post Austiner87  
    Working...
    X