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

Time and Sales and DOM data

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

    Time and Sales and DOM data

    Is there a way to retrieve the activity in the Time and Sales window and the number of contracts sitting at each level in the DOM?

    Thank you in advance.

    #2
    imported post

    Not supported at this point.

    Comment


      #3
      time and sales data differentiation

      Am I understanding well that NinjaTrader does not support a way to differentiate (in the Time and Sales window), while using the function OnMarketData (in the script window when making indicators) the difference between:
      At Ask,
      At Bid,
      Below Bid and
      Above Ask?

      If so, what is the use. One of the most important finctions is omited. I am almost suspicious as to "WHY?
      Please let me know if I can control how much shares have been sold or bought against the Last Price. That is so simple- that is confusing me as to why it is not supported (if so).

      How can I solve that problem? Get another software?

      Comment


        #4
        Dear Dierk/NT
        I would like to make calculations on the actual sales data (what was sold/bought, and how much of it). That is the Time and Sales window. How can I translate its propertis into functions in the script? I also tried to use the OnMarketData but get either [mixed ask and bid entries] or altogether mixed [the ask/bid from Level II and the actual up/down sales]. I would like to differentiate them. The e.Price function gives it to me but all of them mixed. Is there a function that I can call and COMPARE WHAT IS ASK AND WHAT IS BID (from the sold shares) AGAINST THE LAST PRICE?
        If so, please let me know. If not so, the I need to consider getting another software.
        pss:
        Also, is there a simple way to make a variable and find out whether the last sale was lower or higher then the LAST Price?
        Thanks, lamass

        Comment


          #5
          lamass, for your use : have you already looked into the PowerVolume indicators, specifically the BuySellVolume we ship per default with our NinjaTrader?



          Their code would be open as well so you could review for your own projects.

          For working in OnMarketData / OnMarketDepth, please be sure to filter the events returned by what event arg called the method (i.e bid / ask / last ...) -

          BertrandNinjaTrader Customer Service

          Comment


            #6
            Thank you. Would you refer me to any reference as to how to filter the OnMarketData.Last ? Basically I get it all meshed with the ask/bid from level II- while I need just the bid/ask of the already bought/sold shares.
            Thanks for your help.
            lamass

            Comment


              #7
              To work on the current .Last event only, just put your logic after this if () condition:

              protected override void OnMarketData(MarketDataEventArgs e)
              {
              if (e.MarketDataType == MarketDataType.Last)
              }

              This would then not react then to any bid / ask / other args the OnMarketData() would normally be called for as well.
              BertrandNinjaTrader Customer Service

              Comment


                #8
                my system was not ok- on reinstallation it worked

                Hi, Thanks for the tips!
                I'm trying to convert an indicator (already existing from NT) to my needs and get an error that I can not. I also can not just copy and paste the code in a different file. Is there a way to use the existing indicators- and then experiment with adding code? And how?
                thanks, lamass

                this post is not relevant. On reinstallation it worked. One can copy and paste code form existing indicators- and work with them.
                Last edited by lamass; 01-25-2012, 02:18 AM. Reason: not relevant any more

                Comment


                  #9
                  Dear Bertrand,
                  Thank you for your reply.
                  My problem is that after usindg this code :

                  protectedoverridevoid OnMarketData(MarketDataEventArgs e)
                  {
                  if (e.MarketDataType == MarketDataType.Last)
                  Print(
                  "Last = " + e.Price + " ....." + e.Volume);



                  //I get BOTH sales at the bid and at the ask price.


                  //If I add this code:



                  if (e.MarketDataType == MarketDataType.Ask)
                  Print(
                  "Ask = " + e.Price + " ....." + e.Volume);

                  }

                  then I get also the Level II, intermeshed- which is a chaos of data.

                  I want to just work with the bid and ask from the actual Sales window. How can I divide the 'MarketDataType.Last' into the 'ask' and 'bid' sales? That is the question Now!
                  Thank you for your help!

                  pssCan I compare it to something like 'Price' of 'last sale' or 'current price'?)

                  Comment


                    #10
                    lamass, I have just replied to your note sent directly to support this morning.
                    BertrandNinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by alvarosiegar, 05-15-2018, 05:58 PM
                    11 responses
                    3,184 views
                    0 likes
                    Last Post NinjaTrader_BrandonH  
                    Started by maybeimnotrader, Yesterday, 12:58 PM
                    1 response
                    9 views
                    0 likes
                    Last Post NinjaTrader_Eduardo  
                    Started by James Cowart, Yesterday, 10:55 AM
                    1 response
                    13 views
                    0 likes
                    Last Post NinjaTrader_Eduardo  
                    Started by Misplace, Today, 11:55 AM
                    0 responses
                    5 views
                    0 likes
                    Last Post Misplace  
                    Started by dtaylor, Yesterday, 02:24 AM
                    1 response
                    10 views
                    0 likes
                    Last Post NinjaTrader_Eduardo  
                    Working...
                    X