This commit is contained in:
2026-01-08 18:44:19 +03:30
parent 649cef249f
commit 5c7c5f288d
8 changed files with 2073 additions and 527 deletions
+65 -1
View File
@@ -2124,4 +2124,68 @@ bool Strategy1HasSignal(
{
DebugBreak();
}
}
}
int CountSameVales(
int barIndex = 0,
int loopback = 10 //
)
{
//
int result = 0;
//
if (!IsValid())
{
return result;
}
//
loopback = NormalizeInt(loopback, 2);
barIndex = NormalizeBarIndex(barIndex);
//
for (int i = barIndex; i < barIndex + loopback; i++)
{
//
if (IsValeSameAsLast(i))
{
result++;
}
}
//
return result;
}
int CountSamePeaks(
int barIndex = 0,
int loopback = 10 //
)
{
//
int result = 0;
//
if (!IsValid())
{
return result;
}
//
loopback = NormalizeInt(loopback, 2);
barIndex = NormalizeBarIndex(barIndex);
//
for (int i = barIndex; i < barIndex + loopback; i++)
{
//
if (IsPeakSameAsLast(i))
{
result++;
}
}
//
return result;
}