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

Getting the Total # of Contracts

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

    Getting the Total # of Contracts

    How can I get the Total # of Buy Contracts that are listed in the DOM ?

    (and how about Total # of Sell Contracts) ?

    thanks

    #2
    Hi NinjaCustomer,

    Thank you for posting.

    There is no correlation to use NinjaScript to access any info from the SuperDOM.

    Each Strategy is a separate instance that is used in the chart system.

    This will allow the script to use the historical data to calculate the entry/exit conditions that would be needed for the code.

    Let me know if I can be of further assistance.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      maybe I'm misunderstanding where I should be looking for the data...

      all I want to do is to code something using the same kind of data that the NinjaTrader BuySellVolume indicator uses... where does BuySellVolume get its data about the # of contracts bought and sold from? with what API calls? thanks

      Comment


        #4
        NinjaCustomer,

        The BuySellVolume indicator calculates if Close[0] >= GetCurrentAsk() or if Close[0] <= GetCurrentBid()
        It then uses this information to plot the indicator with the bid and ask volume.
        Cal H.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Cal View Post
          NinjaCustomer,

          The BuySellVolume indicator calculates if Close[0] >= GetCurrentAsk() or if Close[0] <= GetCurrentBid()
          It then uses this information to plot the indicator with the bid and ask volume.
          And calculate ask or bid by price ...is there an API or subfunction to do that? Tnx

          Comment


            #6
            Ketron82,

            You can use OnMarketData() to use when bid or ask prices come in.
            http://www.ninjatrader.com/support/h...marketdata.htm

            Let me know if I can be of further assistance.
            Cal H.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Cal View Post
              Ketron82,

              You can use OnMarketData() to use when bid or ask prices come in.
              http://www.ninjatrader.com/support/h...marketdata.htm

              Let me know if I can be of further assistance.
              Many thanks...I opened another thread ("Simple Total FootPrint Bid x Ask") and now I'm testing the OnMarketData() function.
              Many thanks again

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by bortz, 11-06-2023, 08:04 AM
              47 responses
              1,606 views
              0 likes
              Last Post aligator  
              Started by jaybedreamin, Today, 05:56 PM
              0 responses
              8 views
              0 likes
              Last Post jaybedreamin  
              Started by DJ888, 04-16-2024, 06:09 PM
              6 responses
              18 views
              0 likes
              Last Post DJ888
              by DJ888
               
              Started by Jon17, Today, 04:33 PM
              0 responses
              4 views
              0 likes
              Last Post Jon17
              by Jon17
               
              Started by Javierw.ok, Today, 04:12 PM
              0 responses
              13 views
              0 likes
              Last Post Javierw.ok  
              Working...
              X