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

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
    Brandon H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by slimcactus, Today, 10:26 AM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by Monares, Today, 10:49 AM
    3 responses
    17 views
    0 likes
    Last Post NinjaTrader_JustinD  
    Started by d122y, Today, 10:20 AM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by trader3000a, Today, 06:41 AM
    1 response
    14 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by trader3000a, Today, 09:23 AM
    5 responses
    19 views
    0 likes
    Last Post trader3000a  
    Working...
    X