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 MarianApalaghiei, Today, 10:49 PM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by love2code2trade, Yesterday, 01:45 PM
    4 responses
    28 views
    0 likes
    Last Post love2code2trade  
    Started by funk10101, Today, 09:43 PM
    0 responses
    8 views
    0 likes
    Last Post funk10101  
    Started by pkefal, 04-11-2024, 07:39 AM
    11 responses
    37 views
    0 likes
    Last Post jeronymite  
    Started by bill2023, Yesterday, 08:51 AM
    8 responses
    46 views
    0 likes
    Last Post bill2023  
    Working...
    X