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 Rapine Heihei, Today, 08:19 PM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by Rapine Heihei, Today, 08:25 PM
        0 responses
        4 views
        0 likes
        Last Post Rapine Heihei  
        Started by f.saeidi, Today, 08:01 PM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by Rapine Heihei, Today, 07:51 PM
        0 responses
        6 views
        0 likes
        Last Post Rapine Heihei  
        Started by frslvr, 04-11-2024, 07:26 AM
        5 responses
        96 views
        1 like
        Last Post caryc123  
        Working...
        X