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

Volumetric Bars & OnMarketData

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

    Volumetric Bars & OnMarketData

    Hello NinjaTraders,

    I used OnMarketData () to capture the volume for each price. But when I checking and comparing with the volumetric bar I found two completely different results.
    I would like to know the meaning of "marketDataUpdate.Volume" (in other words: what does this volume represent) and why this volume does not correspond to the volume of the bar.

    Thanks
    M.GHORBEL
    Attached Files

    #2
    Hello MGHORBEL, thanks for your post.

    The marketDataUpdate.Volume property is the volume of the trade that OnMarketData was called for. The volume update can be for the Bid, Ask, or Last price type. The best indicator to reference against the Volumetric bars would be the BuySellVolume indicator. Those two indicators will always match up. Please also have a look at this page on developing for tick replay to access historical bid/ask prices:

    https://ninjatrader.com/support/help...ick_replay.htm

    Please let me know if you have any questions on this material.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Hello NinjaTrader_ChrisL

      Thank you for your reply.

      At the moment I am not interested in tick replay.

      I added the BuySellVolume indicator and compared the volumes. indeed the volume of the indicator corresponds to the volumetric bar but these last two do not correspond to the marketDataUpdate.Volume (for Ask, Bid or Last).

      I would like to know that this volume represents "marketDataUpdate.Volume" when marketDataUpdate.MarketDataType == MarketDataType.Bid?

      I understood (in this case: marketDataUpdate.MarketDataType == MarketDataType.Bid) that there is marketDataUpdate.Volume contract executed on purchase. In just one second the total volume can run has exceeded hundreds or sometimes more. And that I do not see realistic.

      sorry to insist but this is very important for my code.

      M.GHORBEL

      Comment


        #4
        Hello MGHORBEL, thanks for your reply.

        The Ask and Bid updates represent the Highest/Lowest price willing to trade, the bid/ask volume would be the number of contracts willing to be traded at that bid/ask price. As the data stream comes in, you will see a series of Bid/Ask updates, then eventually you will see a "Last" update. The Last volume would match one of the bid or ask volume updates that happened previously.

        Please let me know if I can assist any further.
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          Hello NinjaTrader_ChrisL

          Thank you very much.

          Best Regards,
          M.GHORBEL

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by rocketman7, Today, 02:12 AM
          7 responses
          31 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by guillembm, Yesterday, 11:25 AM
          3 responses
          16 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by junkone, 04-21-2024, 07:17 AM
          10 responses
          149 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by tsantospinto, 04-12-2024, 07:04 PM
          6 responses
          101 views
          0 likes
          Last Post tsantospinto  
          Started by trilliantrader, 04-18-2024, 08:16 AM
          7 responses
          28 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Working...
          X