works on poi detector ...

This commit is contained in:
2025-05-03 21:59:49 +03:30
parent cd447af39d
commit 70d673b6d7
8 changed files with 9017 additions and 5628 deletions
+9 -259
View File
@@ -466,11 +466,11 @@ bool DetectXCAEAConditions(
//
// Trend Parsing ...
bool hasTrend = HasDirection(trend);
bool hasBullishTrend = hasTrend &&
IsBullish(trend);
bool hasBearishTrend = hasTrend &&
IsBearish(trend);
// bool hasTrend = HasDirection(trend);
// bool hasBullishTrend = hasTrend &&
// IsBullish(trend);
// bool hasBearishTrend = hasTrend &&
// IsBearish(trend);
//
// Retrieve Previous and Current Bar Conditions ...
@@ -663,12 +663,6 @@ bool DetectXCAEAConditions(
//
bool isScoreNeutural = MathAbs(bullishScore - bearishScore) == 0;
//
// Generating Conditions Summary ...
string summary =
conditions
.GenerateSummary();
//
// Calculating Range Volumes ...
@@ -1080,69 +1074,22 @@ bool DetectXCAEAConditions(
//
;
//
if (isCBarHasStrongATR)
{
//
Print(ToString(cBar.GetDirection()), " ATR Growing ...");
}
//
bool isZeroVScore = isScoreNeutural ||
isVolumeNeutural;
//
bool isBullishTested =
isZeroVScore &&
isCBarValidForBullish;
bool isBearishTested =
isZeroVScore &&
isCBarValidForBearish;
//
bool isTested =
//
isBullishTested ||
isBearishTested
//
;
if (isTested)
{
//
Print("Zero Volume ...");
}
//
// Parsing Pivots ...
XBoxZone rciPivot;
double providedSL = 0;
XBoxZone rejectedPivot;
XBoxZone insidePivots[];
XBoxZone rciContainers[];
int insidePivotsCount = 0;
bool isRejectedOnMid = false;
bool hasInsidePivots = false;
bool hasRCIContainers = false;
bool hasPivots = HasChild(pivots);
if (hasPivots)
{
//
// drawer.DrawBoxes(
// pivots,
// TimeCurrent() //
// );
//
// Select Inside Boxes ...
//
ENUM_XCA_PIVOTS allowedInsidePivots[] = {
XCA_FVG_BULL,
XCA_FVG_BEAR,
XCA_PEAKSWHRES,
XCA_VALESWLSUP,
XCA_TREND_BULL,
XCA_TREND_BEAR,
};
insidePivotsCount = SelectInsideBoxes(
allowedInsidePivots,
@@ -1153,25 +1100,14 @@ bool DetectXCAEAConditions(
pBar,
p2Bar //
);
Clean(allowedInsidePivots);
hasInsidePivots = IsValidSize(insidePivotsCount);
if (hasInsidePivots)
{
//
// drawer.DrawBoxes(
// insidePivots,
// zBar.time //
// );
}
//
// Detect Rejected Pivot ...
ENUM_XCA_PIVOTS allowedRejectedPivots[] = {
XCA_FVG_BULL,
XCA_FVG_BEAR,
// XCA_PEAKSWHRES,
// XCA_VALESWLSUP,
// XCA_TREND_BULL,
// XCA_TREND_BEAR,
};
has = SelectRejectedBox(
allowedRejectedPivots,
@@ -1186,123 +1122,7 @@ bool DetectXCAEAConditions(
true,
true //
);
//
// Select CCI/RSI Cross Object ...
count = ArraySize(pivots);
for (int i = 0; i < count; i++)
{
//
XBoxZone iPivot = pivots[i];
//
ENUM_XCA_PIVOTS iType = GetPivotType(iPivot);
//
// Checking Type is Passed ...
has =
//
iType == XCA_RSI_COOS ||
iType == XCA_CCI_COOS ||
iType == XCA_RSI_CUOB ||
iType == XCA_CCI_CUOB
//
;
//
// Checking cBar is Pivots' Last Bar ...
has =
has &&
cBar.time <= iPivot.to &&
cBar.time > iPivot.from;
if (has)
{
//
rciPivot = iPivot;
//
iPivot.Clean();
//
break;
}
//
iPivot.Clean();
}
//
// Detect RCI Pivot Containers Pivots ...
count = ArraySize(pivots);
has = rciPivot.IsValid();
if (has)
{
//
for (int i = 0; i < count; i++)
{
//
XBoxZone iPivot = pivots[i];
//
ENUM_XCA_PIVOTS iType = GetPivotType(iPivot);
//
// Checking Type is Passed ...
has =
//
IsValid(iType) &&
(iType == XCA_PEAKSWHRES ||
iType == XCA_VALESWLSUP)
//
;
//
// Check Dir is Passed ...
has =
has &&
rciPivot.dir == iPivot.dir;
//
// Check RCI Pivot is Inside Pivot ...
has =
has &&
//
(
//
(rciPivot.lower >= iPivot.lower &&
rciPivot.lower < iPivot.upper)
//
||
//
(rciPivot.upper <= iPivot.upper &&
rciPivot.upper > iPivot.lower)
//
||
//
(rciPivot.upper > iPivot.upper &&
rciPivot.lower < iPivot.lower)
//
)
//
;
//
if (has)
{
//
AddRef(
iPivot,
rciContainers //
);
}
//
iPivot.Clean();
}
//
hasRCIContainers = HasChild(rciContainers);
}
Clean(allowedRejectedPivots);
}
//
@@ -1363,55 +1183,15 @@ bool DetectXCAEAConditions(
//
bool isCond2Bullish =
//
false // &&
false
//
// z3MAFastState > 0 &&
// isValeGoldenRejected &&
// isCBarBullishRejected &&
// conditions.isValeIsPivot
//
// isPCCIOS &&
// isRSIBullish &&
// conditions.isCloseUnderMal
// rciPivot.IsValid() &&
// rciPivot.IsBullish() &&
// isCCIBullish &&
// cBar.close > c3MAFast
// isADXBullish &&
// hasRCIContainers &&
// conditions.isValeIsPivot &&
// (conditions.isRSICrossedOverOS ||
// conditions.isCCICrossedOverOS) // &&
// conditions.swingLowBuffer[cIDX] < conditions.fiboLevel3Buffer[cIDX]
// //
;
//
bool isCond2Bearish =
//
false // &&
false
//
// z3MAFastState < 0 &&
// isPeakGoldenRejected &&
// isCBarBullishRejected &&
// conditions.isPeakIsPivot
//
// isPCCIOB &&
// isRSIBearish &&
// c3MAFastState < 0 &&
// conditions.isCloseOverMah
// rciPivot.IsValid() &&
// rciPivot.IsBearish() &&
// conditions.isRSIOB &&
// isCCIBearish &&
// cBar.close < c3MAFast
// isADXBearish &&
// hasRCIContainers &&
// conditions.isPeakIsPivot &&
// (conditions.isRSICrossedUnderOB ||
// conditions.isCCICrossedUnderOB) // &&
// conditions.swingHighBuffer[cIDX] > conditions.fiboLevel1Buffer[cIDX]
// //
;
//
@@ -1419,12 +1199,6 @@ bool DetectXCAEAConditions(
isCond2Bearish;
if (isCond2)
{
//
pivotBox = rciPivot;
//
isCond2Bullish = false;
isCond2Bearish = false;
}
//
@@ -1520,17 +1294,6 @@ bool DetectXCAEAConditions(
sls //
);
}
// //
// // X3MA Medium ...
// if (c3MAMedium < entry)
// {
// //
// Add(
// c3MAMedium,
// sls //
// );
// }
}
else
{
@@ -1550,17 +1313,6 @@ bool DetectXCAEAConditions(
sls //
);
}
// //
// // X3MA Medium ...
// if (c3MAMedium > entry)
// {
// //
// Add(
// c3MAMedium,
// sls //
// );
// }
}
//
@@ -1656,12 +1408,10 @@ bool DetectXCAEAConditions(
p2Bar.Clean();
p3Bar.Clean();
p4Bar.Clean();
rciPivot.Clean();
Clean(cTrendValues);
Clean(pTrendValues);
Clean(insidePivots);
pConditions.Clean();
Clean(rciContainers);
rejectedPivot.Clean();
//