last ...
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user