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

grabbing data from outside the session

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

    grabbing data from outside the session

    Hello,

    I was wondering if there was a way to grab historical OHLCV data from OUTSIDE the time-bounds of the backtest.

    for example:
    backtest range: 11/16/09 - 11/20/09
    but in the program, i want to be able to analyze the OHLCV data starting from 10/1/09.

    is this possible?

    Thanks in advance

    #2
    You will have to backtest back to 10/1/09. You can use date filters to prevent any trading prior to your backtest date to do the rest. This needs to be programmed into your strategy.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thanks Josh, thats exactly what i was thinking but was wondering if there was a way around it.

      Comment


        #4
        Unfortunately no way around it.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Is there a way to access the OHLCV from previous days/sessions? (besides storing the data into arrays, [which could take up a lot of resources?], i'd like to be able to access the minute volume from each candle)

          using the same example:
          --backtest range: 10/1/09 - 11/20/09
          --don't start placing order until 11/16/09
          --so when looping through the candles on dates later than 11/16, is it possible to access the OHLCV data from previous days such as (10/1)

          Thanks in advance

          Comment


            #6
            Use the [] indexing and go back to the bars you want to look at. You can use GetBar() to get the index.
            Josh P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by agclub, 04-21-2024, 08:57 PM
            4 responses
            18 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by Irukandji, Today, 04:58 AM
            0 responses
            2 views
            0 likes
            Last Post Irukandji  
            Started by fitspressoburnfat, Today, 04:25 AM
            0 responses
            2 views
            0 likes
            Last Post fitspressoburnfat  
            Started by Skifree, Today, 03:41 AM
            1 response
            4 views
            0 likes
            Last Post Skifree
            by Skifree
             
            Started by usazencort, Today, 01:16 AM
            0 responses
            1 view
            0 likes
            Last Post usazencort  
            Working...
            X