Login Page - Create Account

Support Board


Date/Time: Fri, 29 Nov 2024 00:03:37 +0000



Post From: ACSIL help please. :)

[2023-03-30 14:20:29]
User907968 - Posts: 823
Example: Count back over previous bars until you have 5 positive delta bars



// manual looping example
for (auto index = sc.UpdateStartIndex; index < sc.ArraySize; index++)
{
  auto i = index;
  auto countPos{ 0 };

  // start at current index and decrement index value
  // until when we have reached 5 pos delta bars
  // or until index 0 is reached
  while (i > 0 && countPos < 5)
  {
    if (sc.AskVolume[i] > sc.BidVolume[i])
      countPos++;

    i--;
  }
}