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 bortz, 11-06-2023, 08:04 AM
    47 responses
    1,602 views
    0 likes
    Last Post aligator  
    Started by jaybedreamin, Today, 05:56 PM
    0 responses
    8 views
    0 likes
    Last Post jaybedreamin  
    Started by DJ888, 04-16-2024, 06:09 PM
    6 responses
    18 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by Jon17, Today, 04:33 PM
    0 responses
    4 views
    0 likes
    Last Post Jon17
    by Jon17
     
    Started by Javierw.ok, Today, 04:12 PM
    0 responses
    12 views
    0 likes
    Last Post Javierw.ok  
    Working...
    X