• 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

AddDataSeries error

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

    #16
    Hello GrumpyTrader,

    When working with Indicators and Strategies, the Instrument object is available in State.Configure; the BarsPeriod is not.

    With MarketAnalyzer columns the Instrument object is not available until State.Historical.


    The current way to load a secondary series and have it match the primary series BarsPeriod, is to load the data using a BarsRequest in State.Historical.

    http://ninjatrader.com/support/helpG...arsrequest.htm
    Last edited by NinjaTrader_ChelseaB; 03-07-2016, 09:29 AM.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #17
      Hi Chelsea,
      The documentation states that the Instruments aren't available until the State.DataLoaded (per OnStateChange section). I found in my experience that the instrument was available during the State.Configure point except during an optimization (where it was null). The BarsPeriod was never an issue in my experience.

      Using a BarRequest as the prescribed method for loading a second series is something I haven't come across so far. It would be really helpful if you could provide an example of such. Ideally for me would be a strategy that uses a second lower time frame request to allow for entries on the close of a daily bar.

      Comment


        #18
        Hi GrumpyTrader,

        Yes, that is correct, when optimizing the InstrumentName (and BarsPeriod) is not available as well.

        Below is a link to a post where I have provided an example as a MarketAnalyzer column that does a BarsRequest. The code used here can also be used in an indicator or strategy.
        http://ninjatrader.com/support/forum...886#post444886
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by firstlanetech, Today, 01:05 AM
        1 response
        3 views
        0 likes
        Last Post firstlanetech  
        Started by HiddenPhilosopher, Yesterday, 11:58 PM
        0 responses
        3 views
        0 likes
        Last Post HiddenPhilosopher  
        Started by glennts, Yesterday, 08:24 PM
        2 responses
        15 views
        0 likes
        Last Post bltdavid  
        Started by ibabinov, 11-12-2019, 09:50 AM
        3 responses
        66 views
        0 likes
        Last Post NinjaTrader_ShawnB  
        Started by PrimoItch, 05-27-2020, 04:35 PM
        2 responses
        18 views
        0 likes
        Last Post bkonia
        by bkonia
         
        Working...
        X