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

Volume Bars Calculation

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

    Volume Bars Calculation

    I'm building an indicator that processes every tick on a 5000 volume bar chart.

    I'm trying to understand how the onmarketdata() method is handled towards the end of a volume bar being fulfilled. Say its at 4900 volume complete and the next tick to come in has a volume of 500.

    How will the method process in this case? Will the method calculate on the 4900 bar? Or will it calculate on the new bar? Or will it split 100 volume off and calculate the 5000 bar and then calculate again on the new 400 bar?

    Thanks.

    #2
    Tight Face, the OnMarketData() method is called for every Level 1 change, thus if the bar is finished or not would not be relevant for it's call.

    For the OnBarUpdate() in the situation you describe you would see it call at the end of the 5000 Volume bar, 100 contracts added to the 4900 bar to complete it and then the next bar start with the remaining 400 contracts.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Bertrand, thanks for the clarification.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Max238, Today, 01:28 AM
      5 responses
      40 views
      0 likes
      Last Post Max238
      by Max238
       
      Started by giulyko00, Yesterday, 12:03 PM
      3 responses
      12 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by habeebft, Today, 07:27 AM
      1 response
      14 views
      0 likes
      Last Post NinjaTrader_ChristopherS  
      Started by AveryFlynn, Today, 04:57 AM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_Erick  
      Started by r68cervera, Today, 05:29 AM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X