This commit is contained in:
2025-02-28 00:45:08 +03:30
parent 09069165f0
commit a266ed533b
3 changed files with 1518 additions and 1282 deletions
+172 -3
View File
@@ -386,6 +386,47 @@ struct X121SMCStrategyXWZWorkingZone
stfState //
);
//
// Detect Waiting Zones based on STF and TTF ...
XOBFVG tmpWaitingZones[];
count = ExtractOBFVGs(
tmpWaitingZones,
stfState,
ttfState //
);
has = IsValidSize(count);
if (has)
{
//
for (int i = 0; i < count; i++)
{
//
XOBFVG iOBFVG = tmpWaitingZones[i];
//
idx = FindIndex(
iOBFVG,
waitingZones //
);
has = IsValidIndex(idx);
if (has)
{
//
iOBFVG.Clean();
continue;
}
//
AddRef(
iOBFVG,
waitingZones //
);
//
iOBFVG.Clean();
}
}
//
result = IsValid();
if (!result)
@@ -767,6 +808,47 @@ struct X121SMCStrategyXWZWorkingZone
}
}
//
// Detect Waiting Zones based on STF and TTF ...
Clean(tmpWaitingZones);
count = ExtractOBFVGs(
tmpWaitingZones,
stfState,
ttfState //
);
has = IsValidSize(count);
if (has)
{
//
for (int i = 0; i < count; i++)
{
//
XOBFVG iOBFVG = tmpWaitingZones[i];
//
idx = FindIndex(
iOBFVG,
waitingZones //
);
has = IsValidIndex(idx);
if (has)
{
//
iOBFVG.Clean();
continue;
}
//
AddRef(
iOBFVG,
waitingZones //
);
//
iOBFVG.Clean();
}
}
//
zBar.Clean();
cBar.Clean();
@@ -1846,7 +1928,7 @@ struct X121SMCStrategyXWZSignalConditions
*
* @return ( bool )
*/
bool CheckOBFVGXWZConditions(
bool DetectSelectedZoneConditions(
bool &isReversal,
XOBFVG &zone,
XPOIState &state,
@@ -1882,6 +1964,7 @@ bool CheckOBFVGXWZConditions(
//
double bullishScore = 0;
double bearishScore = 0;
double scoreMultiplier = 1.5;
conditions.GenerateScore(
bullishScore,
bearishScore //
@@ -1890,12 +1973,12 @@ bool CheckOBFVGXWZConditions(
//
bool isBullishScorePassed = bullishScore > 0 &&
bearishScore >= 0 &&
bullishScore > bearishScore;
bullishScore > bearishScore * scoreMultiplier;
//
bool isBearishScorePassed = bearishScore > 0 &&
bullishScore >= 0 &&
bearishScore > bullishScore;
bearishScore > bullishScore * scoreMultiplier;
//
// VWap ...
@@ -3241,4 +3324,90 @@ bool DetectSelectedZoneSLCandidates(
return result;
}
//
//
//
bool DetectX121Conditions(
double &pivot,
double &point,
double &sls[],
double &targets[],
ENUM_X_DIRECTION &dir,
XPOIState &stfState,
XPOIState &ttfState,
X121Conditions &conditions,
XCPOIDrawer *drawer = NULL //
)
{
//
bool result = false;
//
bool canDraw = drawer != NULL;
//
pivot = 0;
point = 0;
Clean(sls);
Clean(targets);
dir = X_DIRECTION_NONE;
//
result =
stfState.IsValid() &&
ttfState.IsValid() &&
stfState.HasChild() &&
ttfState.HasChild();
if (!result)
{
return result;
}
//
int idx = -1;
int count = 0;
bool has = false;
//
// Detect Inside STF Order Blocks Zones ...
//
XOBFVG tmpWaitingZones[];
count = ExtractOBFVGs(
tmpWaitingZones,
stfState,
ttfState //
);
has = IsValidSize(count);
if (has)
{
//
if (canDraw)
{
//
for (int i = 0; i < count; i++)
{
//
XOBFVG iOBFVG = tmpWaitingZones[i];
//
iOBFVG.UpdateTo();
//
XCBaseObject *iOBFVGObjects[];
int iOBFVGObjectsCount = drawer.DrawOBFVG(
iOBFVG,
iOBFVGObjects //
);
}
}
}
//
//
return result;
}
//