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 aggressive buy/sell volume is calculated

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

    how aggressive buy/sell volume is calculated

    Hi team,

    I am calling functions in NinjaTrader.Client.DLL to update external data source to NinjaTrader. These functions include Ask(), Bid(), Last() and corresponding Playback() function to update both realtime and historical data.

    Since buy volume and sell volume is critical in orderflow footprint charts, I would like to know how these values are updated. In API functions I see no parameters updating buy/sell volume explicitly. Are these value calculated automatically or I need to call another function to calculate them explicitly? Or I can't have these values at all while importing data from external source.

    Any hint on this? Thank you!
    Charles

    #2
    Hello Charles,

    Thanks for your post.

    Buy volume and sell volume is determined where a Last tick lies in reference to the bid/ask prices. This can be checked in OnBarUpdate by comparing BarsArray[1].GetBid and BarsArray[1].GetAsk to the last price of that tick where the first added data series in the script is a single tick Last series, and the data provider supports bid/ask stamped ticks.

    The BuySellVolume indicator that comes with the platform uses OnMarketData to see where the last tick lies in comparison to the bid/ask.

    The DLL interface allows you to specify volume for individual Bid Ask or Last MarketDataTypes with each tick that is called with Last() Ask() or Bid(). The Dll interface does not provide an avenue to provide bid/ask stamped Last ticks, and testing our BuySellVolume indicator with a test application that is used to send Bid/Ask and Last through the external data feed, results are not displayed.

    Because of the above, I would not suggest using the External Data Feed to test differentiating buy/sell volume. I would instead suggest using a real data provider or the Playback connection for testing scripts that need to perform this function.

    I have attached a modification of the BuySellVolume indicator that adds a single tick data series for volume analysis that can be compared against our BuySellVolume indicator.

    The DLL interface is provided as-is and support is limited to the resources available below.

    DLL interface - https://ninjatrader.com/support/help.../functions.htm

    Example application (Unsupported example) - https://ninjatrader.com/support/foru...442#post514442

    We look forward to assisting.
    Attached Files
    JimNinjaTrader Customer Service

    Comment


      #3
      Hi Jim,

      Thank you for your response. Let me clarify my understanding:
      1. the buy/sell volume is calculated on the fly with tick data everytime I load an indicator on NT. There is no backend database structure storing buy/sell volume permanently.
      2. If I bought the lifetime NT license with OrderFlow(R) functionality, the cummulative delta and footprint charts work as indicators and they calculate buy/sell volumes on the fly with tick data when I load the indicators in NT.

      Comment


        #4
        Hello Charles,

        You understand correctly on both points.

        Please let us know if we can assist you further.
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by jaybedreamin, Today, 05:56 PM
        0 responses
        7 views
        0 likes
        Last Post jaybedreamin  
        Started by DJ888, 04-16-2024, 06:09 PM
        6 responses
        18 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by Jon17, Today, 04:33 PM
        0 responses
        4 views
        0 likes
        Last Post Jon17
        by Jon17
         
        Started by Javierw.ok, Today, 04:12 PM
        0 responses
        12 views
        0 likes
        Last Post Javierw.ok  
        Started by timmbbo, Today, 08:59 AM
        2 responses
        13 views
        0 likes
        Last Post bltdavid  
        Working...
        X