Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BidAsk Historical...

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

    BidAsk Historical...

    Does NT7 remember bid ask historical data now?

    #2
    If by "remember" you mean that bid/ask data would be stored as you record historical chart data, then yes.

    Comment


      #3
      actually, what I meant was, realtime bid and ask volume on some indicators gets wiped when you refresh the chart, for instance, the volume profile, or VolumeUpDown. Is this still the case?

      Comment


        #4
        Yes, VolumeProfile and VolumeUpDown start from scratch as you throw them on chart.

        Comment


          #5
          Hi,

          Is there a way to access historical bid/ask data ? It doesn't seem possible in either indicators or bartypes ??

          Comment


            #6
            Sure, there e.g. is signature below which you should see in intellisense:

            void Add(string instrumentName, Data.PeriodType periodType, int period, Data.MarketDataType marketDataType)

            Comment


              #7
              Ok that works, but then there is no way to link the bid/ask values to the price values. They are just other charts. So in that case I suppose there would be no way to compute the historical delta volume....

              Comment


                #8
                They would be "independent" series.

                Comment


                  #9
                  Originally posted by NinjaTrader_Dierk View Post
                  If by "remember" you mean that bid/ask data would be stored as you record historical chart data, then yes.
                  Dirk, if bid/ask data is stored as chart data is recorded..
                  does this mean that VolumeProfile is wiped clean because of the way it was written and not upgraded for 7 or that we simply can not backfill stuff made using onmarketdata() in 7 like we could not in 6.5?

                  Comment


                    #10
                    >> that we simply can not backfill stuff made using onmarketdata() in 7 like we could not in 6.5
                    Your understanding is correct.

                    Comment


                      #11
                      I tried to reconstruct historical data using on chart by adding tick data bars.
                      Code:
                          
                              protected override void Initialize()
                              {
                                  Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "P1"));
                                  Add(new Plot(Color.FromKnownColor(KnownColor.Red), PlotStyle.Line, "P2"));
                                  Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "P3"));
                      
                                  Add(Instrument.FullName,PeriodType.Tick,1,MarketDataType.Last);
                                  Add(Instrument.FullName,PeriodType.Tick,1,MarketDataType.Ask);
                                  Add(Instrument.FullName,PeriodType.Tick,1,MarketDataType.Bid);
                      
                                  
                              }
                      
                              protected override void OnBarUpdate()
                              {
                          
                                 P1.Set(Closes[0][0]);
                                 P2.Set(Closes[1][0]);
                                 P3.Set(Closes[2][0]);
                              }
                      But the fact is that it uses a lot of time and memory, because the bid/ask bar array is very large, even for a 5 days history. So I don't think it will be easily usable , except maybe for intraday memory.

                      Comment


                        #12
                        What about writing/reading from a filestream? Would that be a viable solution?

                        Comment


                          #13
                          What would be cool would be to publish the spec of the ntd files.... Then we could read them by custom programming...

                          Comment


                            #14
                            Originally posted by gomifromparis View Post
                            Ok that works, but then there is no way to link the bid/ask values to the price values. They are just other charts. So in that case I suppose there would be no way to compute the historical delta volume....
                            I don't have the beta to mess around with yet but doesn't this depend on how these are updating:
                            Add(Instrument.FullName,PeriodType.Tick,1,MarketDa taType.Ask);
                            Add(Instrument.FullName,PeriodType.Tick,1,MarketDa taType.Bid);

                            I take it since you mentioned that the bid/ask bar array is very large, these update on each change of the bid/ask and are not just a snapshot of what the bid/ask was when last goes off...
                            Wouldn't a way to get historic delta volume then be to compare the timestamp of last with the timestamp of the bid and ask and see if its at/above/below/between?

                            I soppose I was expecting 7 to have a historic version of onmarketdata(), but with storing bid/ask this seems even more thorough, more a question of filtering out what we don't need.

                            Comment


                              #15
                              darthtrader,

                              It is possible to have many ticks with the same time stamp.
                              Josh P.NinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by llanqui, Yesterday, 10:29 AM
                              3 responses
                              22 views
                              0 likes
                              Last Post llanqui
                              by llanqui
                               
                              Started by cshox, Today, 11:11 AM
                              1 response
                              3 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Started by Seneca, 08-25-2020, 08:31 AM
                              4 responses
                              5,953 views
                              0 likes
                              Last Post Tin34
                              by Tin34
                               
                              Started by TAJTrades, Today, 11:03 AM
                              0 responses
                              3 views
                              0 likes
                              Last Post TAJTrades  
                              Started by wuannetraam, Today, 02:40 AM
                              3 responses
                              26 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Working...
                              X