Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cumulative Delta not giving me expected results

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

    Cumulative Delta not giving me expected results

    What am I missing here? I'm drawing the delta close below the candles here. I've highlighted the most dramatic case, but as you can see here the delta close is not matching the actual indicator. I'm using BarDelta vs Session and BidAsk DeltaType.

    And here is the test indicator code.

    Delta Test. GitHub Gist: instantly share code, notes, and snippets.

    #2
    Hi, thanks for posting.

    The scripts needs to update the Cumulative Delta in the 1 tick series (BarsInProgress == 1), and the Cumulative Delta you have on the chart needs to be set to "Bar".

    Code:
    if (BarsInProgress == 0)
    {
        Draw.Text(this, "close" + CurrentBar, ""+ CD.DeltaClose[0], 0, Low[0] - 30);
    }
    else if (BarsInProgress == 1)
    {
        // We have to update the secondary series of the hosted indicator to make sure the values we get in BarsInProgress == 0 are in sync
        CD.Update(CD.BarsArray[1].Count - 1, 1);
    }
    Best regards,
    -ChrisL

    Comment


      #3
      Awesome, thanks Chris. This was driving me crazy until I finally broke down and decided to ask.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by SalmaTrader, 07-07-2026, 10:26 PM
      0 responses
      23 views
      0 likes
      Last Post SalmaTrader  
      Started by CarlTrading, 07-05-2026, 01:16 PM
      0 responses
      13 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 06-17-2026, 10:32 AM
      0 responses
      8 views
      0 likes
      Last Post CaptainJack  
      Started by kinfxhk, 06-17-2026, 04:15 AM
      0 responses
      10 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 06-17-2026, 04:06 AM
      0 responses
      16 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Working...
      X