Announcement

Collapse
No announcement yet.

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

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    45 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    21 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    31 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X