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

Order Flow Delta Bar data

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

    Order Flow Delta Bar data

    I'm building a strategy that detects if the latest order flow delta bar is over 1000. Since you cant access the order flow data directly, i made a SMA (1 period) of the delta bar. This works if my chart is updating per bar (Calculate.OnBarClose) but has trouble detecting it when my strategy is set to update "Calculate.OnEachTick" or "Calculate.OnPriceChange".

    My code is

    Code:
    if ((High[0] > High[1]) //entry
    &&
    (SMA1[1] > 1000))
    Any idea?

    Thanks!

    #2
    Hi Ousher, thanks for your post.

    If the Strategy Builder is being used to make the strategy then using the OrderFlow tools will not be possible because we require two things: a one tick series to be added using AddDataSeries(), which can be done in the builder, and to update the indicator on each tick of the 1 tick series; that can not be performed in the builder. There's a full code example using Cumulative Delta here.

    Kind regards,
    -ChrisL

    Chris L.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by AdamDJ8, Today, 09:18 PM
    0 responses
    2 views
    0 likes
    Last Post AdamDJ8
    by AdamDJ8
     
    Started by knowmad, Today, 03:52 AM
    2 responses
    26 views
    0 likes
    Last Post knowmad
    by knowmad
     
    Started by ETFVoyageur, Today, 07:05 PM
    0 responses
    8 views
    0 likes
    Last Post ETFVoyageur  
    Started by Orion815, 05-02-2024, 08:39 AM
    2 responses
    18 views
    0 likes
    Last Post Orion815  
    Started by suroot, 02-25-2017, 04:43 AM
    11 responses
    2,553 views
    0 likes
    Last Post Zilvercat  
    Working...
    X