This commit is contained in:
2025-04-22 02:34:54 +03:30
parent 4b50e848c7
commit a3a02973ef
3 changed files with 694 additions and 189 deletions
+490 -105
View File
@@ -514,7 +514,7 @@ struct XCAPVFVG
} }
// //
void AddPivot(XCAPivot &pivot) void AddFVG(XCAPivot &pivot)
{ {
// //
if (!IsValid() || if (!IsValid() ||
@@ -530,7 +530,8 @@ struct XCAPVFVG
pivot, pivot,
fvgs // fvgs //
); );
if (has) { if (has)
{
return; return;
} }
@@ -540,6 +541,53 @@ struct XCAPVFVG
fvgs // fvgs //
); );
} }
//
int GetFVGs(XBoxZone &fvgBoxes[])
{
//
int result = 0;
//
Clean(fvgBoxes);
//
bool has = false;
//
has = IsValid() &&
HasChild(fvgs);
if (!has)
{
return result;
}
//
int count = ArraySize(fvgs);
for (int i = 0; i < count; i++)
{
//
XBoxZone iBox;
has = fvgs[i].AsBox(iBox);
if (has)
{
//
AddRef(
iBox,
fvgBoxes //
);
}
//
iBox.Clean();
}
//
result = ArraySize(fvgBoxes);
//
return result;
}
}; };
/** /**
@@ -594,6 +642,181 @@ bool FindPivotIndex(
return result; return result;
} }
/**
* Add or Update Specified Pivot to Specified Collection ...
*
* @param pivot: XCAPivot instance reference, Specified Item ...
* @param pivots: XCAPivot instance reference Collection ...
* @param maxAllowedPivots: int, Max Allowed Pivots number of Collection ...
*/
void AddPivot(
XCAPivot &pivot,
XCAPivot &pivots[],
int maxAllowedPivots = 50 //
)
{
//
bool has = pivot.IsValid();
if (!has)
{
return;
}
//
int idx = -1;
has = FindPivotIndex(
idx,
pivot,
pivots //
);
if (has)
{
return;
}
//
int updateIDX = -1;
int count = ArraySize(pivots);
for (int i = 0; i < count; i++)
{
//
XCAPivot iPivot = pivots[i];
//
has =
iPivot.to > pivot.to &&
iPivot.from == pivot.from &&
iPivot.value == pivot.value &&
iPivot.symbol == pivot.symbol &&
iPivot.period == pivot.period;
if (has)
{
//
updateIDX = i;
break;
}
}
//
has = IsValidIndex(updateIDX);
if (!has)
{
//
AddRef(
pivot,
pivots //
);
}
else
{
pivots[updateIDX].to = pivot.to;
}
//
// Apply Max Allowed ...
CleanupArray(
pivots,
maxAllowedPivots //
);
}
/**
* Add or Update PV FVG item to Specified Collection ...
*
* @param value: double, Peak or Vale Value ...
* @param fvg: XCAPivot instance reference, Specified Pivot ...
* @param collection: XCAPVFVG instance Collection ...
*/
void AddOrUpdatePVFVG(
double value,
XCAPivot &fvg,
XCAPVFVG &collection[] //
)
{
//
// Validate Args ...
if (value < 0 &&
!fvg.IsValid() &&
(fvg.type == XCA_FVG_BULL ||
fvg.type == XCA_FVG_BEAR))
{
return;
}
//
// Check Pivot is Exists or not ...
ENUM_X_DIRECTION dir =
fvg.type == XCA_FVG_BULL
? X_DIRECTION_BULLISH
: X_DIRECTION_BEARISH;
//
bool isBullish = IsBullish(dir);
bool isBearish = IsBearish(dir);
//
// Try to Findout Pivot Value in Collection ...
int idx = -1;
int count = ArraySize(collection);
for (int i = 0; i < count; i++)
{
//
XCAPVFVG iTem = collection[i];
//
bool isSameValue = iTem.value == value;
bool isSameDirection = iTem.dir == dir;
//
bool isValid = isSameValue &&
isSameDirection;
if (isValid)
{
//
idx = i;
iTem.Clean();
break;
}
//
iTem.Clean();
}
//
// Try to Add Or Update Pivots ...
bool hasIndex = IsValidIndex(idx);
if (!hasIndex)
{
//
// New Item ...
XCAPVFVG iPVFVG;
//
iPVFVG.dir = dir;
iPVFVG.value = value;
//
AddRef(
fvg,
iPVFVG.fvgs //
);
//
AddRef(
iPVFVG,
collection //
);
}
else
{
//
// Add Pivot to Existing Item ...
collection[idx].AddFVG(fvg);
}
//
}
// //
// Implementations ... // Implementations ...
class XCXCAEAPOIDetector : public XCBase class XCXCAEAPOIDetector : public XCBase
@@ -734,6 +957,10 @@ class XCXCAEAPOIDetector : public XCBase
XCAPivot rsiCrossedUnderOBPivots[]; XCAPivot rsiCrossedUnderOBPivots[];
XCAPivot cciCrossedUnderOBPivots[]; XCAPivot cciCrossedUnderOBPivots[];
//
XCAPVFVG pvFVGBullishPivots[];
XCAPVFVG pvFVGBearishPivots[];
// //
// Constructors ... // Constructors ...
XCXCAEAPOIDetector( XCXCAEAPOIDetector(
@@ -1570,7 +1797,8 @@ class XCXCAEAPOIDetector : public XCBase
// //
AddPivot( AddPivot(
peakPivot, peakPivot,
peakPivots // peakPivots,
maxAllowedPivots //
); );
} }
@@ -1634,7 +1862,8 @@ class XCXCAEAPOIDetector : public XCBase
// //
AddPivot( AddPivot(
valePivot, valePivot,
valePivots // valePivots,
maxAllowedPivots //
); );
} }
@@ -1728,7 +1957,8 @@ class XCXCAEAPOIDetector : public XCBase
// //
AddPivot( AddPivot(
swhPivot, swhPivot,
swhPivots // swhPivots,
maxAllowedPivots //
); );
} }
@@ -1822,7 +2052,8 @@ class XCXCAEAPOIDetector : public XCBase
// //
AddPivot( AddPivot(
swlPivot, swlPivot,
swlPivots // swlPivots,
maxAllowedPivots //
); );
} }
@@ -1886,7 +2117,8 @@ class XCXCAEAPOIDetector : public XCBase
// //
AddPivot( AddPivot(
peakSWHResPivot, peakSWHResPivot,
peakSWHResPivots // peakSWHResPivots,
maxAllowedPivots //
); );
} }
@@ -1950,7 +2182,8 @@ class XCXCAEAPOIDetector : public XCBase
// //
AddPivot( AddPivot(
valeSWLSupPivot, valeSWLSupPivot,
valeSWLSupPivots // valeSWLSupPivots,
maxAllowedPivots //
); );
} }
@@ -2027,7 +2260,8 @@ class XCXCAEAPOIDetector : public XCBase
// //
AddPivot( AddPivot(
kiBullishPivot, kiBullishPivot,
kiBullishPivots // kiBullishPivots,
maxAllowedPivots //
); );
} }
@@ -2104,7 +2338,8 @@ class XCXCAEAPOIDetector : public XCBase
// //
AddPivot( AddPivot(
kiBearishPivot, kiBearishPivot,
kiBearishPivots // kiBearishPivots,
maxAllowedPivots //
); );
} }
@@ -2135,7 +2370,22 @@ class XCXCAEAPOIDetector : public XCBase
// //
AddPivot( AddPivot(
iPivot, iPivot,
fvgBullishPivots // fvgBullishPivots,
maxAllowedPivots //
);
//
double fValue =
fvgBox.IsBullish()
? cVale
: cPeak;
//
// XPVFVG Handling ...
AddOrUpdatePVFVG(
fValue,
iPivot,
pvFVGBullishPivots //
); );
// //
@@ -2165,7 +2415,22 @@ class XCXCAEAPOIDetector : public XCBase
// //
AddPivot( AddPivot(
iPivot, iPivot,
fvgBearishPivots // fvgBearishPivots,
maxAllowedPivots //
);
//
double fValue =
fvgBox.IsBullish()
? cVale
: cPeak;
//
// XPVFVG Handling ...
AddOrUpdatePVFVG(
fValue,
iPivot,
pvFVGBearishPivots //
); );
// //
@@ -2241,7 +2506,8 @@ class XCXCAEAPOIDetector : public XCBase
// //
AddPivot( AddPivot(
tkiBullishPivot, tkiBullishPivot,
tkiBullishPivots // tkiBullishPivots,
maxAllowedPivots //
); );
} }
@@ -2318,7 +2584,8 @@ class XCXCAEAPOIDetector : public XCBase
// //
AddPivot( AddPivot(
tkiBearishPivot, tkiBearishPivot,
tkiBearishPivots // tkiBearishPivots,
maxAllowedPivots //
); );
} }
@@ -2395,7 +2662,8 @@ class XCXCAEAPOIDetector : public XCBase
// //
AddPivot( AddPivot(
trendBullishPivot, trendBullishPivot,
trendBullishPivots // trendBullishPivots,
maxAllowedPivots //
); );
} }
@@ -2472,7 +2740,8 @@ class XCXCAEAPOIDetector : public XCBase
// //
AddPivot( AddPivot(
trendBearishPivot, trendBearishPivot,
trendBearishPivots // trendBearishPivots,
maxAllowedPivots //
); );
} }
@@ -2555,7 +2824,8 @@ class XCXCAEAPOIDetector : public XCBase
// //
AddPivot( AddPivot(
tkitrndBullishPivot, tkitrndBullishPivot,
tkitrndBullishPivots // tkitrndBullishPivots,
maxAllowedPivots //
); );
} }
@@ -2638,7 +2908,8 @@ class XCXCAEAPOIDetector : public XCBase
// //
AddPivot( AddPivot(
tkitrndBearishPivot, tkitrndBearishPivot,
tkitrndBearishPivots // tkitrndBearishPivots,
maxAllowedPivots //
); );
} }
@@ -2734,7 +3005,8 @@ class XCXCAEAPOIDetector : public XCBase
// //
AddPivot( AddPivot(
sSameLLPivot, sSameLLPivot,
sSameLLPivots // sSameLLPivots,
maxAllowedPivots //
); );
} }
@@ -2825,7 +3097,8 @@ class XCXCAEAPOIDetector : public XCBase
// //
AddPivot( AddPivot(
mSameLLPivot, mSameLLPivot,
mSameLLPivots // mSameLLPivots,
maxAllowedPivots //
); );
} }
@@ -2916,7 +3189,8 @@ class XCXCAEAPOIDetector : public XCBase
// //
AddPivot( AddPivot(
lSameLLPivot, lSameLLPivot,
lSameLLPivots // lSameLLPivots,
maxAllowedPivots //
); );
} }
@@ -3007,7 +3281,8 @@ class XCXCAEAPOIDetector : public XCBase
// //
AddPivot( AddPivot(
hSameLLPivot, hSameLLPivot,
hSameLLPivots // hSameLLPivots,
maxAllowedPivots //
); );
} }
@@ -3103,7 +3378,8 @@ class XCXCAEAPOIDetector : public XCBase
// //
AddPivot( AddPivot(
sSameHHPivot, sSameHHPivot,
sSameHHPivots // sSameHHPivots,
maxAllowedPivots //
); );
} }
@@ -3194,7 +3470,8 @@ class XCXCAEAPOIDetector : public XCBase
// //
AddPivot( AddPivot(
mSameHHPivot, mSameHHPivot,
mSameHHPivots // mSameHHPivots,
maxAllowedPivots //
); );
} }
@@ -3285,7 +3562,8 @@ class XCXCAEAPOIDetector : public XCBase
// //
AddPivot( AddPivot(
lSameHHPivot, lSameHHPivot,
lSameHHPivots // lSameHHPivots,
maxAllowedPivots //
); );
} }
@@ -3376,7 +3654,8 @@ class XCXCAEAPOIDetector : public XCBase
// //
AddPivot( AddPivot(
hSameHHPivot, hSameHHPivot,
hSameHHPivots // hSameHHPivots,
maxAllowedPivots //
); );
} }
@@ -3435,7 +3714,8 @@ class XCXCAEAPOIDetector : public XCBase
// //
AddPivot( AddPivot(
iPivot, iPivot,
rsiPeakPivots // rsiPeakPivots,
maxAllowedPivots //
); );
// //
@@ -3493,7 +3773,8 @@ class XCXCAEAPOIDetector : public XCBase
// //
AddPivot( AddPivot(
iPivot, iPivot,
rsiValePivots // rsiValePivots,
maxAllowedPivots //
); );
// //
@@ -3551,7 +3832,8 @@ class XCXCAEAPOIDetector : public XCBase
// //
AddPivot( AddPivot(
iPivot, iPivot,
rsiCrossedOverOSPivots // rsiCrossedOverOSPivots,
maxAllowedPivots //
); );
// //
@@ -3609,7 +3891,8 @@ class XCXCAEAPOIDetector : public XCBase
// //
AddPivot( AddPivot(
iPivot, iPivot,
rsiCrossedUnderOBPivots // rsiCrossedUnderOBPivots,
maxAllowedPivots //
); );
// //
@@ -3667,7 +3950,8 @@ class XCXCAEAPOIDetector : public XCBase
// //
AddPivot( AddPivot(
iPivot, iPivot,
cciPeakPivots // cciPeakPivots,
maxAllowedPivots //
); );
// //
@@ -3725,7 +4009,8 @@ class XCXCAEAPOIDetector : public XCBase
// //
AddPivot( AddPivot(
iPivot, iPivot,
cciValePivots // cciValePivots,
maxAllowedPivots //
); );
// //
@@ -3783,7 +4068,8 @@ class XCXCAEAPOIDetector : public XCBase
// //
AddPivot( AddPivot(
iPivot, iPivot,
cciCrossedOverOSPivots // cciCrossedOverOSPivots,
maxAllowedPivots //
); );
// //
@@ -3841,7 +4127,8 @@ class XCXCAEAPOIDetector : public XCBase
// //
AddPivot( AddPivot(
iPivot, iPivot,
cciCrossedUnderOBPivots // cciCrossedUnderOBPivots,
maxAllowedPivots //
); );
// //
@@ -4375,6 +4662,146 @@ class XCXCAEAPOIDetector : public XCBase
Clean(tmp); Clean(tmp);
} }
//
// PVFVG ...
XCAPVFVG tmpPVFVG[];
//
has = HasPVFVGBullishPivots();
if (has)
{
//
Copy(
pvFVGBullishPivots,
tmpPVFVG //
);
Clean(pvFVGBullishPivots);
while (HasChild(tmpPVFVG))
{
//
XCAPVFVG iPVFVG = tmpPVFVG[0];
ArrayRemove(
tmpPVFVG,
0,
1 //
);
//
XCAPivot tmpFVGs[];
Copy(
iPVFVG.fvgs,
tmpFVGs //
);
Clean(iPVFVG.fvgs);
while (HasChild(tmpFVGs))
{
//
XCAPivot iPivot = tmpFVGs[0];
ArrayRemove(
tmpFVGs,
0,
1 //
);
//
has = IsPivotBreaked(
iPivot,
unAvailableBoxes,
barIndex //
);
if (!has)
{
//
AddRef(
iPivot,
iPVFVG.fvgs //
);
}
}
Clean(tmpFVGs);
//
if (HasChild(iPVFVG.fvgs))
{
//
AddRef(
iPVFVG,
pvFVGBullishPivots //
);
}
}
Clean(tmp);
Clean(tmpPVFVG);
}
//
has = HasPVFVGBearishPivots();
if (has)
{
//
Copy(
pvFVGBearishPivots,
tmpPVFVG //
);
Clean(pvFVGBearishPivots);
while (HasChild(tmpPVFVG))
{
//
XCAPVFVG iPVFVG = tmpPVFVG[0];
ArrayRemove(
tmpPVFVG,
0,
1 //
);
//
XCAPivot tmpFVGs[];
Copy(
iPVFVG.fvgs,
tmpFVGs //
);
Clean(iPVFVG.fvgs);
while (HasChild(tmpFVGs))
{
//
XCAPivot iPivot = tmpFVGs[0];
ArrayRemove(
tmpFVGs,
0,
1 //
);
//
has = IsPivotBreaked(
iPivot,
unAvailableBoxes,
barIndex //
);
if (!has)
{
//
AddRef(
iPivot,
iPVFVG.fvgs //
);
}
}
Clean(tmpFVGs);
//
if (HasChild(iPVFVG.fvgs))
{
//
AddRef(
iPVFVG,
pvFVGBearishPivots //
);
}
}
Clean(tmp);
Clean(tmpPVFVG);
}
// //
// TREND ... // TREND ...
@@ -5154,6 +5581,8 @@ class XCXCAEAPOIDetector : public XCBase
} }
// //
Clean(tmp);
Clean(tmpPVFVG);
} }
// //
@@ -6174,6 +6603,33 @@ class XCXCAEAPOIDetector : public XCBase
return ArraySize(fvgBearishPivots); return ArraySize(fvgBearishPivots);
} }
//
// PVFVG ...
//
bool HasPVFVGBullishPivots()
{
return HasChild(pvFVGBullishPivots);
}
//
int CountPVFVGBullishPivots()
{
return ArraySize(pvFVGBullishPivots);
}
//
bool HasPVFVGBearishPivots()
{
return HasChild(pvFVGBearishPivots);
}
//
int CountPVFVGBearishPivots()
{
return ArraySize(pvFVGBearishPivots);
}
// //
// TREND ... // TREND ...
@@ -6449,77 +6905,6 @@ class XCXCAEAPOIDetector : public XCBase
XCXCAEAHelper *helper; XCXCAEAHelper *helper;
XCBarAnalyser *barAnalyser; XCBarAnalyser *barAnalyser;
//
void AddPivot(
XCAPivot &pivot,
XCAPivot &pivots[] //
)
{
//
bool has = pivot.IsValid();
if (!has)
{
return;
}
//
int idx = -1;
has = FindPivotIndex(
idx,
pivot,
pivots //
);
if (has)
{
return;
}
//
int updateIDX = -1;
int count = ArraySize(pivots);
for (int i = 0; i < count; i++)
{
//
XCAPivot iPivot = pivots[i];
//
has =
iPivot.to > pivot.to &&
iPivot.from == pivot.from &&
iPivot.value == pivot.value &&
iPivot.symbol == pivot.symbol &&
iPivot.period == pivot.period;
if (has)
{
//
updateIDX = i;
break;
}
}
//
has = IsValidIndex(updateIDX);
if (!has)
{
//
AddRef(
pivot,
pivots //
);
}
else
{
pivots[updateIDX].to = pivot.to;
}
//
// Apply Max Allowed ...
CleanupArray(
pivots,
maxAllowedPivots //
);
}
// //
bool CheckPivotCommons( bool CheckPivotCommons(
XCAPivot &pivot, XCAPivot &pivot,
+198 -80
View File
@@ -56,6 +56,8 @@ class XCXCAEAPOIDrawer : public XCBase
bool drawCycleSameHHPivots; bool drawCycleSameHHPivots;
bool drawTrendBullishPivots; bool drawTrendBullishPivots;
bool drawTrendBearishPivots; bool drawTrendBearishPivots;
bool drawPVFVGBullishPivots;
bool drawPVFVGBearishPivots;
bool drawTKITRNDBullishPivots; bool drawTKITRNDBullishPivots;
bool drawTKITRNDBearishPivots; bool drawTKITRNDBearishPivots;
bool drawRSICrossedOverOSPivots; bool drawRSICrossedOverOSPivots;
@@ -199,6 +201,8 @@ class XCXCAEAPOIDrawer : public XCBase
drawTKIBearishPivots = false; drawTKIBearishPivots = false;
drawCycleSameLLPivots = false; drawCycleSameLLPivots = false;
drawCycleSameHHPivots = false; drawCycleSameHHPivots = false;
drawPVFVGBullishPivots = false;
drawPVFVGBearishPivots = false;
drawTrendBullishPivots = false; drawTrendBullishPivots = false;
drawTrendBearishPivots = false; drawTrendBearishPivots = false;
drawTKITRNDBullishPivots = false; drawTKITRNDBullishPivots = false;
@@ -659,57 +663,114 @@ class XCXCAEAPOIDrawer : public XCBase
// //
void DrawFVGBullishPivots(datetime to = NULL) void DrawFVGBullishPivots(datetime to = NULL)
{ {
//
if (!drawFVGBullishPivots)
{
return;
}
// //
bool canUpdateTo = IsValid(to); bool canUpdateTo = IsValid(to);
// //
bool has = detector.HasFVGBullishPivots(); if (drawFVGBullishPivots)
if (!has)
{
return;
}
//
int count = detector.CountFVGBullishPivots();
for (int i = 0; i < count; i++)
{ {
// //
XBoxZone iBox; bool has = detector.HasFVGBullishPivots();
has = detector.fvgBullishPivots[i].AsBox(iBox);
if (!has)
{
//
iBox.Clean();
continue;
}
//
if (canUpdateTo)
{
iBox.to = to;
}
//
XCBoxObject *iObj;
has = drawer.DrawBox(
iBox,
iObj //
);
if (has) if (has)
{ {
// //
iObj.BoxColor(fvgBullishPivotColor); int count = detector.CountFVGBullishPivots();
iObj.BoxWidth(fvgBullishPivotWidth); for (int i = 0; i < count; i++)
iObj.BoxStyle(fvgBullishPivotStyle); {
//
XBoxZone iBox;
has = detector.fvgBullishPivots[i].AsBox(iBox);
if (!has)
{
//
iBox.Clean();
continue;
}
//
if (canUpdateTo)
{
iBox.to = to;
}
//
XCBoxObject *iObj;
has = drawer.DrawBox(
iBox,
iObj //
);
if (has)
{
//
iObj.BoxColor(fvgBullishPivotColor);
iObj.BoxWidth(fvgBullishPivotWidth);
iObj.BoxStyle(fvgBullishPivotStyle);
//
mFVGBullishPivotObjects.Add(iObj);
}
}
}
}
//
if (drawPVFVGBullishPivots)
{
//
bool has = detector.HasPVFVGBullishPivots();
if (has)
{
// //
mFVGBullishPivotObjects.Add(iObj); int count = detector.CountPVFVGBullishPivots();
for (int i = 0; i < count; i++)
{
//
XCAPVFVG iPVFVG = detector.pvFVGBullishPivots[i];
//
XBoxZone fvgBoxes[];
int fvgBoxesCount = iPVFVG.GetFVGs(fvgBoxes);
has = IsValidSize(fvgBoxesCount);
if (has)
{
//
int idx = GetLowest(fvgBoxes);
if (IsValidIndex(idx))
{
//
XBoxZone iBox = fvgBoxes[idx];
//
if (canUpdateTo)
{
iBox.to = to;
}
//
XCBoxObject *iObj;
//
has = drawer.DrawBox(
iBox,
iObj //
);
if (has)
{
//
iObj.BoxColor(fvgBullishPivotColor);
iObj.BoxWidth(fvgBullishPivotWidth);
iObj.BoxStyle(fvgBullishPivotStyle);
//
mFVGBullishPivotObjects.Add(iObj);
}
//
iBox.Clean();
ZeroMemory(iObj);
}
}
}
} }
} }
} }
@@ -717,57 +778,114 @@ class XCXCAEAPOIDrawer : public XCBase
// //
void DrawFVGBearishPivots(datetime to = NULL) void DrawFVGBearishPivots(datetime to = NULL)
{ {
//
if (!drawFVGBearishPivots)
{
return;
}
// //
bool canUpdateTo = IsValid(to); bool canUpdateTo = IsValid(to);
// //
bool has = detector.HasFVGBearishPivots(); if (drawFVGBearishPivots)
if (!has)
{
return;
}
//
int count = detector.CountFVGBearishPivots();
for (int i = 0; i < count; i++)
{ {
// //
XBoxZone iBox; bool has = detector.HasFVGBearishPivots();
has = detector.fvgBearishPivots[i].AsBox(iBox);
if (!has)
{
//
iBox.Clean();
continue;
}
//
if (canUpdateTo)
{
iBox.to = to;
}
//
XCBoxObject *iObj;
has = drawer.DrawBox(
iBox,
iObj //
);
if (has) if (has)
{ {
// //
iObj.BoxColor(fvgBearishPivotColor); int count = detector.CountFVGBearishPivots();
iObj.BoxWidth(fvgBearishPivotWidth); for (int i = 0; i < count; i++)
iObj.BoxStyle(fvgBearishPivotStyle); {
//
XBoxZone iBox;
has = detector.fvgBearishPivots[i].AsBox(iBox);
if (!has)
{
//
iBox.Clean();
continue;
}
//
if (canUpdateTo)
{
iBox.to = to;
}
//
XCBoxObject *iObj;
has = drawer.DrawBox(
iBox,
iObj //
);
if (has)
{
//
iObj.BoxColor(fvgBearishPivotColor);
iObj.BoxWidth(fvgBearishPivotWidth);
iObj.BoxStyle(fvgBearishPivotStyle);
//
mFVGBearishPivotObjects.Add(iObj);
}
}
}
}
//
if (drawPVFVGBullishPivots)
{
//
bool has = detector.HasPVFVGBearishPivots();
if (has)
{
// //
mFVGBearishPivotObjects.Add(iObj); int count = detector.CountPVFVGBearishPivots();
for (int i = 0; i < count; i++)
{
//
XCAPVFVG iPVFVG = detector.pvFVGBearishPivots[i];
//
XBoxZone fvgBoxes[];
int fvgBoxesCount = iPVFVG.GetFVGs(fvgBoxes);
has = IsValidSize(fvgBoxesCount);
if (has)
{
//
int idx = GetHighest(fvgBoxes);
if (IsValidIndex(idx))
{
//
XBoxZone iBox = fvgBoxes[idx];
//
if (canUpdateTo)
{
iBox.to = to;
}
//
XCBoxObject *iObj;
//
has = drawer.DrawBox(
iBox,
iObj //
);
if (has)
{
//
iObj.BoxColor(fvgBearishPivotColor);
iObj.BoxWidth(fvgBearishPivotWidth);
iObj.BoxStyle(fvgBearishPivotStyle);
//
mFVGBearishPivotObjects.Add(iObj);
}
//
iBox.Clean();
ZeroMemory(iObj);
}
}
}
} }
} }
} }
+6 -4
View File
@@ -691,8 +691,8 @@ class XCXCAEASignaller : XCBase
// //
inputs.caInputs.showKI = true; inputs.caInputs.showKI = true;
inputs.caInputs.showTKI = true; inputs.caInputs.showTKI = true;
inputs.caInputs.showSar = false; inputs.caInputs.showSar = true;
inputs.caInputs.showTrend = false; inputs.caInputs.showTrend = true;
inputs.caInputs.showSwings = false; inputs.caInputs.showSwings = false;
inputs.caInputs.showLongCycle = false; inputs.caInputs.showLongCycle = false;
inputs.caInputs.showHindCycle = false; inputs.caInputs.showHindCycle = false;
@@ -777,12 +777,14 @@ class XCXCAEASignaller : XCBase
drawer.drawCCIValePivots = true; drawer.drawCCIValePivots = true;
drawer.drawKIBullishPivots = false; drawer.drawKIBullishPivots = false;
drawer.drawKIBearishPivots = false; drawer.drawKIBearishPivots = false;
drawer.drawFVGBullishPivots = true; drawer.drawFVGBullishPivots = false;
drawer.drawFVGBearishPivots = true; drawer.drawFVGBearishPivots = false;
drawer.drawPeakSWHResPivots = true; drawer.drawPeakSWHResPivots = true;
drawer.drawValeSWLSupPivots = true; drawer.drawValeSWLSupPivots = true;
drawer.drawTKIBullishPivots = false; drawer.drawTKIBullishPivots = false;
drawer.drawTKIBearishPivots = false; drawer.drawTKIBearishPivots = false;
drawer.drawPVFVGBullishPivots = true;
drawer.drawPVFVGBearishPivots = true;
drawer.drawCycleSameLLPivots = false; drawer.drawCycleSameLLPivots = false;
drawer.drawCycleSameHHPivots = false; drawer.drawCycleSameHHPivots = false;
drawer.drawTrendBullishPivots = false; drawer.drawTrendBullishPivots = false;