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

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 geotrades1, Today, 10:02 AM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by ender_wiggum, Today, 09:50 AM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by rajendrasubedi2023, Today, 09:50 AM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by bmartz, Today, 09:30 AM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by geddyisodin, Today, 05:20 AM
    3 responses
    26 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Working...
    X