Login Page - Create Account

Support Board


Date/Time: Mon, 22 Apr 2024 21:44:27 +0000



[Programming Help] - Not updating index

View Count: 115

[2024-02-12 17:08:18]
User285179 - Posts: 14
Hey, I am doing ACSIL from last 5 days and stuck to this point. I am using GetPointOfControlPriceVolumeForBar for only 5 bars on a chart, not all. I used this code and its working.

sc.AutoLoop = 0;
sc.MaintainVolumeAtPriceData = true;
for (int BarIndex = sc.ArraySize - 5; BarIndex <= sc.ArraySize; BarIndex++)
  {
    s_VolumeAtPriceV2 VAP_POC;
    sc.GetPointOfControlPriceVolumeForBar(BarIndex, VAP_POC);

    if (VAP_POC.PriceInTicks != 0)
    {
      Subgraph_VPOC.Data[BarIndex] = sc.TicksToPriceValue(VAP_POC.PriceInTicks);
    }
  }

The problem is that It scontinuously adding more and more candles. I only want result of 5 candles only.

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account