This commit is contained in:
2025-02-22 01:13:26 +03:30
parent 627e9c4706
commit c371004b3b
10 changed files with 2701 additions and 4 deletions
+247
View File
@@ -2117,3 +2117,250 @@ bool IsReject(
mObjects.Add(iObj);
}
}
//////////////////////////////////////////////////////////////////////////////////////////////
//
XPOIState state;
mXWZPOIDetector.GetState(state);
//
ENUM_X_DIRECTION trend =
IsValid(lastBullishTrend) &&
lastBullishTrend > lastBearishTrend
? X_DIRECTION_BULLISH
: IsValid(lastBearishTrend) &&
lastBearishTrend > lastBullishTrend
? X_DIRECTION_BEARISH
: X_DIRECTION_NONE;
bool hasTrend = HasDirection(trend);
bool hasBullishTrend = hasTrend &&
IsBullish(trend);
bool hasBearishTrend = hasTrend &&
IsBearish(trend);
//
// Order Block ...
has = hasBullishTrend &&
state.HasBullishOrderBlocks();
if (has)
{
//
XCOrderBlock *tmps[];
count = ExtractInsideZones(
iBar,
state.bullishOrderBlocks,
tmps //
);
has = IsValidSize(count);
if (has)
{
//
idx = GetLowest(tmps);
hasInsideOB = IsValidIndex(idx);
if (hasInsideOB)
{
insideOB = tmps[idx];
}
}
//
Clean(tmps);
}
has = hasBearishTrend &&
state.HasBearishOrderBlocks();
if (has)
{
//
XCOrderBlock *tmps[];
count = ExtractInsideZones(
iBar,
state.bearishOrderBlocks,
tmps //
);
has = IsValidSize(count);
if (has)
{
//
idx = GetHighest(tmps);
hasInsideOB = IsValidIndex(idx);
if (hasInsideOB)
{
insideOB = tmps[idx];
}
}
//
Clean(tmps);
}
//
// Fair Value Gap ...
has = hasBullishTrend &&
state.HasBullishFairValueGaps();
if (has)
{
//
XCFVG *tmps[];
count = ExtractInsideZones(
iBar,
state.bullishFairValueGaps,
tmps //
);
has = IsValidSize(count);
if (has)
{
//
idx = GetLowest(tmps);
hasInsideFVG = IsValidIndex(idx);
if (hasInsideFVG)
{
insideFVG = tmps[idx];
}
}
//
Clean(tmps);
}
has = hasBearishTrend &&
state.HasBearishFairValueGaps();
if (has)
{
//
XCFVG *tmps[];
count = ExtractInsideZones(
iBar,
state.bearishFairValueGaps,
tmps //
);
has = IsValidSize(count);
if (has)
{
//
idx = GetHighest(tmps);
hasInsideFVG = IsValidIndex(idx);
if (hasInsideFVG)
{
insideFVG = tmps[idx];
}
}
//
Clean(tmps);
}
//
// Supply Zone ...
has = hasBearishTrend &&
state.HasSupplyZones();
if (has)
{
//
XCSupplyZone *tmps[];
count = ExtractInsideZones(
iBar,
state.supplyZones,
tmps //
);
has = IsValidSize(count);
if (has)
{
//
idx = GetHighest(tmps);
hasInsideSupply = IsValidIndex(idx);
if (hasInsideSupply)
{
insideSupply = tmps[idx];
}
}
//
Clean(tmps);
}
//
// Resistance Zone ...
has = hasBearishTrend &&
state.HasResistanceZones();
if (has)
{
//
XCResistanceZone *tmps[];
count = ExtractInsideZones(
iBar,
state.resistanceZones,
tmps //
);
has = IsValidSize(count);
if (has)
{
//
idx = GetHighest(tmps);
hasInsideResistance = IsValidIndex(idx);
if (hasInsideResistance)
{
insideResistnce = tmps[idx];
}
}
//
Clean(tmps);
}
//
// Demand Zone ...
has = hasBullishTrend &&
state.HasDemandZones();
if (has)
{
//
XCDemandZone *tmps[];
count = ExtractInsideZones(
iBar,
state.demandZones,
tmps //
);
has = IsValidSize(count);
if (has)
{
//
idx = GetLowest(tmps);
hasInsideDemand = IsValidIndex(idx);
if (hasInsideDemand)
{
insideDemand = tmps[idx];
}
}
//
Clean(tmps);
}
//
// Support Zone ...
has = hasBullishTrend &&
state.HasSupportZones();
if (has)
{
//
XCSupportZone *tmps[];
count = ExtractInsideZones(
iBar,
state.supportZones,
tmps //
);
has = IsValidSize(count);
if (has)
{
//
idx = GetLowest(tmps);
hasInsideSupport = IsValidIndex(idx);
if (hasInsideSupport)
{
insideSupport = tmps[idx];
}
}
//
Clean(tmps);
}
+77
View File
@@ -1149,6 +1149,83 @@ else if (isPriceRejected)
/////////////////////////////////////////////////////////////////////////////////////////////////////
//
XPoint llPoint;
llPoint.value = iLL;
llPoint.at = iLLTime;
//
//
//
XPoint hhPoint;
hhPoint.value = iHH;
hhPoint.at = iHHTime;
//
XPoint llSwings[];
AddRef(
llPoint,
llSwings //
);
//
llPoint.at = iHHTime;
AddRef(
llPoint,
llSwings //
);
//
//
//
XPoint hhSwings[];
//
hhPoint.at = iLLTime;
AddRef(
hhPoint,
hhSwings //
);
//
hhPoint.at = iHHTime;
AddRef(
hhPoint,
hhSwings //
);
//
XCTrendObject *llTrendObj;
bool isCreated = mXWZPOIDrawer.CreateTrend(
llSwings,
llTrendObj //
);
if (isCreated)
{
mXWZDrawnObjects.Add(llTrendObj);
}
//
XCTrendObject *hhTrendObj;
isCreated = mXWZPOIDrawer.CreateTrend(
hhSwings,
hhTrendObj //
);
if (isCreated)
{
mXWZDrawnObjects.Add(hhTrendObj);
}
//
//
//
Clean(llSwings);
Clean(hhSwings);
llPoint.Clean();
hhPoint.Clean();
/////////////////////////////////////////////////////////////////////////////////////////////////////