• 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

Accessing Strategy Analyzer - Time Frame - Start Date from Ninjascript

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

  • NinjaTrader_Jesse
    replied
    Hello shodson,

    There are not specific properties that I am aware of that represent those times however you could likely do this from OnBarUpdate on CurrentBar 0 using the Time[0] object. That would represent the first datapoint loaded. If you are not using TickReplay you could get the last bar of the series using the index Time.GetValueAt(Count - 2).

    There are some undocumented properties you can try however I am unaware of their normal expectations:

    Code:
    Print(From + " " + To);


    I look forward to being of further assistance.
    Last edited by NinjaTrader_Jesse; 04-07-2020, 11:20 AM.

    Leave a comment:


  • Accessing Strategy Analyzer - Time Frame - Start Date from Ninjascript

    From my strategy, when I backtest, how can I access the date value in

    Strategy Analyzer >> Time Frame >> Start Date & End Date

    from Ninjascript?

    I want to pre-load some external data when I run a backtest, but not all of the data, just what I need for the back-test period specified in the strategy analyzer.

Latest Posts

Collapse

Topics Statistics Last Post
Started by vitrxotinusa, Yesterday, 11:56 PM
0 responses
5 views
0 likes
Last Post vitrxotinusa  
Started by vitrxotinusa, Yesterday, 11:55 PM
0 responses
3 views
0 likes
Last Post vitrxotinusa  
Started by vitrxotinusa, Yesterday, 11:53 PM
0 responses
6 views
0 likes
Last Post vitrxotinusa  
Started by raymonds, Yesterday, 10:23 PM
0 responses
4 views
0 likes
Last Post raymonds  
Started by Gbnowpes, Yesterday, 09:21 PM
0 responses
5 views
0 likes
Last Post Gbnowpes  
Working...
X