Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Real time data order flow

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

    Real time data order flow

    Hello,
    I'm using the orderflow in order to see the total buying volume and the total selling volume, Right now I have the Calculate= calculate.OnBarUpdate, but of course even using the 1 second time frame with the indicator,I'm getting the data every one second. thus, I'm getting the data not of the actual candle, but of the previous one, and I was wondering how can I get the data of the current candle?
    I'm using something like :......volumetrics[CurrentBar], but it's not the current it's the previous. Changing with calculate.OnEachTick it doesn't change anything, maybe because I added the data series volumetric 1 second. How can I manage to have the Real time?Do i have to write currentbar-1?
    Thank you!

    #2
    Hello AlessioCianini12,

    Thanks for your post.

    If you are using the Order Flow Volumetric Bars indicator in a custom NinjaScript, you could get the Total Buying Volume and Total Selling Volume using the following code.

    Print("Total Buying Volume: " + barsType.Volumes[CurrentBar].TotalBuyingVolume);
    Print("Total Selling Volume: " + barsType.Volumes[CurrentBar].TotalSellingVolume);


    See the help guide documentation below for information and an example of how to use the Order Flow Volumetric Bars indicator in a custom NinjaScript.

    Order Flow Volumetric Bars: https://ninjatrader.com/support/help...tric_bars2.htm

    Also, see the attached example script demonstrating this. Note that if you would like to have the values printed to the Output window at the close of a bar, you would use Calculate.OnBarClose. If you would like the prints to update with each tick, you would use Calculate.OnEachTick.

    Let us know if we may assist further.
    Attached Files
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    666 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    377 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    110 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    575 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    580 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X