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

Volume indicator - What's wrong ?

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

    Volume indicator - What's wrong ?

    Hi everybody,

    Something's wrong with this code : I would like to get bid and ask volume per minut but it doesn't returns right numbers (I get more than 4000 contracts executed per minut with FDAX..)

    Code:
     
            protected override void Initialize()
            {
                Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Bar, "Plot0"));
    			Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot1"));
    			Add ("FDAX 09-15", PeriodType.Minute,1, MarketDataType.Ask);
    			Add ("FDAX 09-15", PeriodType.Minute,1, MarketDataType.Bid);
                Overlay				= false;
            }
    
            
            protected override void OnBarUpdate()
            {
              
                Plot0.Set(Volumes[1][0]);
    	    Plot1.Set(Volumes[2][0]);
            }
    Thanks you very much !

    #2
    Hello After,

    Is there something you are comparing with to know these values are incorrect?

    I am seeing some spikes in volume around 11:35 eastern where the volume of both bid and ask were above 8000 volume.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks for answering.

      Yes I'm comparing it to my DOM and to my Footprint volume. I mean, 8000 contracts in a minut on the FDAX is just insane (not possible). Look at my picture, it's volume with another indicator just before cash closing. I'm sure these numbers are the right ones
      Attached Files

      Comment


        #4
        Hello After,

        Who are you connecting to for data?

        If you open a chart to the FDAX 09-15 using bid data and you add the VOL indicator running with Calculate on bar close set to false, is the VOL bar incorrectly adding the bid volume as to what appears in the Level II window or the SuperDOM?

        I'm attempting to watch these build in real-time with the real-time data that is being sent and I am connected to Continuum.

        After I watch the bar build, I reload the data so that I can compare with what was collected in real-time and what is being saved as historical for the Continuum data feed. At this time, they do appear to match.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          I'm connected to continuum Sim account

          I did what you suggest -> there is an issue. We got line of 3/4/5 contracts per price in the Dom most of the time, and the volume shows numbers like 50/100/300/500 contracts executed in a small amount of time. There is definitely something wrong but I don't understand what, volume keyword or maybe I don't well understand it ?

          PS : The code below and VOL indicator show the same thing

          Comment


            #6
            Originally posted by After View Post
            I'm connected to continuum Sim account

            I did what you suggest -> there is an issue. We got line of 3/4/5 contracts per price in the Dom most of the time, and the volume shows numbers like 50/100/300/500 contracts executed in a small amount of time. There is definitely something wrong but I don't understand what, volume keyword or maybe I don't well understand it ?

            PS : The code below and VOL indicator show the same thing
            To clarify, the market data type.Ask/Bid are market data events sent out by the exchange and are NOT executions.

            If you want execution volume at the bid/ask, you'd need to compare the current bid/ask price and check the last price volume at that time.
            MatthewNinjaTrader Product Management

            Comment


              #7
              Okay thanks Matthew I got it !

              "If you want execution volume at the bid/ask, you'd need to compare the current bid/ask price and check the last price volume at that time."

              Would you have some code example to do this ? I didn't get well how to proceed.

              Thanks a lot

              Comment


                #8
                Originally posted by After View Post
                Okay thanks Matthew I got it !

                "If you want execution volume at the bid/ask, you'd need to compare the current bid/ask price and check the last price volume at that time."

                Would you have some code example to do this ? I didn't get well how to proceed.

                Thanks a lot
                Take a look at the BuySellVolume indicator.

                You could do this in OnBarUpdate like this indicator does, or OnMarketData().

                Note, that NinjaTrader 7 has some limitations that prevent this type of information from being fully analyzed historically, which is why that BuySellVolume indicator only works in real-time, but this is being overcome in NinjaTrader 8
                MatthewNinjaTrader Product Management

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by jclose, Today, 09:37 PM
                0 responses
                5 views
                0 likes
                Last Post jclose
                by jclose
                 
                Started by WeyldFalcon, 08-07-2020, 06:13 AM
                10 responses
                1,413 views
                0 likes
                Last Post Traderontheroad  
                Started by firefoxforum12, Today, 08:53 PM
                0 responses
                11 views
                0 likes
                Last Post firefoxforum12  
                Started by stafe, Today, 08:34 PM
                0 responses
                11 views
                0 likes
                Last Post stafe
                by stafe
                 
                Started by sastrades, 01-31-2024, 10:19 PM
                11 responses
                169 views
                0 likes
                Last Post NinjaTrader_Manfred  
                Working...
                X