Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Custom bar logic access parameters Bid and Ask Volume OnDataPoint() does not include

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

    Custom bar logic access parameters Bid and Ask Volume OnDataPoint() does not include

    Hi,

    I'd like to ask a question related to custom bars.

    OnDataPoint parameters include ask price and bid price.

    What is doesn't include is ask volume and bid volume in other words;
    GetCurrentAskVolume() and GetCurrentBidVolume() or
    if (marketDataUpdate.MarketDataType == MarketDataType.Ask)askVol = marketDataUpdate.Volume;
    if (marketDataUpdate.MarketDataType == MarketDataType.Bid)bidVol = marketDataUpdate.Volume;

    How can we utilise Ask Volume and Bid Volume within custom bar logic?

    Appreciate any feedback as to how this can be achieved.

    Thanks in advance,
    suprsnipes.

    #2
    Hello suprsnipes,

    Unfortunately, getting the ask volume and bid volume from a custom bar type is not supported.

    In strategies and indicators this can obtained (from OnMarketData), and in addons this can be obtained from a pair of BarsRequests, however BarsType scripts, which we do not support calling a BarsRequest within, would not have a supported abillity for this.

    A similar inquiry was made in the forum thread below. Some undocumented and unsupported tips were provided.
    Dear NinjaTrader Support Team, i am trying to create a custom bars type which includes additional data in the form of a list of custom objects. This seems to work pretty well but i am not able to serialize the custom list with my bars type. So currently i need to put an XmlIgnore in Front of my list to make this work.


    I am happy to submit a feature request for the development team to consider providing the ask and bid volume to OnDataPoint() if you would like.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    89 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    144 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    83 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    257 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    335 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X