Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

OnMarketData : Last price between Bid and Ask?

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

    #16
    A bit late for this discussion, but is it possible that once in awhile a market buy order gets filled by a market sell order?

    Comment


      #17
      Hello ganamide,

      Thank you for your post.

      Yes, this can occur. As each order is not specific to an enter or exit even though they may be named so in the UI. For example, NinjaScript uses EnterLong and EnterShort. Yet these are technically just a Buy Market and Sell Market.

      If I was long and submitted an EnterShort through a NinjaScript Strategy it would close my position (if they were for the same contract size).

      With that being said, let's say that we are flat and submit both an EnterLong and EnterShort. One of these orders will be ignored based on the Managed Approach Internal Order Handling Rules. Please take a look at the information at the following link: http://www.ninjatrader.com/support/h...d_approach.htm

      Please let me know if you have any questions.

      Comment


        #18
        Thanks Patrick, but I was talking about the market data coming from the futures exchange. Is it possible that they match two market orders resulting in a trade between best bid/offer? I don't think there are dark pools in futures or that brokers can fill orders before sending them to the exchange, can they?

        Comment


          #19
          Hello ganamide,

          You are correct that the exchange has to confirm a fill. Can you detail the two orders further? Do you mean a buy and a sell order filling at the same time on the exchange?

          Comment


            #20
            Yes, two market orders, a buy and sell, filling each other, resulting in a trade at a price between the best bid and offer. This thread is about "OnMarketData : Last price between Bid and Ask?" Is my suggestion a valid explanation for this phenomenon, or is there something wrong with the feed, or perhaps NT is not processing the events in the correct order? Thanks.

            Comment


              #21
              Hello ganamide,

              The events are "as-is" from the provider, the NinjaTrader Platform does not "process" the events until they are received and they are processed in the order received. The Last Trader Price is the Last Traded Price, even if that is between what the last reported bid and ask were at.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by pibrew, Today, 06:37 AM
              0 responses
              4 views
              0 likes
              Last Post pibrew
              by pibrew
               
              Started by rbeckmann05, Yesterday, 06:48 PM
              1 response
              14 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
              11 views
              0 likes
              Last Post burtoninlondon  
              Started by AaronKoRn, Yesterday, 09:49 PM
              0 responses
              16 views
              0 likes
              Last Post AaronKoRn  
              Working...
              X