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 NullPointStrategies, 03-13-2026, 05:17 AM
    0 responses
    93 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    152 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    80 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    53 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    65 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X