مشسف ...
This commit is contained in:
@@ -41,7 +41,7 @@ struct XOBTest
|
||||
XCFVG *fvgs[];
|
||||
|
||||
//
|
||||
datetime fvgBreakedAt;
|
||||
datetime fvgActedAt;
|
||||
datetime rewardedAt;
|
||||
|
||||
//
|
||||
@@ -65,7 +65,7 @@ struct XOBTest
|
||||
symbol = NULL;
|
||||
period = NULL;
|
||||
rewardedAt = NULL;
|
||||
fvgBreakedAt = NULL;
|
||||
fvgActedAt = NULL;
|
||||
|
||||
//
|
||||
reward = 0;
|
||||
@@ -1655,7 +1655,8 @@ bool ReTestMarket(
|
||||
}
|
||||
|
||||
//
|
||||
// Now we Have to Validate Breaked Order Blocks Count in additions to Youngest OB directions ...
|
||||
// Now we Have to Validate Breaked Order Blocks Count in additions to
|
||||
// Youngest OB directions ...
|
||||
|
||||
//
|
||||
bool hasBullishOrderFlow =
|
||||
@@ -1728,6 +1729,7 @@ bool ReTestMarket(
|
||||
|
||||
//
|
||||
XCFVG *iOBFVGs[];
|
||||
datetime fvgActedAt = NULL;
|
||||
for (int j = 0; j < fvgsCount; j++)
|
||||
{
|
||||
//
|
||||
@@ -1751,8 +1753,89 @@ bool ReTestMarket(
|
||||
continue;
|
||||
}
|
||||
|
||||
//
|
||||
// Validate FVG Based on Conditions ...
|
||||
// for Bullish Order Blocks FVGs must Rejected as Liquidity ...
|
||||
// in ttf ...
|
||||
|
||||
//
|
||||
XOHCL rejectedBar;
|
||||
ENUM_X_DIRECTION rejectedDir;
|
||||
bool isRejected = jFVG.IsRejected(
|
||||
X_DIRECTION_BULLISH,
|
||||
rejectedBar,
|
||||
rejectedDir,
|
||||
NULL, // From ...
|
||||
true, // Force Sweeped ...
|
||||
ttfState.period // For Period ...
|
||||
);
|
||||
|
||||
//
|
||||
XOHCL breakedBar;
|
||||
ENUM_X_DIRECTION breakedDir;
|
||||
bool isBreaked = jFVG.IsBreaked(
|
||||
X_DIRECTION_BULLISH,
|
||||
breakedBar,
|
||||
breakedDir //
|
||||
);
|
||||
|
||||
//
|
||||
bool isFVGActed =
|
||||
isRejected ||
|
||||
isBreaked;
|
||||
if (!isFVGActed)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
//
|
||||
datetime iFvgActedAt =
|
||||
isBreaked &&
|
||||
!isRejected
|
||||
? breakedBar.time
|
||||
: !isBreaked &&
|
||||
isRejected
|
||||
? rejectedBar.time
|
||||
: isBreaked &&
|
||||
isRejected
|
||||
? (breakedBar.time < rejectedBar.time)
|
||||
? breakedBar.time
|
||||
: rejectedBar.time
|
||||
: NULL;
|
||||
if (!IsValid(iFvgActedAt))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
//
|
||||
if (!IsValid(fvgActedAt)) {
|
||||
fvgActedAt = iFvgActedAt;
|
||||
}
|
||||
|
||||
//
|
||||
XCFVG *lastFVG = NULL;
|
||||
int fvgsCount = ArraySize(iOBFVGs);
|
||||
bool hasLastFVG = IsValidSize(fvgsCount);
|
||||
if (hasLastFVG)
|
||||
{
|
||||
lastFVG = iOBFVGs[fvgsCount - 1];
|
||||
}
|
||||
bool isLastPassed =
|
||||
!hasLastFVG
|
||||
? true
|
||||
: IsAbove(
|
||||
jFVG,
|
||||
lastFVG,
|
||||
true // Ignore Inside ...
|
||||
);
|
||||
if (!isLastPassed)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
//
|
||||
jFVG.To(iOB.To());
|
||||
jFVG.To(iFvgActedAt);
|
||||
|
||||
//
|
||||
Add(
|
||||
@@ -1775,6 +1858,9 @@ bool ReTestMarket(
|
||||
iTest.symbol = iOB.GetSymbol();
|
||||
iTest.period = iOB.GetPeriod();
|
||||
|
||||
//
|
||||
iTest.fvgActedAt = fvgActedAt;
|
||||
|
||||
//
|
||||
Copy(
|
||||
iOBFVGs,
|
||||
@@ -1823,6 +1909,7 @@ bool ReTestMarket(
|
||||
|
||||
//
|
||||
XCFVG *iOBFVGs[];
|
||||
datetime fvgActedAt = NULL;
|
||||
for (int j = 0; j < fvgsCount; j++)
|
||||
{
|
||||
//
|
||||
@@ -1846,8 +1933,89 @@ bool ReTestMarket(
|
||||
continue;
|
||||
}
|
||||
|
||||
//
|
||||
// Validate FVG Based on Conditions ...
|
||||
// for Bearish Order Blocks FVGs must Rejected as Liquidity ...
|
||||
// in ttf ...
|
||||
|
||||
//
|
||||
XOHCL rejectedBar;
|
||||
ENUM_X_DIRECTION rejectedDir;
|
||||
bool isRejected = jFVG.IsRejected(
|
||||
X_DIRECTION_BEARISH,
|
||||
rejectedBar,
|
||||
rejectedDir,
|
||||
NULL, // From ...
|
||||
true, // Force Sweeped ...
|
||||
ttfState.period // For Period ...
|
||||
);
|
||||
|
||||
//
|
||||
XOHCL breakedBar;
|
||||
ENUM_X_DIRECTION breakedDir;
|
||||
bool isBreaked = jFVG.IsBreaked(
|
||||
X_DIRECTION_BEARISH,
|
||||
breakedBar,
|
||||
breakedDir //
|
||||
);
|
||||
|
||||
//
|
||||
bool isFVGActed =
|
||||
isRejected ||
|
||||
isBreaked;
|
||||
if (!isFVGActed)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
//
|
||||
datetime iFvgActedAt =
|
||||
isBreaked &&
|
||||
!isRejected
|
||||
? breakedBar.time
|
||||
: !isBreaked &&
|
||||
isRejected
|
||||
? rejectedBar.time
|
||||
: isBreaked &&
|
||||
isRejected
|
||||
? (breakedBar.time < rejectedBar.time)
|
||||
? breakedBar.time
|
||||
: rejectedBar.time
|
||||
: NULL;
|
||||
if (!IsValid(iFvgActedAt))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
//
|
||||
if (!IsValid(fvgActedAt)) {
|
||||
fvgActedAt = iFvgActedAt;
|
||||
}
|
||||
|
||||
//
|
||||
XCFVG *lastFVG = NULL;
|
||||
int fvgsCount = ArraySize(iOBFVGs);
|
||||
bool hasLastFVG = IsValidSize(fvgsCount);
|
||||
if (hasLastFVG)
|
||||
{
|
||||
lastFVG = iOBFVGs[fvgsCount - 1];
|
||||
}
|
||||
bool isLastPassed =
|
||||
!hasLastFVG
|
||||
? true
|
||||
: IsBelow(
|
||||
jFVG,
|
||||
lastFVG,
|
||||
true // Ignore Inside ...
|
||||
);
|
||||
if (!isLastPassed)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
//
|
||||
jFVG.To(iOB.To());
|
||||
jFVG.To(iFvgActedAt);
|
||||
|
||||
//
|
||||
Add(
|
||||
@@ -1870,6 +2038,9 @@ bool ReTestMarket(
|
||||
iTest.symbol = iOB.GetSymbol();
|
||||
iTest.period = iOB.GetPeriod();
|
||||
|
||||
//
|
||||
iTest.fvgActedAt = fvgActedAt;
|
||||
|
||||
//
|
||||
Copy(
|
||||
iOBFVGs,
|
||||
@@ -2054,7 +2225,7 @@ bool ReTestMarket(
|
||||
{
|
||||
//
|
||||
XCFVG *jFVG = iTest.fvgs[j];
|
||||
jFVG.To(iTest.ob.To());
|
||||
// jFVG.To(iTest.ob.To());
|
||||
|
||||
//
|
||||
XCBaseObject *fvgObj;
|
||||
|
||||
Reference in New Issue
Block a user