Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order Flow Delta Bar Lagging

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

    Order Flow Delta Bar Lagging

    I was having touble with missing trade entries so I looked into it and found the order flow delta bar was getting lagging.

    I used this code to get a print output
    Code:
    Print("Delta Close: " + OrderFlowCumulativeDelta(BarsArray[0], CumulativeDeltaType.BidAsk, CumulativeDeltaPeriod.Bar, 0).DeltaClose[0]);
    and it showed the delta close of the previous bar (1 bar ago), not the one that just updated.

    The picture shows the latest print and that print is showing the delta of the GREEN bar, and not the latest updated red bar

    Any idea how to fix this?

    Thanks!
    Attached Files

    #2
    Hello Ousher,

    Thanks for your post.

    We just had a question on this recently. Please see the thread below showing how to reference the indicator in NinjaScript to keep it up to date.

    deltaClose = OrderFlowCumulativeDelta(BarsArray[0], CumulativeDeltaType.BidAsk, CumulativeDeltaPeriod.Session, 0).DeltaClose[0]; Print(Time[0]); Print("deltaClose: " + deltaClose); Print("deltaSMA: " + deltaSMA); Here are screenshots of the data window and the settings. Any idea why these don't match?


    Let us know if you have any additional questions.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    88 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    135 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    119 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    69 views
    0 likes
    Last Post PaulMohn  
    Working...
    X