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 Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    566 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    330 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    547 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    548 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X