Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

T&S

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

    T&S

    Hi,

    I want something like :

    if (e.MarketDataType == MarketDataType.Last) {
    if (e.MarketDataType == MarketDataType.Bid) a = e.Volume;
    if (e.MarketDataType == MarketDataType.Ask) b = e.Volume;
    }

    I want to access the MarketDataType.Last hit at the bid (and below) and the MarketDataType.Last hit at the ask (and above). How to do that ?

    I tried comparing e.Price with the price of the tick before but unfortunately I don't get what I want. Rising/falling price doesn't always mean the ask/bid is hit.

    Thanks

    #2
    Hi sam30,

    You sound like you want your own Level II book. Please see this reference sample for how to do that: http://www.ninjatrader-support.com/v...ead.php?t=3478
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      I know this SampleMarketDepth.cs
      My question is more with the T&S than the market depth.

      I'd like to know if the last tick was traded at the ask or the bid.
      --> so if MarketDataType.Last was traded at the ask or the bid.

      It should be possible to do as the T&S in NT has different colours for the bid, below the bid, for the ask and above the ask.

      Comment


        #4
        Hi sam30,

        I see. Maybe you can try this. Create your own bid/ask ladder with OnMarketDepth() then compare it to the last tick price?

        Or maybe you can try storing the bid/ask event and then comparing it to the last event directly.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Hi Sam30/NinjaTrader_Josh,

          I would like to do something very similar. What I would like is to:
          1) Identify the last trade (to either hit the bid side or the ask side)
          2) Identify the volume
          3) Identify which ECN / MM did it come from (if possible)
          4) Write the information out to a file/database for later analysis

          Is that doable? If so, can you provide sample code?

          Thanks,
          B-

          Comment


            #6
            Blade,

            It is doable, but will require a lot of coding. Unfortunately there is no sample code available.

            To get the last trade you can try proceeding with my earlier suggestion of running your own price ladders and then comparing it on there when you get the last tick.

            Identifying volume is easier. To get the total volume of the bar you can do something like Volume[0]. To get volume of the last trade only you can do e.Volume inside OnMarketData() or OnMarketDepth().

            This is generally not available unless your data provider offers this data. In that case you can get to it by using OnMarketDepth(). Please use e.MarketMaker. (http://www.ninjatrader-support.com/H...EventArgs.html)

            To write out to a file please see this reference sample: http://www.ninjatrader-support.com/v...ead.php?t=3475
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Thanks Josh.

              In that case can you tell me which of the supported data providers offers this data? Is there a brokerage firm that would provide this type of data to their clients for free?

              Furthermore, since I am experimental stage of building a trading system using this data, do you know of any place that I can download one to six month of historical T&S and market depth data (regardless of how old it might be or the type of instrument)?

              Thanks again,
              B-

              Comment


                #8
                Break down of the supported data feeds can be found here: http://www.ninjatrader-support.com/H...HistoricalData

                You will need Level II data and you would need to come into contact with the data providers directly as many have a whole suite of services they offer. You will need to find one that suits you.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Josh;
                  You mean compare the Last to the latest Bid and Ask then determine where it falls in relation to those two?
                  Is this how you manage your T&S color scheme?
                  thanks

                  Originally posted by NinjaTrader_Josh View Post
                  Hi sam30,

                  I see. Maybe you can try this. Create your own bid/ask ladder with OnMarketDepth() then compare it to the last tick price?

                  Or maybe you can try storing the bid/ask event and then comparing it to the last event directly.

                  Comment


                    #10
                    Yes, you need to compare the last trade event to stored prices for last bid/ask.
                    RayNinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by MaybellMcKee, Today, 10:18 PM
                    0 responses
                    6 views
                    0 likes
                    Last Post MaybellMcKee  
                    Started by Lance El Camino, Today, 04:14 PM
                    1 response
                    13 views
                    0 likes
                    Last Post s.kinra
                    by s.kinra
                     
                    Started by jtrading82, Today, 04:56 PM
                    1 response
                    9 views
                    0 likes
                    Last Post NinjaTrader_ShawnB  
                    Started by dmking, Today, 06:00 PM
                    1 response
                    6 views
                    0 likes
                    Last Post NinjaTrader_EricB  
                    Started by WHICKED, Today, 03:23 PM
                    1 response
                    12 views
                    0 likes
                    Last Post NinjaTrader_ChelseaB  
                    Working...
                    X