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 rbeckmann05, Yesterday, 06:48 PM
        1 response
        12 views
        0 likes
        Last Post bltdavid  
        Started by llanqui, Today, 03:53 AM
        0 responses
        6 views
        0 likes
        Last Post llanqui
        by llanqui
         
        Started by burtoninlondon, Today, 12:38 AM
        0 responses
        10 views
        0 likes
        Last Post burtoninlondon  
        Started by AaronKoRn, Yesterday, 09:49 PM
        0 responses
        15 views
        0 likes
        Last Post AaronKoRn  
        Started by carnitron, Yesterday, 08:42 PM
        0 responses
        11 views
        0 likes
        Last Post carnitron  
        Working...
        X