Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

MarketDataType.DailyVolume???

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

    MarketDataType.DailyVolume???

    Hi, I would like to know what kind of volume this is? Why is the value not the same as with the volume indicator on a daily basis?

    I have a strategy (OnBarClose) and would like to process the intraday volume. That's why I wanted to do this with this method, and have noticed that the volumes are not the same.

    Code:
    if (e.MarketDataType == MarketDataType.DailyVolume)
    {[INDENT]CurrentDayVolume = e.Volume;[/INDENT]
     }
    Attached Files
    sidlercom80
    NinjaTrader Ecosystem Vendor - Sidi Trading

    #2
    Hello sidlercom80,

    The MarketDataType.DailyVolume would be the daily volume metric which your data provider has calculated on the server side. That could be different from the volume series for a variety of reasons such as the session which that was counting volume for. If you are trying to calculate the daily volume from any series then you would need to use the historical Volume series or count the volume which is coming in with the OnMarketData override and MarketDataType.Last events. You can see the .VolumeCounter indicator for an example of working with the Volume series or the VolumeProfile indicator for working with the OnMarketData volume.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    43 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    30 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    48 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    38 views
    0 likes
    Last Post CarlTrading  
    Working...
    X