Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Historical bid ask Series

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

    Historical bid ask Series

    Hello is it possible to use the following

    in the help guide for AddDataSeries it states :

    Syntax
    The following syntax will add another Bars object for the primary instrument of the script.
    AddDataSeries(BarsPeriod barsPeriod)
    AddDataSeries(BarsPeriodType periodType, int period)

    Can i have the following or the primary instrument ?

    AddDataSeries(string instrumentName, BarsPeriodType periodType, int period, MarketDataType marketDataType)

    I tried this

    AddDataSeries(this.Instrument.FullName.ToString(), BarsPeriodType.Tick, 1, MarketDataType.Ask);
    AddDataSeries(this.Instrument.FullName.ToString(), BarsPeriodType.Tick, 1, MarketDataType.Bid);

    but note also cannot reliably use Instrument in the parameters - although have seen the above referenced in other support notes and user was not explicitly told they could not do this.

    The objective is to use the historical bid/ask series and the historical portion triggered and processed in the OnBarUpdate. These would be referenced by the BarsInProgress # as with other AddDataSeries.

    So in trying to achieve processing the historical bid/ask series in onbarupdata and then the realtime primary in OnmarketData .... is this the intended process.

    Note i am not using tick replay in these scenarios which in onmarketdata uses only the MarketDataType.Last

    if this data is not available from data vendor .. does ninja substitute in values for the ask bid historical series?

    thanks

    #2
    Hello soulfx,

    I would recommend to follow the help guide's note on dynamically adding a data series. There may be some instances where it would work, but as it is not guaranteed, I would not advise to rely on it.

    The data provider will need to offer the Historical Bid and Ask data or that data will have to be available for the NinjaScript to add the data series. For example, Interactive Brokers would not be able to get Historical Bid/Ask data and an additional data feed would be required.

    A spreadsheet on the data offered by provider can be found here: https://ninjatrader.com/support/help...y_provider.htm

    Comment


      #3
      Hello Jim, thanks and yes the provider in question does provide historical bid/ask tick data.

      And yes i have read the dynamic adding dataseries information - but in you saying that is it not a current feature request to do so - i recall from other postings? If so pleas add my vote,

      However also you did not really answer my question :

      So - yes i have the historical bid/ask data available as connecting through Continuum/CQG...

      in using :

      AddDataSeries(this.Instrument.FullName.ToString(), BarsPeriodType.Tick, 1, MarketDataType.Ask);
      AddDataSeries(this.Instrument.FullName.ToString(), BarsPeriodType.Tick, 1, MarketDataType.Bid);

      Are you just stating this may or may not work with the first parameter ?

      Why is there not an overload that would default to the primary series?
      In this instance i am NOT wanting to use tick replay which doesnt work with this context anyway and is an alternative to using the tick replay? Can this be submitted as a feature request to have the additional overload aligned to the Primary Series?

      thanks

      Comment


        #4
        Hi there soulfx,

        The issue has to do with loading an additional data series using the name of the instrument before its name is guaranteed. These values are not guaranteed under State.Configure, so yes, I was stating this may or may not work.

        There is a popular feature request tracking interest behind dynamically adding additional data series. I will submit a vote for this request for you. That ticket ID is: SFT-882

        These ticket numbers will be listed in the Release Notes section of the help guide when they are implemented. Implementation is up to the development team's priorities and we cannot offer an ETA for any feature request.

        Release Notes can be found here: https://ninjatrader.com/support/help...ease_notes.htm

        Comment


          #5
          Thanks Jim, in addition to the known popular request - do you need to submit an additional one to support the additional overloads of MarketDataType.Bid/Ask/Last against the primary? or is this already included as part of the main one?

          Comment


            #6
            Hi soulfx,

            The ability to dynamically add dataseries would remove this limitation. I could submit a specific feature request for you, but as this feature request describes an equally applicable and more general solution that can be useful in many other applications, I found this feature request would be best suited for the case.

            As this feature request has a good amount of feedback already, it would have a higher priority than a new feature request.

            If you think this would be better placed in a separate feature request, please let me know.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            647 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            369 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            108 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            572 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            573 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X