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

How to obtain buy and sell volume from market open to current time

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

    How to obtain buy and sell volume from market open to current time

    Hi,
    Is there any way to obtain or count a buy and sell volume from point A -> B?
    ex. from market open to current time

    #2
    Hello xulu13,

    Thanks for your post and welcome to the NinjaTrader forums!

    From a charting perspective, you can create a chart with a minute bar size set to 1440 minutes and then apply a trading hours template that uses RTH hours (for example CME USIndex Futures RTH), tuen on Tick replay, and then apply the indicator BuySellVolume. As the bar builds for the day, the BuySellVolume will build providing you with an up to the tick summary of buy and sell volume. Please note that the buysellvolume indicator shows a "stacked bar", the sell volume is the sell volume, the buy volume is the buy volume plus the sell volume, so you would need to subtract the buy volume from the sell volume to have direct numbers.


    Alternately, it would be possible to create a custom indicator to pull buy sell volume information either from Volumetric Bars (requires lifetime license) or from the BuySellVolume indicator.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Hi Paul,

      Thank you for the solution and I actually created an indicator by reusing part of the BuySellVolume indicator. The downside is it cannot access the historical data, let's say I run this indicator at 10AM - it has no data of a buy-sell volume before 10am and only do a calculation from 10AM and forward.

      Is there any way I can access the historical data? Your previous reply mentioned 'RTH' but I'm not quite sure what it is.

      Comment


        #4
        Hello xulu13,

        Thanks for your reply.

        RTH is Regular Trading Hours ( as opposed to ETH Extended Trading Hours). You can change the trading hours that the data series display data over. when you mentioned Market Open I assumed, perhaps incorrectly, that you meant the regular trading hours

        In order to see historical buysell volume you would need to turn on 'Tick Replay", assuming you have access to historical tick data. You first enable it for the platform and then you can enable by data series as it will add a check box for enabling tick replay on that data series.

        To enable Tick Replay for the platform, go to Tools>Options>MarketData and check "show Tick replay", this only needs to be done once.

        I've attached a screenshot to help clarify both: The yellow rectangle displays where you would enable it for the data series (after first enabling it for the platform) and the orange rectangle shows where the Trading hours templates can be selected.

        Click image for larger version

Name:	xulu13.PNG
Views:	617
Size:	87.5 KB
ID:	1138530
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Hi Paul,
          Thanks! this should works. Last question, why 1440 minutes?

          Comment


            #6
            Hello xulu13,

            Thanks for your reply.

            Good question!

            1440 equals 24 hrs x 60 minutes. We use that when wanting to get a day's worth of data and be able to pull out what data we want with the Trading Hours. A Daily bar is fixed ETH type and no trading hours template will change that.

            Paul H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by funk10101, Today, 12:02 AM
            1 response
            10 views
            0 likes
            Last Post NinjaTrader_LuisH  
            Started by GLFX005, Today, 03:23 AM
            1 response
            6 views
            0 likes
            Last Post NinjaTrader_Erick  
            Started by nandhumca, Yesterday, 03:41 PM
            1 response
            12 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by The_Sec, Yesterday, 03:37 PM
            1 response
            11 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by vecnopus, Today, 06:15 AM
            0 responses
            1 view
            0 likes
            Last Post vecnopus  
            Working...
            X