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 zstheorist, Today, 07:52 PM
              0 responses
              3 views
              0 likes
              Last Post zstheorist  
              Started by pmachiraju, 11-01-2023, 04:46 AM
              8 responses
              149 views
              0 likes
              Last Post rehmans
              by rehmans
               
              Started by mattbsea, Today, 05:44 PM
              0 responses
              5 views
              0 likes
              Last Post mattbsea  
              Started by RideMe, 04-07-2024, 04:54 PM
              6 responses
              33 views
              0 likes
              Last Post RideMe
              by RideMe
               
              Started by tkaboris, Today, 05:13 PM
              0 responses
              5 views
              0 likes
              Last Post tkaboris  
              Working...
              X