last works ...
This commit is contained in:
@@ -2299,6 +2299,68 @@ public:
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool IsCycleStrongBearish(
|
||||
int barIndex, // Bar Index
|
||||
ENUM_X_MARKET_CYCLES cycle //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
double se1 = 0;
|
||||
double se2 = 0;
|
||||
|
||||
//
|
||||
switch (cycle)
|
||||
{
|
||||
//
|
||||
// CURRENT ...
|
||||
case X_MARKET_CYCLE_UNKNOWN:
|
||||
se1 = GetCSE1(barIndex);
|
||||
se2 = GetCSE2(barIndex);
|
||||
break;
|
||||
|
||||
//
|
||||
// SHORT ...
|
||||
case X_MARKET_CYCLE_SHORT:
|
||||
se1 = GetSSE1(barIndex);
|
||||
se2 = GetSSE2(barIndex);
|
||||
break;
|
||||
|
||||
//
|
||||
// MEDIUM ...
|
||||
case X_MARKET_CYCLE_MEDIUM:
|
||||
se1 = GetMSE1(barIndex);
|
||||
se2 = GetMSE2(barIndex);
|
||||
break;
|
||||
|
||||
//
|
||||
// LONG ...
|
||||
case X_MARKET_CYCLE_LONG:
|
||||
se1 = GetLSE1(barIndex);
|
||||
se2 = GetLSE2(barIndex);
|
||||
break;
|
||||
|
||||
//
|
||||
// HIND ...
|
||||
case X_MARKET_CYCLE_HIND:
|
||||
se1 = GetHSE1(barIndex);
|
||||
se2 = GetHSE2(barIndex);
|
||||
break;
|
||||
}
|
||||
|
||||
//
|
||||
result = se1 != EMPTY_VALUE &&
|
||||
se1 > 0 &&
|
||||
se2 != EMPTY_VALUE &&
|
||||
se2 > 0;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
int GetCycleValues(
|
||||
int barIndex, // Bar Index
|
||||
@@ -2419,6 +2481,182 @@ public:
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
int GetCycleBullishValues(
|
||||
int barIndex, // Bar Index
|
||||
ENUM_X_MARKET_CYCLES cycle,
|
||||
double &values[] //
|
||||
)
|
||||
{
|
||||
//
|
||||
int result = 0;
|
||||
|
||||
//
|
||||
Clean(values);
|
||||
|
||||
//
|
||||
double le1 = 0;
|
||||
double le2 = 0;
|
||||
|
||||
//
|
||||
switch (cycle)
|
||||
{
|
||||
//
|
||||
// CURRENT ...
|
||||
case X_MARKET_CYCLE_UNKNOWN:
|
||||
//
|
||||
le1 = GetCLE1(barIndex);
|
||||
le2 = GetCLE2(barIndex);
|
||||
break;
|
||||
|
||||
//
|
||||
// SHORT ...
|
||||
case X_MARKET_CYCLE_SHORT:
|
||||
//
|
||||
le1 = GetSLE1(barIndex);
|
||||
le2 = GetSLE2(barIndex);
|
||||
break;
|
||||
|
||||
//
|
||||
// MEDIUM ...
|
||||
case X_MARKET_CYCLE_MEDIUM:
|
||||
//
|
||||
le1 = GetMLE1(barIndex);
|
||||
le2 = GetMLE2(barIndex);
|
||||
break;
|
||||
|
||||
//
|
||||
// LONG ...
|
||||
case X_MARKET_CYCLE_LONG:
|
||||
//
|
||||
le1 = GetLLE1(barIndex);
|
||||
le2 = GetLLE2(barIndex);
|
||||
break;
|
||||
|
||||
//
|
||||
// HIND ...
|
||||
case X_MARKET_CYCLE_HIND:
|
||||
//
|
||||
le1 = GetHLE1(barIndex);
|
||||
le2 = GetHLE2(barIndex);
|
||||
break;
|
||||
}
|
||||
|
||||
//
|
||||
if (le1 > 0 && le1 != EMPTY_VALUE)
|
||||
{
|
||||
//
|
||||
Add(
|
||||
le1,
|
||||
values //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
if (le2 > 0 && le2 != EMPTY_VALUE)
|
||||
{
|
||||
//
|
||||
Add(
|
||||
le2,
|
||||
values //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
result = ArraySize(values);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
int GetCycleBearishValues(
|
||||
int barIndex, // Bar Index
|
||||
ENUM_X_MARKET_CYCLES cycle,
|
||||
double &values[] //
|
||||
)
|
||||
{
|
||||
//
|
||||
int result = 0;
|
||||
|
||||
//
|
||||
Clean(values);
|
||||
|
||||
//
|
||||
double se1 = 0;
|
||||
double se2 = 0;
|
||||
|
||||
//
|
||||
switch (cycle)
|
||||
{
|
||||
//
|
||||
// CURRENT ...
|
||||
case X_MARKET_CYCLE_UNKNOWN:
|
||||
//
|
||||
se1 = GetCSE1(barIndex);
|
||||
se2 = GetCSE2(barIndex);
|
||||
break;
|
||||
|
||||
//
|
||||
// SHORT ...
|
||||
case X_MARKET_CYCLE_SHORT:
|
||||
//
|
||||
se1 = GetSSE1(barIndex);
|
||||
se2 = GetSSE2(barIndex);
|
||||
break;
|
||||
|
||||
//
|
||||
// MEDIUM ...
|
||||
case X_MARKET_CYCLE_MEDIUM:
|
||||
//
|
||||
se1 = GetMSE1(barIndex);
|
||||
se2 = GetMSE2(barIndex);
|
||||
break;
|
||||
|
||||
//
|
||||
// LONG ...
|
||||
case X_MARKET_CYCLE_LONG:
|
||||
//
|
||||
se1 = GetLSE1(barIndex);
|
||||
se2 = GetLSE2(barIndex);
|
||||
break;
|
||||
|
||||
//
|
||||
// HIND ...
|
||||
case X_MARKET_CYCLE_HIND:
|
||||
//
|
||||
se1 = GetHSE1(barIndex);
|
||||
se2 = GetHSE2(barIndex);
|
||||
break;
|
||||
}
|
||||
|
||||
//
|
||||
if (se1 > 0 && se1 != EMPTY_VALUE)
|
||||
{
|
||||
//
|
||||
Add(
|
||||
se1,
|
||||
values //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
if (se2 > 0 && se2 != EMPTY_VALUE)
|
||||
{
|
||||
//
|
||||
Add(
|
||||
se2,
|
||||
values //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
result = ArraySize(values);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
double GetCycleMax(
|
||||
int barIndex, // Bar Index
|
||||
@@ -2503,68 +2741,6 @@ public:
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool IsCycleStrongBearish(
|
||||
int barIndex, // Bar Index
|
||||
ENUM_X_MARKET_CYCLES cycle //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
double se1 = 0;
|
||||
double se2 = 0;
|
||||
|
||||
//
|
||||
switch (cycle)
|
||||
{
|
||||
//
|
||||
// CURRENT ...
|
||||
case X_MARKET_CYCLE_UNKNOWN:
|
||||
se1 = GetCSE1(barIndex);
|
||||
se2 = GetCSE2(barIndex);
|
||||
break;
|
||||
|
||||
//
|
||||
// SHORT ...
|
||||
case X_MARKET_CYCLE_SHORT:
|
||||
se1 = GetSSE1(barIndex);
|
||||
se2 = GetSSE2(barIndex);
|
||||
break;
|
||||
|
||||
//
|
||||
// MEDIUM ...
|
||||
case X_MARKET_CYCLE_MEDIUM:
|
||||
se1 = GetMSE1(barIndex);
|
||||
se2 = GetMSE2(barIndex);
|
||||
break;
|
||||
|
||||
//
|
||||
// LONG ...
|
||||
case X_MARKET_CYCLE_LONG:
|
||||
se1 = GetLSE1(barIndex);
|
||||
se2 = GetLSE2(barIndex);
|
||||
break;
|
||||
|
||||
//
|
||||
// HIND ...
|
||||
case X_MARKET_CYCLE_HIND:
|
||||
se1 = GetHSE1(barIndex);
|
||||
se2 = GetHSE2(barIndex);
|
||||
break;
|
||||
}
|
||||
|
||||
//
|
||||
result = se1 != EMPTY_VALUE &&
|
||||
se1 > 0 &&
|
||||
se2 != EMPTY_VALUE &&
|
||||
se2 > 0;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
int GetBullishCycles(
|
||||
int barIndex, // Bar Index
|
||||
@@ -3039,6 +3215,142 @@ public:
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
double GetCycleBullishMax(
|
||||
int barIndex, // Bar Index
|
||||
ENUM_X_MARKET_CYCLES cycle // Cycle
|
||||
)
|
||||
{
|
||||
//
|
||||
double result = 0;
|
||||
|
||||
//
|
||||
bool isBullish = IsCycleBullish(
|
||||
barIndex,
|
||||
cycle //
|
||||
);
|
||||
if (!isBullish)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
double values[];
|
||||
int count = GetCycleBullishValues(
|
||||
barIndex,
|
||||
cycle,
|
||||
values //
|
||||
);
|
||||
|
||||
//
|
||||
result = GetSpecifiedMax(values);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
double GetCycleBullishMin(
|
||||
int barIndex, // Bar Index
|
||||
ENUM_X_MARKET_CYCLES cycle // Cycle
|
||||
)
|
||||
{
|
||||
//
|
||||
double result = 0;
|
||||
|
||||
//
|
||||
bool isBullish = IsCycleBullish(
|
||||
barIndex,
|
||||
cycle //
|
||||
);
|
||||
if (!isBullish)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
double values[];
|
||||
int count = GetCycleBullishValues(
|
||||
barIndex,
|
||||
cycle,
|
||||
values //
|
||||
);
|
||||
|
||||
//
|
||||
result = GetSpecifiedMin(values);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
double GetCycleBearishMax(
|
||||
int barIndex, // Bar Index
|
||||
ENUM_X_MARKET_CYCLES cycle // Cycle
|
||||
)
|
||||
{
|
||||
//
|
||||
double result = 0;
|
||||
|
||||
//
|
||||
bool isBearish = IsCycleBearish(
|
||||
barIndex,
|
||||
cycle //
|
||||
);
|
||||
if (!isBearish)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
double values[];
|
||||
int count = GetCycleBearishValues(
|
||||
barIndex,
|
||||
cycle,
|
||||
values //
|
||||
);
|
||||
|
||||
//
|
||||
result = GetSpecifiedMax(values);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
double GetCycleBearishMin(
|
||||
int barIndex, // Bar Index
|
||||
ENUM_X_MARKET_CYCLES cycle // Cycle
|
||||
)
|
||||
{
|
||||
//
|
||||
double result = 0;
|
||||
|
||||
//
|
||||
bool isBearish = IsCycleBearish(
|
||||
barIndex,
|
||||
cycle //
|
||||
);
|
||||
if (!isBearish)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
double values[];
|
||||
int count = GetCycleBearishValues(
|
||||
barIndex,
|
||||
cycle,
|
||||
values //
|
||||
);
|
||||
|
||||
//
|
||||
result = GetSpecifiedMin(values);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
double GetBullishPower(
|
||||
int barIndex // Bar Index
|
||||
|
||||
Reference in New Issue
Block a user