Apply 1r1 GBPUSDb Level 1 fix ...
This commit is contained in:
@@ -4706,7 +4706,7 @@ public:
|
||||
//
|
||||
// Check Cycles Switched to Bullish or not ...
|
||||
bool IsCyclesSwitchedToBullish(
|
||||
int barIndex, // Bar Index
|
||||
int barIndex, // Bar Index
|
||||
ENUM_X_MARKET_CYCLES &cycles[] //
|
||||
)
|
||||
{
|
||||
@@ -4820,7 +4820,7 @@ public:
|
||||
cBarsCount == cyclesCount &&
|
||||
//
|
||||
IsValidSize(pBarsCount) &&
|
||||
pBarsCount == cyclesCount
|
||||
pBarsCount == cyclesCount
|
||||
//
|
||||
;
|
||||
if (!result)
|
||||
@@ -4853,7 +4853,7 @@ public:
|
||||
//
|
||||
// Check Cycles Switched to Bearish or not ...
|
||||
bool IsCyclesSwitchedToBearish(
|
||||
int barIndex, // Bar Index
|
||||
int barIndex, // Bar Index
|
||||
ENUM_X_MARKET_CYCLES &cycles[] //
|
||||
)
|
||||
{
|
||||
@@ -4967,7 +4967,7 @@ public:
|
||||
cBarsCount == cyclesCount &&
|
||||
//
|
||||
IsValidSize(pBarsCount) &&
|
||||
pBarsCount == cyclesCount
|
||||
pBarsCount == cyclesCount
|
||||
//
|
||||
;
|
||||
if (!result)
|
||||
@@ -4997,6 +4997,336 @@ public:
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool IsBullishSorted(
|
||||
int barIndex // Bar Index
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
int cIndex = barIndex;
|
||||
int pIndex = cIndex + 1;
|
||||
|
||||
//
|
||||
// Current ...
|
||||
|
||||
//
|
||||
XOHCL cCBar;
|
||||
result = CAsOHCL(cCBar, cIndex);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL cPBar;
|
||||
result = CAsOHCL(cPBar, pIndex);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Short ...
|
||||
|
||||
//
|
||||
XOHCL sCBar;
|
||||
result = SAsOHCL(sCBar, cIndex);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL sPBar;
|
||||
result = SAsOHCL(sPBar, pIndex);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Medium ...
|
||||
|
||||
//
|
||||
XOHCL mCBar;
|
||||
result = MAsOHCL(sCBar, cIndex);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL mPBar;
|
||||
result = MAsOHCL(mPBar, pIndex);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Long ...
|
||||
|
||||
//
|
||||
XOHCL lCBar;
|
||||
result = LAsOHCL(lCBar, cIndex);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL lPBar;
|
||||
result = LAsOHCL(lPBar, pIndex);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Hind ...
|
||||
|
||||
//
|
||||
XOHCL hCBar;
|
||||
result = HAsOHCL(hCBar, cIndex);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL hPBar;
|
||||
result = HAsOHCL(hPBar, pIndex);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool isCBullish =
|
||||
//
|
||||
cCBar.IsBullish() &&
|
||||
sCBar.IsBullish() &&
|
||||
mCBar.IsBullish() &&
|
||||
lCBar.IsBullish() &&
|
||||
hCBar.IsBullish()
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isCSorted =
|
||||
//
|
||||
cCBar.high > sCBar.high &&
|
||||
sCBar.high > mCBar.high &&
|
||||
mCBar.high > lCBar.high &&
|
||||
lCBar.high > hCBar.high
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isCPrepred = isCBullish &&
|
||||
isCSorted;
|
||||
|
||||
//
|
||||
bool isPBullish =
|
||||
//
|
||||
cPBar.IsBullish() &&
|
||||
sPBar.IsBullish() &&
|
||||
mPBar.IsBullish() &&
|
||||
lPBar.IsBullish() &&
|
||||
hPBar.IsBullish()
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isPSorted =
|
||||
//
|
||||
cPBar.high > sPBar.high &&
|
||||
sPBar.high > mPBar.high &&
|
||||
mPBar.high > lPBar.high &&
|
||||
lPBar.high > hPBar.high
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isPPrepred = isPBullish &&
|
||||
isPSorted;
|
||||
|
||||
//
|
||||
result = isCPrepred &&
|
||||
!isPPrepred;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool IsBearishSorted(
|
||||
int barIndex // Bar Index
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
int cIndex = barIndex;
|
||||
int pIndex = cIndex + 1;
|
||||
|
||||
//
|
||||
// Current ...
|
||||
|
||||
//
|
||||
XOHCL cCBar;
|
||||
result = CAsOHCL(cCBar, cIndex);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL cPBar;
|
||||
result = CAsOHCL(cPBar, pIndex);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Short ...
|
||||
|
||||
//
|
||||
XOHCL sCBar;
|
||||
result = SAsOHCL(sCBar, cIndex);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL sPBar;
|
||||
result = SAsOHCL(sPBar, pIndex);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Medium ...
|
||||
|
||||
//
|
||||
XOHCL mCBar;
|
||||
result = MAsOHCL(sCBar, cIndex);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL mPBar;
|
||||
result = MAsOHCL(mPBar, pIndex);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Long ...
|
||||
|
||||
//
|
||||
XOHCL lCBar;
|
||||
result = LAsOHCL(lCBar, cIndex);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL lPBar;
|
||||
result = LAsOHCL(lPBar, pIndex);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Hind ...
|
||||
|
||||
//
|
||||
XOHCL hCBar;
|
||||
result = HAsOHCL(hCBar, cIndex);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL hPBar;
|
||||
result = HAsOHCL(hPBar, pIndex);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool isCBearish =
|
||||
//
|
||||
cCBar.IsBearish() &&
|
||||
sCBar.IsBearish() &&
|
||||
mCBar.IsBearish() &&
|
||||
lCBar.IsBearish() &&
|
||||
hCBar.IsBearish()
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isCSorted =
|
||||
//
|
||||
cCBar.low < sCBar.low &&
|
||||
sCBar.low < mCBar.low &&
|
||||
mCBar.low < lCBar.low &&
|
||||
lCBar.low < hCBar.low
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isCPrepred = isCBearish &&
|
||||
isCSorted;
|
||||
|
||||
//
|
||||
bool isPBearish =
|
||||
//
|
||||
cPBar.IsBearish() &&
|
||||
sPBar.IsBearish() &&
|
||||
mPBar.IsBearish() &&
|
||||
lPBar.IsBearish() &&
|
||||
hPBar.IsBearish()
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isPSorted =
|
||||
//
|
||||
cPBar.low < sPBar.low &&
|
||||
sPBar.low < mPBar.low &&
|
||||
mPBar.low < lPBar.low &&
|
||||
lPBar.low < hPBar.low
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isPPrepred = isPBearish &&
|
||||
isPSorted;
|
||||
|
||||
//
|
||||
result = isCPrepred &&
|
||||
!isPPrepred;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Check All Cycles Switched to Bullish or not ...
|
||||
bool IsSwitchedToBullish(
|
||||
|
||||
Reference in New Issue
Block a user