Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to get current bid/ask size

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

    How to get current bid/ask size

    Hello, I am trying to implement a scaling system to my strategy, is there any way to get the bid/ask size at a given moment? Eg. bid = 22 @ 100, ask = 13 @ 100.25? I do not want traded volume, but instead existing limit orders at the bid and ask. Thanks.

    #2
    Hello rbeckmann05,

    GetCurrentAskVolume() and GetCurrentBidVolume() would return the ask and bid size (as shown in ChartTrader or the SuperDOM).



    From my understanding, the ask and bid volume is the best price and number of shares waiting at that price, while the last volume would be the volume of most recent transactions.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea, so I came across that function when I was trying to impliment what I want, however it was giving me values in the 10s - 100s of thousands of contracts when entering. The code is very simple too, not sure how it would go wrong: EnterLong((int)GetCurrentAskVolume()). Any ideas?

      Comment


        #4
        Hello rbeckmann05,

        Is it a high volume instrument?

        Are you printing the value and comparing this to the ask and bid in chart trader?

        Are you sending a lot of orders?

        May I have you provide the output from printing order.ToString() in OnOrderUpdate()?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hi, sorry for late reply. Yes it is a high volume instrument, NQ and ES, however not high enough to have a bid/ask resting volume in the tens of thousands. When I print the volume it has the same effect. Not sending lots of orders, it enters once per day. I'm going to try it on a different, intraday strategy and see if it has the same results. If so, I'll send over those print statements

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Today, 05:17 AM
          0 responses
          50 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          126 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          69 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          42 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          46 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X