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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    57 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    78 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    41 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    101 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    61 views
    0 likes
    Last Post PaulMohn  
    Working...
    X