works on poi detector ...
This commit is contained in:
@@ -0,0 +1,449 @@
|
||||
//
|
||||
void ApplyManalyswerValidation(
|
||||
XBoxZone &pivots[],
|
||||
int barIndex = 0 //
|
||||
)
|
||||
{
|
||||
//
|
||||
int zIDX = 0;
|
||||
int cIDX = zIDX + 1;
|
||||
int pIDX = cIDX + 1;
|
||||
int p2IDX = pIDX + 1;
|
||||
|
||||
//
|
||||
barIndex = NormalizeInt(barIndex, 0);
|
||||
|
||||
//
|
||||
bool has = HasChild(pivots);
|
||||
if (!has)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
XBoxZone tmp[];
|
||||
Copy(
|
||||
pivots,
|
||||
tmp //
|
||||
);
|
||||
Clean(pivots);
|
||||
while (HasChild(tmp))
|
||||
{
|
||||
//
|
||||
XBoxZone iPivot = tmp[0];
|
||||
ArrayRemove(
|
||||
tmp,
|
||||
0,
|
||||
1 //
|
||||
);
|
||||
|
||||
//
|
||||
// Retrieve Pivot info ...
|
||||
// int toIDX = iPivot.ToIndex();
|
||||
// int fromIDX = iPivot.FromIndex();
|
||||
// bool isBullish = iPivot.IsBullish();
|
||||
|
||||
//
|
||||
// Retrieve Conditions ...
|
||||
// XCAEAConditions conditions;
|
||||
// has = helper.GetConditions(
|
||||
// conditions,
|
||||
// toIDX,
|
||||
// 5 //
|
||||
// );
|
||||
|
||||
//
|
||||
// Retrieve Bars ...
|
||||
|
||||
//
|
||||
// XOHCL cBar;
|
||||
// XOHCL pBar;
|
||||
// XOHCL p2Bar;
|
||||
|
||||
// //
|
||||
// has =
|
||||
// has &&
|
||||
// cBar.Init(
|
||||
// conditions.symbol,
|
||||
// conditions.period,
|
||||
// toIDX //
|
||||
// );
|
||||
// has = has &&
|
||||
// cBar.GetPreviousBar(pBar);
|
||||
// has = has &&
|
||||
// pBar.GetPreviousBar(p2Bar);
|
||||
// if (!has)
|
||||
// {
|
||||
// //
|
||||
// cBar.Clean();
|
||||
// pBar.Clean();
|
||||
// p2Bar.Clean();
|
||||
// iPivot.Clean();
|
||||
// conditions.Clean();
|
||||
|
||||
// //
|
||||
// continue;
|
||||
// }
|
||||
|
||||
//
|
||||
// Reading Conditions ...
|
||||
|
||||
// //
|
||||
// // MAL ...
|
||||
// double zMAL = conditions.malBuffer[zIDX];
|
||||
// double cMAL = conditions.malBuffer[cIDX];
|
||||
// double pMAL = conditions.malBuffer[pIDX];
|
||||
// double p2MAL = conditions.malBuffer[p2IDX];
|
||||
|
||||
// //
|
||||
// // MAC ...
|
||||
// double zMAC = conditions.macBuffer[zIDX];
|
||||
// double cMAC = conditions.macBuffer[cIDX];
|
||||
// double pMAC = conditions.macBuffer[pIDX];
|
||||
// double p2MAC = conditions.macBuffer[p2IDX];
|
||||
|
||||
// //
|
||||
// // MAH ...
|
||||
// double zMAH = conditions.mahBuffer[zIDX];
|
||||
// double cMAH = conditions.mahBuffer[cIDX];
|
||||
// double pMAH = conditions.mahBuffer[pIDX];
|
||||
// double p2MAH = conditions.mahBuffer[p2IDX];
|
||||
|
||||
//
|
||||
// Checking Conditions ...
|
||||
// has = isBullish
|
||||
// ? cBar.high < cMAL ||
|
||||
// pBar.high < pMAL
|
||||
// : cBar.low < cMAH ||
|
||||
// pBar.low < pMAL;
|
||||
|
||||
//
|
||||
has =
|
||||
isBullish
|
||||
? iPivot.
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
AddRef(
|
||||
iPivot,
|
||||
pivots //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// Cleanup Resources ...
|
||||
// cBar.Clean();
|
||||
// pBar.Clean();
|
||||
// p2Bar.Clean();
|
||||
iPivot.Clean();
|
||||
// conditions.Clean();
|
||||
}
|
||||
|
||||
//
|
||||
Clean(tmp);
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
//
|
||||
// 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,
|
||||
insidePivots,
|
||||
pivots,
|
||||
zBar,
|
||||
cBar,
|
||||
pBar,
|
||||
p2Bar //
|
||||
);
|
||||
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,
|
||||
rejectedPivot,
|
||||
isRejectedOnMid,
|
||||
pivots,
|
||||
zBar,
|
||||
cBar,
|
||||
pBar,
|
||||
p2Bar,
|
||||
false, // Ignore Mid Rejection ...
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
//
|
||||
// Box Based Conditions ...
|
||||
|
||||
//
|
||||
// if (isCBarHasStrongATR)
|
||||
// {
|
||||
// //
|
||||
// Print(ToString(cBar.GetDirection()), " ATR Growing ...");
|
||||
// }
|
||||
|
||||
//
|
||||
// bool isZeroVScore = isScoreNeutural ||
|
||||
// isVolumeNeutural;
|
||||
|
||||
// //
|
||||
// bool isBullishTested =
|
||||
// isZeroVScore &&
|
||||
// isCBarValidForBullish // &&
|
||||
// // rejectedPivot.IsValid() &&
|
||||
// // rejectedPivot.IsBullish()
|
||||
// ;
|
||||
// bool isBearishTested =
|
||||
// isZeroVScore &&
|
||||
// isCBarValidForBearish // &&
|
||||
// // rejectedPivot.IsValid() &&
|
||||
// // rejectedPivot.IsBearish()
|
||||
// ;
|
||||
|
||||
// //
|
||||
// bool isTested =
|
||||
// //
|
||||
// isBullishTested ||
|
||||
// isBearishTested
|
||||
// //
|
||||
// ;
|
||||
// if (isTested)
|
||||
// {
|
||||
// //
|
||||
// Print("Zero Volume ...");
|
||||
// }
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
//
|
||||
bool isCond2Bullish =
|
||||
//
|
||||
false // &&
|
||||
//
|
||||
// conditions.
|
||||
//
|
||||
// zPeak > cPeak &&
|
||||
// zBar.close > cPeak &&
|
||||
// ((zPeak - cPeak) > 2 * points) &&
|
||||
//
|
||||
// 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 // &&
|
||||
//
|
||||
// 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]
|
||||
// //
|
||||
;
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,83 @@
|
||||
|
||||
//
|
||||
bool DetectPivot(
|
||||
int barIndex,
|
||||
XOHCL &zBar,
|
||||
XOHCL &cBar,
|
||||
XOHCL &pBar,
|
||||
XOHCL &p2Bar,
|
||||
XCAEAConditions &conditions //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Validate Args ...
|
||||
result =
|
||||
//
|
||||
barIndex >= 0 &&
|
||||
zBar.IsValid() &&
|
||||
cBar.IsValid() &&
|
||||
pBar.IsValid() &&
|
||||
p2Bar.IsValid() &&
|
||||
//
|
||||
;
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Define Requirements ...
|
||||
|
||||
//
|
||||
int zIDX = 0;
|
||||
int cIDX = zIDX + 1;
|
||||
int pIDX = cIDX + 1;
|
||||
int p2IDX = pIDX + 1;
|
||||
|
||||
//
|
||||
XCAPviot pivot;
|
||||
datetime cTime = zBar.time;
|
||||
string symbol = zBar.symbol;
|
||||
string period = zBar.period;
|
||||
|
||||
//
|
||||
// Reading Conditional Values ...
|
||||
|
||||
//
|
||||
// Prepare Conditinal Conditions ...
|
||||
|
||||
//
|
||||
bool hasStartCondition = false;
|
||||
bool hasContinuationCondition = false;
|
||||
bool hasEndCondition = false;
|
||||
|
||||
//
|
||||
// ReInstance Pivot ...
|
||||
if (hasStartConditions)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
//
|
||||
// Calculate and Fill Pivot Requirements ...
|
||||
if (hasContinuationCondition)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
//
|
||||
// End up Pivot and Store it ...
|
||||
if (hasEndCondition)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
//
|
||||
pivot.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -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();
|
||||
|
||||
//
|
||||
|
||||
@@ -185,7 +185,7 @@ class XCXCAEASignaller : XCBase
|
||||
|
||||
//
|
||||
// Detecting Pivots ...
|
||||
detector.Update(
|
||||
detector.Detect(
|
||||
zIndex //
|
||||
);
|
||||
|
||||
@@ -193,8 +193,7 @@ class XCXCAEASignaller : XCBase
|
||||
// Validate Pivots ...
|
||||
detector.Validate(
|
||||
unAvailableBoxes,
|
||||
zIndex,
|
||||
true // Validate FVGs Using PV ...
|
||||
zIndex //
|
||||
);
|
||||
|
||||
//
|
||||
@@ -203,23 +202,21 @@ class XCXCAEASignaller : XCBase
|
||||
detector.pivotDetectionLoopbac = 100;
|
||||
}
|
||||
|
||||
//
|
||||
// Check Market Trend ...
|
||||
hasTrend = detector.MarketTrend(trend);
|
||||
|
||||
//
|
||||
// Draw Founded Pivots ...
|
||||
// drawer.Draw(cTime);
|
||||
|
||||
//
|
||||
// drawer.DrawFVGBullishPivots(cTime);
|
||||
// drawer.DrawFVGBearishPivots(cTime);
|
||||
drawer.DrawPeakPivots(cTime);
|
||||
drawer.DrawValePivots(cTime);
|
||||
drawer.DrawFVGBullishPivots(cTime);
|
||||
drawer.DrawFVGBearishPivots(cTime);
|
||||
// drawer.DrawRSICrossedOverOSPivots(cTime);
|
||||
// drawer.DrawRSICrossedUnderOBPivots(cTime);
|
||||
drawer.DrawPeakResSWHPivots(cTime);
|
||||
drawer.DrawValeSupSWLPivots(cTime);
|
||||
drawer.DrawRSIPeakPivots(cTime);
|
||||
drawer.DrawRSIValePivots(cTime);
|
||||
// drawer.DrawPeakResSWHPivots(cTime);
|
||||
// drawer.DrawValeSupSWLPivots(cTime);
|
||||
// drawer.DrawRSIPeakPivots(cTime);
|
||||
// drawer.DrawRSIValePivots(cTime);
|
||||
|
||||
//
|
||||
// Retrieve Valid Pviots ...
|
||||
@@ -819,7 +816,7 @@ class XCXCAEASignaller : XCBase
|
||||
inputs.x3maInputs.fastLength = 5;
|
||||
|
||||
//
|
||||
inputs.x3maInputs.showFast = true;
|
||||
inputs.x3maInputs.showFast = false;
|
||||
inputs.x3maInputs.showSlow = false;
|
||||
inputs.x3maInputs.showMedium = false;
|
||||
|
||||
@@ -828,11 +825,11 @@ class XCXCAEASignaller : XCBase
|
||||
inputs.caInputs.showTKI = false;
|
||||
inputs.caInputs.showSar = false;
|
||||
inputs.caInputs.showMAH = true;
|
||||
inputs.caInputs.showMAL = true;
|
||||
inputs.caInputs.showMAL = false;
|
||||
inputs.caInputs.showMAC = true;
|
||||
inputs.caInputs.showVidya = false;
|
||||
inputs.caInputs.showTrend = false;
|
||||
inputs.caInputs.showSwings = true;
|
||||
inputs.caInputs.showSwings = false;
|
||||
inputs.caInputs.showLongCycle = false;
|
||||
inputs.caInputs.showHindCycle = false;
|
||||
inputs.caInputs.showFiboLevel1 = false;
|
||||
@@ -841,14 +838,14 @@ class XCXCAEASignaller : XCBase
|
||||
inputs.caInputs.showShortCycle = false;
|
||||
inputs.caInputs.showMediumCycle = false;
|
||||
inputs.caInputs.showPeaksAndVales = true;
|
||||
inputs.caInputs.showPeakAndValeGolden = true;
|
||||
inputs.caInputs.showSupportAndResistance = true;
|
||||
inputs.caInputs.showPeakAndValeGolden = false;
|
||||
inputs.caInputs.showSupportAndResistance = false;
|
||||
|
||||
//
|
||||
// XOSCS ...
|
||||
inputs.oscsInputs.rsiLength = 5;
|
||||
inputs.oscsInputs.rsiOBLevel = 90;
|
||||
inputs.oscsInputs.rsiOSLevel = 10;
|
||||
// inputs.oscsInputs.rsiLength = 5;
|
||||
// inputs.oscsInputs.rsiOBLevel = 90;
|
||||
// inputs.oscsInputs.rsiOSLevel = 10;
|
||||
// inputs.oscsInputs.cciLength = 7;
|
||||
// inputs.oscsInputs.cciOBLevel = 130;
|
||||
// inputs.oscsInputs.cciOSLevel = -130;
|
||||
@@ -857,7 +854,7 @@ class XCXCAEASignaller : XCBase
|
||||
|
||||
//
|
||||
// Oscillators Views ...
|
||||
inputs.showRSI = true;
|
||||
inputs.showRSI = false;
|
||||
inputs.showCCI = false;
|
||||
inputs.showMFI = false;
|
||||
inputs.showRVI = false;
|
||||
@@ -882,26 +879,31 @@ class XCXCAEASignaller : XCBase
|
||||
detector.pivotVerifications = 5;
|
||||
detector.ticksDividerInPoints = 15;
|
||||
detector.pivotDetectionLoopbac = 200;
|
||||
detector.ticksDetectionPerid = PERIOD_D1;
|
||||
|
||||
//
|
||||
// Configure Detector ...
|
||||
detector.detectTickPivots = false;
|
||||
detector.detectVolumePivots = false;
|
||||
detector.detectRSIPeakPivots = false;
|
||||
detector.detectRSIValePivots = false;
|
||||
detector.detectCCIPeakPivots = false;
|
||||
detector.detectCCIValePivots = false;
|
||||
detector.detectFVGBullishPivots = false;
|
||||
detector.detectFVGBearishPivots = false;
|
||||
detector.detectValeSupSWLPivots = true;
|
||||
detector.detectPeakResSWHPivots = true;
|
||||
detector.detectTrendBullishPivots = true;
|
||||
detector.detectTrendBearishPivots = true;
|
||||
detector.detectCCICrossedOverOSPivots = false;
|
||||
detector.detectCCICrossedUnderOBPivots = false;
|
||||
detector.detectRSICrossedOverOSPivots = false;
|
||||
detector.detectRSICrossedUnderOBPivots = false;
|
||||
|
||||
//
|
||||
// PV ...
|
||||
|
||||
//
|
||||
// PEAK ...
|
||||
detector.detectPeakPivots = true;
|
||||
|
||||
//
|
||||
// VALE ...
|
||||
detector.detectValePivots = true;
|
||||
|
||||
//
|
||||
// FVG ...
|
||||
detector.maxAllowedFVGLife = 0;
|
||||
detector.detectFVGTypeOne = true;
|
||||
detector.detectFVGTypeTwo = false;
|
||||
detector.applyPVToFVGBoundary = false;
|
||||
detector.detectFVGBullishPivots = true;
|
||||
detector.detectFVGBearishPivots = true;
|
||||
detector.applyLastBarToFVGBoundary = false;
|
||||
detector.selectOnlyFVGWhichHasIndirectionalLastBar = true;
|
||||
|
||||
//
|
||||
// Initialize and Configure Drawer ...
|
||||
@@ -909,90 +911,58 @@ class XCXCAEASignaller : XCBase
|
||||
|
||||
//
|
||||
drawer.ignoreUpdateOSCTos = true;
|
||||
drawer.drawTrendPivotsOnlySelectedFVG = true;
|
||||
|
||||
//
|
||||
// Configure Drawer ...
|
||||
drawer.drawTrendLine = false;
|
||||
drawer.drawTickPivots = false;
|
||||
drawer.drawVolumePivots = false;
|
||||
drawer.drawRSIPeakPivots = false;
|
||||
drawer.drawRSIValePivots = false;
|
||||
drawer.drawCCIPeakPivots = false;
|
||||
drawer.drawCCIValePivots = false;
|
||||
drawer.drawFVGBullishPivots = false;
|
||||
drawer.drawFVGBearishPivots = false;
|
||||
drawer.drawValeSupSWLPivots = true;
|
||||
drawer.drawPeakResSWHPivots = true;
|
||||
drawer.drawTrendBullishPivots = false;
|
||||
drawer.drawTrendBearishPivots = false;
|
||||
drawer.drawCCICrossedOverOSPivots = false;
|
||||
drawer.drawCCICrossedUnderOBPivots = false;
|
||||
drawer.drawRSICrossedOverOSPivots = false;
|
||||
drawer.drawRSICrossedUnderOBPivots = false;
|
||||
drawer.drawPeakPivots = true;
|
||||
drawer.drawValePivots = true;
|
||||
drawer.drawFVGBullishPivots = true;
|
||||
drawer.drawFVGBearishPivots = true;
|
||||
|
||||
//
|
||||
// Configure Widths ...
|
||||
drawer.tickPivotsWidth = 2;
|
||||
drawer.volumePivotsWidth = 2;
|
||||
drawer.rsiPeakPivotsWidth = 4;
|
||||
drawer.rsiValePivotsWidth = 4;
|
||||
drawer.cciPeakPivotsWidth = 4;
|
||||
drawer.cciValePivotsWidth = 4;
|
||||
drawer.fvgBullishPivotsWidth = 2;
|
||||
drawer.fvgBearishPivotsWidth = 2;
|
||||
drawer.valeSupSWLPivotsWidth = 1;
|
||||
drawer.peakResSWHPivotsWidth = 1;
|
||||
drawer.trendLineBullishWidth = 4;
|
||||
drawer.trendLineBullishWidth = 4;
|
||||
drawer.trendBullishPivotsWidth = 1;
|
||||
drawer.trendBearishPivotsWidth = 1;
|
||||
drawer.rsiCrossedOverOSPivotsWidth = 4;
|
||||
drawer.rsiCrossedUnderOBPivotsWidth = 4;
|
||||
drawer.cciCrossedOverOSPivotsWidth = 4;
|
||||
drawer.cciCrossedUnderOBPivotsWidth = 4;
|
||||
// Configure Styles ...
|
||||
|
||||
//
|
||||
// Configure Colors ...
|
||||
drawer.tickPivotsColor = clrYellow;
|
||||
drawer.volumePivotsColor = clrDodgerBlue;
|
||||
drawer.rsiPeakPivotsColor = clrMagenta;
|
||||
drawer.rsiValePivotsColor = clrAqua;
|
||||
drawer.cciPeakPivotsColor = clrMagenta;
|
||||
drawer.cciValePivotsColor = clrAqua;
|
||||
drawer.fvgBullishPivotsColor = clrAqua;
|
||||
drawer.fvgBearishPivotsColor = clrMagenta;
|
||||
drawer.valeSupSWLPivotsColor = clrAqua;
|
||||
drawer.peakResSWHPivotsColor = clrMagenta;
|
||||
drawer.trendLineBullishColor = clrAqua;
|
||||
drawer.trendLineBullishColor = clrMagenta;
|
||||
drawer.trendBullishPivotsColor = clrLime;
|
||||
drawer.trendBearishPivotsColor = clrRed;
|
||||
drawer.rsiCrossedOverOSPivotsColor = clrAqua;
|
||||
drawer.rsiCrossedUnderOBPivotsColor = clrMagenta;
|
||||
drawer.cciCrossedOverOSPivotsColor = clrAqua;
|
||||
drawer.cciCrossedUnderOBPivotsColor = clrMagenta;
|
||||
// PV ...
|
||||
|
||||
//
|
||||
// Configures Styles ...
|
||||
drawer.tickPivotsStyle = STYLE_DOT;
|
||||
drawer.volumePivotsStyle = STYLE_DOT;
|
||||
drawer.rsiPeakPivotsStyle = STYLE_DASH;
|
||||
drawer.rsiValePivotsStyle = STYLE_DASH;
|
||||
drawer.cciPeakPivotsStyle = STYLE_DASH;
|
||||
drawer.cciValePivotsStyle = STYLE_DASH;
|
||||
drawer.fvgBullishPivotsStyle = STYLE_DASHDOTDOT;
|
||||
drawer.fvgBearishPivotsStyle = STYLE_DASHDOTDOT;
|
||||
drawer.valeSupSWLPivotsStyle = STYLE_SOLID;
|
||||
drawer.peakResSWHPivotsStyle = STYLE_SOLID;
|
||||
drawer.trendLineBullishWidth = STYLE_SOLID;
|
||||
drawer.trendLineBullishWidth = STYLE_SOLID;
|
||||
drawer.trendBullishPivotsStyle = STYLE_DASHDOTDOT;
|
||||
drawer.trendBearishPivotsStyle = STYLE_DASHDOTDOT;
|
||||
drawer.rsiCrossedOverOSPivotsStyle = STYLE_DASHDOTDOT;
|
||||
drawer.rsiCrossedUnderOBPivotsStyle = STYLE_DASHDOTDOT;
|
||||
drawer.cciCrossedOverOSPivotsStyle = STYLE_DASHDOTDOT;
|
||||
drawer.cciCrossedUnderOBPivotsStyle = STYLE_DASHDOTDOT;
|
||||
// PEAK ...
|
||||
XCAPivotStyle peakStyle;
|
||||
peakStyle.width = 2;
|
||||
peakStyle.clr = clrMagenta;
|
||||
peakStyle.style = STYLE_SOLID;
|
||||
drawer.peakPivotStyle = peakStyle;
|
||||
peakStyle.Clean();
|
||||
|
||||
//
|
||||
// VALE ...
|
||||
XCAPivotStyle valeStyle;
|
||||
valeStyle.width = 2;
|
||||
valeStyle.clr = clrAqua;
|
||||
valeStyle.style = STYLE_SOLID;
|
||||
drawer.valePivotStyle = valeStyle;
|
||||
valeStyle.Clean();
|
||||
|
||||
//
|
||||
// FVG ...
|
||||
|
||||
//
|
||||
// Bullish ...
|
||||
XCAPivotStyle fvgBullishStyle;
|
||||
fvgBullishStyle.width = 2;
|
||||
fvgBullishStyle.clr = clrLime;
|
||||
fvgBullishStyle.style = STYLE_DASH;
|
||||
drawer.fvgBullishPivotStyle = fvgBullishStyle;
|
||||
fvgBullishStyle.Clean();
|
||||
|
||||
//
|
||||
// Bearish ...
|
||||
XCAPivotStyle fvgBearishStyle;
|
||||
fvgBearishStyle.width = 2;
|
||||
fvgBearishStyle.clr = clrRed;
|
||||
fvgBearishStyle.style = STYLE_DASH;
|
||||
drawer.fvgBearishPivotStyle = fvgBearishStyle;
|
||||
fvgBearishStyle.Clean();
|
||||
|
||||
//
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user