last ...
This commit is contained in:
@@ -246,6 +246,34 @@ struct X121X3MAConditions
|
||||
bool isMediumCrossedOverSlow;
|
||||
bool isMediumCrossedUnderSlow;
|
||||
|
||||
//
|
||||
bool is3MaBullishOrdered;
|
||||
bool is3MaBearishOrdered;
|
||||
|
||||
//
|
||||
bool is3MaSwitchedToBullishOrdered;
|
||||
bool is3MaSwitchedToBearishOrdered;
|
||||
|
||||
//
|
||||
bool is3MaBullishState;
|
||||
bool is3MaBearishState;
|
||||
|
||||
//
|
||||
bool is3MaSwitchedToBullishState;
|
||||
bool is3MaSwitchedToBearishState;
|
||||
|
||||
//
|
||||
bool is3MaBullish;
|
||||
bool is3MaBearish;
|
||||
|
||||
//
|
||||
bool is3MaSwitchedToBullish;
|
||||
bool is3MaSwitchedToBearish;
|
||||
|
||||
//
|
||||
bool is3MaFinishedFromBullish;
|
||||
bool is3MaFinishedFromBearish;
|
||||
|
||||
//
|
||||
// Constructor ...
|
||||
X121X3MAConditions()
|
||||
@@ -312,6 +340,34 @@ struct X121X3MAConditions
|
||||
//
|
||||
isMediumCrossedOverSlow = false;
|
||||
isMediumCrossedUnderSlow = false;
|
||||
|
||||
//
|
||||
is3MaBullishOrdered = false;
|
||||
is3MaBearishOrdered = false;
|
||||
|
||||
//
|
||||
is3MaSwitchedToBullishOrdered = false;
|
||||
is3MaSwitchedToBearishOrdered = false;
|
||||
|
||||
//
|
||||
is3MaBullishState = false;
|
||||
is3MaBearishState = false;
|
||||
|
||||
//
|
||||
is3MaSwitchedToBullishState = false;
|
||||
is3MaSwitchedToBearishState = false;
|
||||
|
||||
//
|
||||
is3MaBullish = false;
|
||||
is3MaBearish = false;
|
||||
|
||||
//
|
||||
is3MaSwitchedToBullish = false;
|
||||
is3MaSwitchedToBearish = false;
|
||||
|
||||
//
|
||||
is3MaFinishedFromBullish = false;
|
||||
is3MaFinishedFromBearish = false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -360,6 +416,36 @@ struct X121X3MAConditions
|
||||
bullishScore += score;
|
||||
}
|
||||
|
||||
//
|
||||
if (is3MaBullish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (is3MaBullishState)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (is3MaBullishOrdered)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (is3MaSwitchedToBullish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (is3MaFinishedFromBearish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (is3MaSwitchedToBullishState)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (is3MaSwitchedToBullishOrdered)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
|
||||
//
|
||||
if (isFastUnderSlow)
|
||||
{
|
||||
@@ -385,6 +471,36 @@ struct X121X3MAConditions
|
||||
{
|
||||
bearishScore += score;
|
||||
}
|
||||
|
||||
//
|
||||
if (is3MaBearish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (is3MaBearishState)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (is3MaBearishOrdered)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (is3MaSwitchedToBearish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (is3MaFinishedFromBullish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (is3MaSwitchedToBearishState)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (is3MaSwitchedToBearishOrdered)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -453,6 +569,20 @@ struct X121X3MAConditions
|
||||
ToString("isMediumUnderSlow", isMediumUnderSlow, ignoreFalseConditions, separator) +
|
||||
ToString("isMediumCrossedOverSlow", isMediumCrossedOverSlow, ignoreFalseConditions, separator) +
|
||||
ToString("isMediumCrossedUnderSlow", isMediumCrossedUnderSlow, ignoreFalseConditions, separator) +
|
||||
ToString("is3MaBullishOrdered", is3MaBullishOrdered, ignoreFalseConditions, separator) +
|
||||
ToString("is3MaBearishOrdered", is3MaBearishOrdered, ignoreFalseConditions, separator) +
|
||||
ToString("is3MaSwitchedToBullishOrdered", is3MaSwitchedToBullishOrdered, ignoreFalseConditions, separator) +
|
||||
ToString("is3MaSwitchedToBearishOrdered", is3MaSwitchedToBearishOrdered, ignoreFalseConditions, separator) +
|
||||
ToString("is3MaBullishState", is3MaBullishState, ignoreFalseConditions, separator) +
|
||||
ToString("is3MaBearishState", is3MaBearishState, ignoreFalseConditions, separator) +
|
||||
ToString("is3MaSwitchedToBullishState", is3MaSwitchedToBullishState, ignoreFalseConditions, separator) +
|
||||
ToString("is3MaSwitchedToBearishState", is3MaSwitchedToBearishState, ignoreFalseConditions, separator) +
|
||||
ToString("is3MaBullish", is3MaBullish, ignoreFalseConditions, separator) +
|
||||
ToString("is3MaBearish", is3MaBearish, ignoreFalseConditions, separator) +
|
||||
ToString("is3MaSwitchedToBullish", is3MaSwitchedToBullish, ignoreFalseConditions, separator) +
|
||||
ToString("is3MaSwitchedToBearish", is3MaSwitchedToBearish, ignoreFalseConditions, separator) +
|
||||
ToString("is3MaFinishedFromBullish", is3MaFinishedFromBullish, ignoreFalseConditions, separator) +
|
||||
ToString("is3MaFinishedFromBearish", is3MaFinishedFromBearish, ignoreFalseConditions, separator) +
|
||||
//
|
||||
""
|
||||
//
|
||||
@@ -1151,18 +1281,108 @@ class XCX121X3MAHelper : public XCBaseHelper
|
||||
!isMediumUnderSlowPrev;
|
||||
|
||||
//
|
||||
bool is3MaBullishOrdered =
|
||||
isFastOverMedium &&
|
||||
isMediumOverSlow;
|
||||
bool is3MaBullishOrderedPrev =
|
||||
isFastOverMediumPrev &&
|
||||
isMediumOverSlowPrev;
|
||||
|
||||
//
|
||||
bool is3MaBearishOrdered =
|
||||
isFastUnderMedium &&
|
||||
isMediumUnderSlow;
|
||||
bool is3MaBearishOrderedPrev =
|
||||
isFastUnderMediumPrev &&
|
||||
isMediumUnderSlowPrev;
|
||||
|
||||
//
|
||||
bool is3MaSwitchedToBullishOrdered = is3MaBullishOrdered &&
|
||||
!is3MaBullishOrderedPrev;
|
||||
bool is3MaSwitchedToBearishOrdered = is3MaBearishOrdered &&
|
||||
!is3MaBearishOrderedPrev;
|
||||
|
||||
//
|
||||
bool is3MaBullishState =
|
||||
cFastState > 0 &&
|
||||
cMediumState > 0 &&
|
||||
cSlowState > 0;
|
||||
bool is3MaBullishStatePrev =
|
||||
pFastState > 0 &&
|
||||
pMediumState > 0 &&
|
||||
pSlowState > 0;
|
||||
|
||||
//
|
||||
bool is3MaBearishState =
|
||||
cFastState < 0 &&
|
||||
cMediumState < 0 &&
|
||||
cSlowState < 0;
|
||||
bool is3MaBearishStatePrev =
|
||||
pFastState < 0 &&
|
||||
pMediumState < 0 &&
|
||||
pSlowState < 0;
|
||||
|
||||
//
|
||||
bool is3MaSwitchedToBullishState = is3MaBullishState &&
|
||||
!is3MaBullishStatePrev;
|
||||
bool is3MaSwitchedToBearishState = is3MaBearishState &&
|
||||
!is3MaBearishStatePrev;
|
||||
|
||||
//
|
||||
bool is3MaBullish =
|
||||
is3MaBullishState &&
|
||||
is3MaBullishOrdered;
|
||||
bool is3MaBullishPrev =
|
||||
is3MaBullishStatePrev &&
|
||||
is3MaBullishOrderedPrev;
|
||||
|
||||
//
|
||||
bool is3MaBearish =
|
||||
is3MaBearishState &&
|
||||
is3MaBearishOrdered;
|
||||
bool is3MaBearishPrev =
|
||||
is3MaBearishStatePrev &&
|
||||
is3MaBearishOrderedPrev;
|
||||
|
||||
//
|
||||
bool is3MaSwitchedToBullish = is3MaBullish &&
|
||||
!is3MaBullishPrev;
|
||||
bool is3MaSwitchedToBearish = is3MaBearish &&
|
||||
!is3MaBearishPrev;
|
||||
|
||||
//
|
||||
bool is3MaFinishedFromBullish = !is3MaBullish &&
|
||||
is3MaBullishPrev;
|
||||
bool is3MaFinishedFromBearish = !is3MaBearish &&
|
||||
is3MaBearishPrev;
|
||||
|
||||
//
|
||||
conditions.is3MaBullish = is3MaBullish;
|
||||
conditions.is3MaBearish = is3MaBearish;
|
||||
conditions.isFastOverSlow = isFastOverSlow;
|
||||
conditions.isFastUnderSlow = isFastUnderSlow;
|
||||
conditions.isFastOverMedium = isFastOverMedium;
|
||||
conditions.isMediumOverSlow = isMediumOverSlow;
|
||||
conditions.isFastUnderMedium = isFastUnderMedium;
|
||||
conditions.isMediumUnderSlow = isMediumUnderSlow;
|
||||
conditions.is3MaBullishState = is3MaBullishState;
|
||||
conditions.is3MaBearishState = is3MaBearishState;
|
||||
conditions.is3MaBullishOrdered = is3MaBullishOrdered;
|
||||
conditions.is3MaBearishOrdered = is3MaBearishOrdered;
|
||||
conditions.isFastCrossedOverSlow = isFastCrossedOverSlow;
|
||||
conditions.is3MaSwitchedToBullish = is3MaSwitchedToBullish;
|
||||
conditions.is3MaSwitchedToBearish = is3MaSwitchedToBearish;
|
||||
conditions.isFastCrossedUnderSlow = isFastCrossedUnderSlow;
|
||||
conditions.isFastCrossedOverMedium = isFastCrossedOverMedium;
|
||||
conditions.isMediumCrossedOverSlow = isMediumCrossedOverSlow;
|
||||
conditions.is3MaFinishedFromBullish = is3MaFinishedFromBullish;
|
||||
conditions.is3MaFinishedFromBearish = is3MaFinishedFromBearish;
|
||||
conditions.isFastCrossedUnderMedium = isFastCrossedUnderMedium;
|
||||
conditions.isMediumCrossedUnderSlow = isMediumCrossedUnderSlow;
|
||||
conditions.is3MaSwitchedToBullishState = is3MaSwitchedToBullishState;
|
||||
conditions.is3MaSwitchedToBearishState = is3MaSwitchedToBearishState;
|
||||
conditions.is3MaSwitchedToBullishOrdered = is3MaSwitchedToBullishOrdered;
|
||||
conditions.is3MaSwitchedToBearishOrdered = is3MaSwitchedToBearishOrdered;
|
||||
|
||||
//
|
||||
Cleanup();
|
||||
@@ -1226,7 +1446,7 @@ class XCX121X3MAHelper : public XCBaseHelper
|
||||
X121_X3MA_FAST_STATE,
|
||||
barIndex,
|
||||
maxRequiredBars,
|
||||
mediumBuffer //
|
||||
fastStateBuffer //
|
||||
);
|
||||
|
||||
//
|
||||
@@ -1238,7 +1458,7 @@ class XCX121X3MAHelper : public XCBaseHelper
|
||||
X121_X3MA_MEDIUM,
|
||||
barIndex,
|
||||
maxRequiredBars,
|
||||
mediumStateBuffer //
|
||||
mediumBuffer //
|
||||
);
|
||||
|
||||
//
|
||||
@@ -1247,7 +1467,7 @@ class XCX121X3MAHelper : public XCBaseHelper
|
||||
X121_X3MA_MEDIUM_STATE,
|
||||
barIndex,
|
||||
maxRequiredBars,
|
||||
slowStateBuffer //
|
||||
mediumStateBuffer //
|
||||
);
|
||||
|
||||
//
|
||||
@@ -1268,7 +1488,7 @@ class XCX121X3MAHelper : public XCBaseHelper
|
||||
X121_X3MA_SLOW_STATE,
|
||||
barIndex,
|
||||
maxRequiredBars,
|
||||
fastStateBuffer //
|
||||
slowStateBuffer //
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -65,8 +65,8 @@ input bool applyColor = false;
|
||||
|
||||
//
|
||||
input bool showFast = true; // Show Fast
|
||||
input bool showSlow = true; // Show Medium
|
||||
input bool showMedium = true; // Show Slow
|
||||
input bool showMedium = true; // Show Medium
|
||||
input bool showSlow = true; // Show Slow
|
||||
|
||||
//
|
||||
// Buffers ...
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -40,6 +40,7 @@ class XCXCAEAPOIDrawer : public XCBase
|
||||
|
||||
//
|
||||
bool ignoreUpdateOSCTos;
|
||||
bool drawTrendPivotsOnlySelectedFVG;
|
||||
|
||||
//
|
||||
// Drawers ...
|
||||
@@ -54,8 +55,8 @@ class XCXCAEAPOIDrawer : public XCBase
|
||||
bool drawFVGBearishPivots;
|
||||
bool drawValeSupSWLPivots;
|
||||
bool drawPeakResSWHPivots;
|
||||
bool drawPVFVGBullishPivots;
|
||||
bool drawPVFVGBearishPivots;
|
||||
bool drawTrendBullishPivots;
|
||||
bool drawTrendBearishPivots;
|
||||
bool drawRSICrossedOverOSPivots;
|
||||
bool drawRSICrossedUnderOBPivots;
|
||||
bool drawCCICrossedOverOSPivots;
|
||||
@@ -81,13 +82,13 @@ class XCXCAEAPOIDrawer : public XCBase
|
||||
color peakResSWHPivotsColor;
|
||||
color trendLineBullishColor;
|
||||
color trendLineBearishColor;
|
||||
color pvFVGBullishPivotsColor;
|
||||
color pvFVGBearishPivotsColor;
|
||||
color trendBullishPivotsColor;
|
||||
color trendBearishPivotsColor;
|
||||
color rsiCrossedOverOSPivotsColor;
|
||||
color rsiCrossedUnderOBPivotsColor;
|
||||
color cciCrossedOverOSPivotsColor;
|
||||
color cciCrossedUnderOBPivotsColor;
|
||||
|
||||
|
||||
//
|
||||
// Width ...
|
||||
|
||||
@@ -108,8 +109,8 @@ class XCXCAEAPOIDrawer : public XCBase
|
||||
int peakResSWHPivotsWidth;
|
||||
int trendLineBullishWidth;
|
||||
int trendLineBearishWidth;
|
||||
int pvFVGBullishPivotsWidth;
|
||||
int pvFVGBearishPivotsWidth;
|
||||
int trendBullishPivotsWidth;
|
||||
int trendBearishPivotsWidth;
|
||||
int rsiCrossedOverOSPivotsWidth;
|
||||
int rsiCrossedUnderOBPivotsWidth;
|
||||
int cciCrossedOverOSPivotsWidth;
|
||||
@@ -135,8 +136,8 @@ class XCXCAEAPOIDrawer : public XCBase
|
||||
ENUM_LINE_STYLE peakResSWHPivotsStyle;
|
||||
ENUM_LINE_STYLE trendLineBullishStyle;
|
||||
ENUM_LINE_STYLE trendLineBearishStyle;
|
||||
ENUM_LINE_STYLE pvFVGBullishPivotsStyle;
|
||||
ENUM_LINE_STYLE pvFVGBearishPivotsStyle;
|
||||
ENUM_LINE_STYLE trendBullishPivotsStyle;
|
||||
ENUM_LINE_STYLE trendBearishPivotsStyle;
|
||||
ENUM_LINE_STYLE rsiCrossedOverOSPivotsStyle;
|
||||
ENUM_LINE_STYLE rsiCrossedUnderOBPivotsStyle;
|
||||
ENUM_LINE_STYLE cciCrossedOverOSPivotsStyle;
|
||||
@@ -188,6 +189,7 @@ class XCXCAEAPOIDrawer : public XCBase
|
||||
{
|
||||
//
|
||||
ignoreUpdateOSCTos = true;
|
||||
drawTrendPivotsOnlySelectedFVG = true;
|
||||
|
||||
//
|
||||
drawTrendLine = false;
|
||||
@@ -201,8 +203,8 @@ class XCXCAEAPOIDrawer : public XCBase
|
||||
drawFVGBearishPivots = false;
|
||||
drawValeSupSWLPivots = false;
|
||||
drawPeakResSWHPivots = false;
|
||||
drawPVFVGBullishPivots = false;
|
||||
drawPVFVGBearishPivots = false;
|
||||
drawTrendBullishPivots = false;
|
||||
drawTrendBearishPivots = false;
|
||||
drawRSICrossedOverOSPivots = false;
|
||||
drawRSICrossedUnderOBPivots = false;
|
||||
drawCCICrossedOverOSPivots = false;
|
||||
@@ -222,73 +224,73 @@ class XCXCAEAPOIDrawer : public XCBase
|
||||
fvgBullishPivotsColor = defaultBullishColor;
|
||||
valeSupSWLPivotsColor = defaultBullishColor;
|
||||
trendLineBullishColor = defaultBullishColor;
|
||||
pvFVGBullishPivotsColor = defaultBullishColor;
|
||||
trendBullishPivotsColor = defaultBullishColor;
|
||||
rsiCrossedOverOSPivotsColor = defaultBullishColor;
|
||||
cciCrossedOverOSPivotsColor = defaultBullishColor;
|
||||
|
||||
|
||||
//
|
||||
rsiPeakPivotsColor = defaultBearishColor;
|
||||
cciPeakPivotsColor = defaultBearishColor;
|
||||
fvgBearishPivotsColor = defaultBearishColor;
|
||||
peakResSWHPivotsColor = defaultBearishColor;
|
||||
trendLineBearishColor = defaultBearishColor;
|
||||
pvFVGBearishPivotsColor = defaultBearishColor;
|
||||
trendBearishPivotsColor = defaultBearishColor;
|
||||
rsiCrossedUnderOBPivotsColor = defaultBearishColor;
|
||||
cciCrossedUnderOBPivotsColor = defaultBearishColor;
|
||||
|
||||
|
||||
//
|
||||
defaultBullishWidth = 1;
|
||||
defaultBearishWidth = 1;
|
||||
|
||||
|
||||
//
|
||||
tickPivotsWidth = defaultBullishWidth;
|
||||
volumePivotsWidth = defaultBearishWidth;
|
||||
|
||||
|
||||
//
|
||||
rsiValePivotsWidth = defaultBullishWidth;
|
||||
cciValePivotsWidth = defaultBullishWidth;
|
||||
fvgBullishPivotsWidth = defaultBullishWidth;
|
||||
valeSupSWLPivotsWidth = defaultBullishWidth;
|
||||
trendLineBullishWidth = defaultBullishWidth;
|
||||
pvFVGBullishPivotsWidth = defaultBullishWidth;
|
||||
trendBullishPivotsWidth = defaultBullishWidth;
|
||||
rsiCrossedOverOSPivotsWidth = defaultBullishWidth;
|
||||
cciCrossedOverOSPivotsWidth = defaultBullishWidth;
|
||||
|
||||
|
||||
//
|
||||
rsiPeakPivotsWidth = defaultBearishWidth;
|
||||
cciPeakPivotsWidth = defaultBearishWidth;
|
||||
fvgBearishPivotsWidth = defaultBearishWidth;
|
||||
peakResSWHPivotsWidth = defaultBearishWidth;
|
||||
trendLineBearishWidth = defaultBearishWidth;
|
||||
pvFVGBearishPivotsWidth = defaultBearishWidth;
|
||||
trendBearishPivotsWidth = defaultBearishWidth;
|
||||
rsiCrossedUnderOBPivotsWidth = defaultBearishWidth;
|
||||
cciCrossedUnderOBPivotsWidth = defaultBearishWidth;
|
||||
|
||||
|
||||
//
|
||||
defaultBullishStyle = STYLE_SOLID;
|
||||
defaultBearishStyle = STYLE_SOLID;
|
||||
|
||||
|
||||
//
|
||||
tickPivotsStyle = defaultBullishStyle;
|
||||
volumePivotsStyle = defaultBearishStyle;
|
||||
|
||||
|
||||
//
|
||||
rsiValePivotsStyle = defaultBullishStyle;
|
||||
cciValePivotsStyle = defaultBullishStyle;
|
||||
fvgBullishPivotsStyle = defaultBullishStyle;
|
||||
valeSupSWLPivotsStyle = defaultBullishStyle;
|
||||
trendLineBullishStyle = defaultBullishStyle;
|
||||
pvFVGBullishPivotsStyle = defaultBullishStyle;
|
||||
trendBullishPivotsStyle = defaultBullishStyle;
|
||||
rsiCrossedOverOSPivotsStyle = defaultBullishStyle;
|
||||
cciCrossedOverOSPivotsStyle = defaultBullishStyle;
|
||||
|
||||
|
||||
//
|
||||
rsiPeakPivotsStyle = defaultBearishStyle;
|
||||
cciPeakPivotsStyle = defaultBearishStyle;
|
||||
fvgBearishPivotsStyle = defaultBearishStyle;
|
||||
peakResSWHPivotsStyle = defaultBearishStyle;
|
||||
trendLineBearishStyle = defaultBearishStyle;
|
||||
pvFVGBearishPivotsStyle = defaultBearishStyle;
|
||||
trendBearishPivotsStyle = defaultBearishStyle;
|
||||
rsiCrossedUnderOBPivotsStyle = defaultBearishStyle;
|
||||
cciCrossedUnderOBPivotsStyle = defaultBearishStyle;
|
||||
}
|
||||
@@ -308,8 +310,8 @@ class XCXCAEAPOIDrawer : public XCBase
|
||||
DrawFVGBearishPivots(to);
|
||||
DrawValeSupSWLPivots(to);
|
||||
DrawPeakResSWHPivots(to);
|
||||
DrawPVFVGBullishPivots(to);
|
||||
DrawPVFVGBearishPivots(to);
|
||||
DrawTrendBullishPivots(to);
|
||||
DrawTrendBearishPivots(to);
|
||||
DrawRSICrossedOverOSPivots(to);
|
||||
DrawRSICrossedUnderOBPivots(to);
|
||||
DrawCCICrossedOverOSPivots(to);
|
||||
@@ -331,8 +333,8 @@ class XCXCAEAPOIDrawer : public XCBase
|
||||
mFVGBearishPivotObjects.Clear();
|
||||
mValeSupSWLPivotObjects.Clear();
|
||||
mPeakResSWHPivotObjects.Clear();
|
||||
mPVFVGBullishPivotObjects.Clear();
|
||||
mPVFVGBearishPivotObjects.Clear();
|
||||
mTrendBullishPivotObjects.Clear();
|
||||
mTrendBearishPivotObjects.Clear();
|
||||
mRSICrossedOverOSPivotObjects.Clear();
|
||||
mRSICrossedUnderOBPivotObjects.Clear();
|
||||
mCCICrossedOverOSPivotObjects.Clear();
|
||||
@@ -1035,17 +1037,17 @@ class XCXCAEAPOIDrawer : public XCBase
|
||||
}
|
||||
|
||||
//
|
||||
void DrawPVFVGBullishPivots(datetime to = NULL)
|
||||
void DrawTrendBullishPivots(datetime to = NULL)
|
||||
{
|
||||
//
|
||||
bool has = drawPVFVGBullishPivots;
|
||||
bool has = drawTrendBullishPivots;
|
||||
if (!has)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
has = detector.HasPVFVGBullishPivots();
|
||||
has = detector.HasTrendBullishPivots();
|
||||
if (!has)
|
||||
{
|
||||
return;
|
||||
@@ -1055,64 +1057,148 @@ class XCXCAEAPOIDrawer : public XCBase
|
||||
bool canUpdateTo = IsValid(to);
|
||||
|
||||
//
|
||||
int count = detector.CountPVFVGBullishPivots();
|
||||
int count = detector.CountTrendBullishPivots();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox;
|
||||
has = detector.pvFVGBullishPivots[i].GetSelectedFVG(iBox);
|
||||
if (!has)
|
||||
{
|
||||
//
|
||||
iBox.Clean();
|
||||
continue;
|
||||
}
|
||||
XCATRENDFVG iTrendFVG = detector.trendBullishPivots[i];
|
||||
|
||||
//
|
||||
// Draw Trend Box ...
|
||||
|
||||
//
|
||||
if (canUpdateTo)
|
||||
{
|
||||
iBox.to = to;
|
||||
iTrendFVG.trend.to = to;
|
||||
}
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
XCBoxObject *iTrendBoxObj;
|
||||
has = drawer.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
iTrendFVG.trend,
|
||||
iTrendBoxObj //
|
||||
);
|
||||
|
||||
//
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// Style Object ...
|
||||
iObj.BoxColor(pvFVGBullishPivotsColor);
|
||||
iObj.BoxWidth(pvFVGBullishPivotsWidth);
|
||||
iObj.BoxStyle(pvFVGBullishPivotsStyle);
|
||||
iTrendBoxObj.BoxColor(trendBullishPivotsColor);
|
||||
iTrendBoxObj.BoxWidth(trendBullishPivotsWidth);
|
||||
iTrendBoxObj.BoxStyle(trendBullishPivotsStyle);
|
||||
|
||||
//
|
||||
// Store Object ...
|
||||
mPVFVGBullishPivotObjects.Add(iObj);
|
||||
mTrendBullishPivotObjects.Add(iTrendBoxObj);
|
||||
}
|
||||
|
||||
//
|
||||
iBox.Clean();
|
||||
ZeroMemory(iObj);
|
||||
// Draw ITrendFVG FVGS ...
|
||||
if (drawTrendPivotsOnlySelectedFVG)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox;
|
||||
has = iTrendFVG.GetSelectedFVG(iBox);
|
||||
if (!has)
|
||||
{
|
||||
//
|
||||
iBox.Clean();
|
||||
continue;
|
||||
}
|
||||
|
||||
//
|
||||
if (canUpdateTo)
|
||||
{
|
||||
iBox.to = to;
|
||||
}
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = drawer.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
);
|
||||
|
||||
//
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// Style Object ...
|
||||
iObj.BoxColor(fvgBullishPivotsColor);
|
||||
iObj.BoxWidth(fvgBullishPivotsWidth);
|
||||
iObj.BoxStyle(fvgBullishPivotsStyle);
|
||||
|
||||
//
|
||||
// Store Object ...
|
||||
mTrendBullishPivotObjects.Add(iObj);
|
||||
}
|
||||
|
||||
//
|
||||
iBox.Clean();
|
||||
ZeroMemory(iObj);
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
// Draw All FVGs ...
|
||||
has = HasChild(iTrendFVG.fvgs);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
int jCount = ArraySize(iTrendFVG.fvgs);
|
||||
for (int j = 0; j < jCount; j++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox = iTrendFVG.fvgs[j];
|
||||
|
||||
//
|
||||
if (canUpdateTo) {
|
||||
iBox.to = to;
|
||||
}
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = drawer.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// Style Object ...
|
||||
iObj.BoxColor(fvgBullishPivotsColor);
|
||||
iObj.BoxWidth(fvgBullishPivotsWidth);
|
||||
iObj.BoxStyle(fvgBullishPivotsStyle);
|
||||
|
||||
//
|
||||
// Store Object ...
|
||||
mTrendBullishPivotObjects.Add(iObj);
|
||||
}
|
||||
|
||||
//
|
||||
iBox.Clean();
|
||||
ZeroMemory(iObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
iTrendFVG.Clean();
|
||||
ZeroMemory(iTrendBoxObj);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
void DrawPVFVGBearishPivots(datetime to = NULL)
|
||||
void DrawTrendBearishPivots(datetime to = NULL)
|
||||
{
|
||||
//
|
||||
bool has = drawPVFVGBearishPivots;
|
||||
bool has = drawTrendBearishPivots;
|
||||
if (!has)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
has = detector.HasPVFVGBearishPivots();
|
||||
has = detector.HasTrendBearishPivots();
|
||||
if (!has)
|
||||
{
|
||||
return;
|
||||
@@ -1122,54 +1208,138 @@ class XCXCAEAPOIDrawer : public XCBase
|
||||
bool canUpdateTo = IsValid(to);
|
||||
|
||||
//
|
||||
int count = detector.CountPVFVGBearishPivots();
|
||||
int count = detector.CountTrendBearishPivots();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox;
|
||||
has = detector.pvFVGBearishPivots[i].GetSelectedFVG(iBox);
|
||||
if (!has)
|
||||
{
|
||||
//
|
||||
iBox.Clean();
|
||||
continue;
|
||||
}
|
||||
XCATRENDFVG iTrendFVG = detector.trendBearishPivots[i];
|
||||
|
||||
//
|
||||
// Draw Trend Box ...
|
||||
|
||||
//
|
||||
if (canUpdateTo)
|
||||
{
|
||||
iBox.to = to;
|
||||
iTrendFVG.trend.to = to;
|
||||
}
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
XCBoxObject *iTrendBoxObj;
|
||||
has = drawer.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
iTrendFVG.trend,
|
||||
iTrendBoxObj //
|
||||
);
|
||||
|
||||
//
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// Style Object ...
|
||||
iObj.BoxColor(pvFVGBearishPivotsColor);
|
||||
iObj.BoxWidth(pvFVGBearishPivotsWidth);
|
||||
iObj.BoxStyle(pvFVGBearishPivotsStyle);
|
||||
iTrendBoxObj.BoxColor(trendBearishPivotsColor);
|
||||
iTrendBoxObj.BoxWidth(trendBearishPivotsWidth);
|
||||
iTrendBoxObj.BoxStyle(trendBearishPivotsStyle);
|
||||
|
||||
//
|
||||
// Store Object ...
|
||||
mPVFVGBearishPivotObjects.Add(iObj);
|
||||
mTrendBearishPivotObjects.Add(iTrendBoxObj);
|
||||
}
|
||||
|
||||
//
|
||||
iBox.Clean();
|
||||
ZeroMemory(iObj);
|
||||
// Draw ITrendFVG FVGS ...
|
||||
if (drawTrendPivotsOnlySelectedFVG)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox;
|
||||
has = iTrendFVG.GetSelectedFVG(iBox);
|
||||
if (!has)
|
||||
{
|
||||
//
|
||||
iBox.Clean();
|
||||
continue;
|
||||
}
|
||||
|
||||
//
|
||||
if (canUpdateTo)
|
||||
{
|
||||
iBox.to = to;
|
||||
}
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = drawer.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
);
|
||||
|
||||
//
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// Style Object ...
|
||||
iObj.BoxColor(fvgBearishPivotsColor);
|
||||
iObj.BoxWidth(fvgBearishPivotsWidth);
|
||||
iObj.BoxStyle(fvgBearishPivotsStyle);
|
||||
|
||||
//
|
||||
// Store Object ...
|
||||
mTrendBearishPivotObjects.Add(iObj);
|
||||
}
|
||||
|
||||
//
|
||||
iBox.Clean();
|
||||
ZeroMemory(iObj);
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
// Draw All FVGs ...
|
||||
has = HasChild(iTrendFVG.fvgs);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
int jCount = ArraySize(iTrendFVG.fvgs);
|
||||
for (int j = 0; j < jCount; j++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox = iTrendFVG.fvgs[j];
|
||||
|
||||
//
|
||||
if (canUpdateTo) {
|
||||
iBox.to = to;
|
||||
}
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = drawer.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// Style Object ...
|
||||
iObj.BoxColor(fvgBearishPivotsColor);
|
||||
iObj.BoxWidth(fvgBearishPivotsWidth);
|
||||
iObj.BoxStyle(fvgBearishPivotsStyle);
|
||||
|
||||
//
|
||||
// Store Object ...
|
||||
mTrendBearishPivotObjects.Add(iObj);
|
||||
}
|
||||
|
||||
//
|
||||
iBox.Clean();
|
||||
ZeroMemory(iObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
iTrendFVG.Clean();
|
||||
ZeroMemory(iTrendBoxObj);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
void DrawRSICrossedOverOSPivots(datetime to = NULL)
|
||||
void DrawRSICrossedOverOSPivots(datetime to = NULL)
|
||||
{
|
||||
//
|
||||
bool has = drawRSICrossedOverOSPivots;
|
||||
@@ -1301,7 +1471,7 @@ class XCXCAEAPOIDrawer : public XCBase
|
||||
}
|
||||
|
||||
//
|
||||
void DrawCCICrossedOverOSPivots(datetime to = NULL)
|
||||
void DrawCCICrossedOverOSPivots(datetime to = NULL)
|
||||
{
|
||||
//
|
||||
bool has = drawCCICrossedOverOSPivots;
|
||||
@@ -1460,8 +1630,8 @@ class XCXCAEAPOIDrawer : public XCBase
|
||||
CArrayObj mFVGBearishPivotObjects;
|
||||
CArrayObj mValeSupSWLPivotObjects;
|
||||
CArrayObj mPeakResSWHPivotObjects;
|
||||
CArrayObj mPVFVGBullishPivotObjects;
|
||||
CArrayObj mPVFVGBearishPivotObjects;
|
||||
CArrayObj mTrendBullishPivotObjects;
|
||||
CArrayObj mTrendBearishPivotObjects;
|
||||
CArrayObj mRSICrossedOverOSPivotObjects;
|
||||
CArrayObj mRSICrossedUnderOBPivotObjects;
|
||||
CArrayObj mCCICrossedOverOSPivotObjects;
|
||||
|
||||
+164
-21
@@ -25,10 +25,10 @@
|
||||
#include "../../Classes/x-saherelm.x-bar.analyser.class.mq5"
|
||||
#include "../../Classes/x-saherelm.x-poi.class.mq5"
|
||||
#include "../../Classes/x-saherelm.x-poi.drawer.class.mq5"
|
||||
#include "../../Helpers/x-saherelm.x121.x3ma.helper.mq5"
|
||||
#include "../../Helpers/x-saherelm.x121.xca.helper.mq5"
|
||||
#include "../../Helpers/x-saherelm.x121.xcc.helper.mq5"
|
||||
#include "../../Helpers/x-saherelm.x121.xct.helper.mq5"
|
||||
#include "../../Helpers/x-saherelm.x121.x3ma.helper.mq5"
|
||||
#include "../../Helpers/x-saherelm.x121.xoscs.helper.mq5"
|
||||
|
||||
//
|
||||
@@ -124,7 +124,7 @@ struct XCAEAInputs
|
||||
ccInputs.IsValid() &&
|
||||
caInputs.IsValid() &&
|
||||
x3maInputs.IsValid() &&
|
||||
oscsInputs.IsValid()
|
||||
oscsInputs.IsValid()
|
||||
//
|
||||
;
|
||||
|
||||
@@ -215,6 +215,34 @@ struct XCAEAConditions
|
||||
bool isMediumCrossedOverSlow;
|
||||
bool isMediumCrossedUnderSlow;
|
||||
|
||||
//
|
||||
bool is3MaBullishOrdered;
|
||||
bool is3MaBearishOrdered;
|
||||
|
||||
//
|
||||
bool is3MaSwitchedToBullishOrdered;
|
||||
bool is3MaSwitchedToBearishOrdered;
|
||||
|
||||
//
|
||||
bool is3MaBullishState;
|
||||
bool is3MaBearishState;
|
||||
|
||||
//
|
||||
bool is3MaSwitchedToBullishState;
|
||||
bool is3MaSwitchedToBearishState;
|
||||
|
||||
//
|
||||
bool is3MaBullish;
|
||||
bool is3MaBearish;
|
||||
|
||||
//
|
||||
bool is3MaSwitchedToBullish;
|
||||
bool is3MaSwitchedToBearish;
|
||||
|
||||
//
|
||||
bool is3MaFinishedFromBullish;
|
||||
bool is3MaFinishedFromBearish;
|
||||
|
||||
//
|
||||
// XCA ...
|
||||
|
||||
@@ -770,6 +798,34 @@ struct XCAEAConditions
|
||||
isMediumCrossedOverSlow = false;
|
||||
isMediumCrossedUnderSlow = false;
|
||||
|
||||
//
|
||||
is3MaBullishOrdered = false;
|
||||
is3MaBearishOrdered = false;
|
||||
|
||||
//
|
||||
is3MaSwitchedToBullishOrdered = false;
|
||||
is3MaSwitchedToBearishOrdered = false;
|
||||
|
||||
//
|
||||
is3MaBullishState = false;
|
||||
is3MaBearishState = false;
|
||||
|
||||
//
|
||||
is3MaSwitchedToBullishState = false;
|
||||
is3MaSwitchedToBearishState = false;
|
||||
|
||||
//
|
||||
is3MaBullish = false;
|
||||
is3MaBearish = false;
|
||||
|
||||
//
|
||||
is3MaSwitchedToBullish = false;
|
||||
is3MaSwitchedToBearish = false;
|
||||
|
||||
//
|
||||
is3MaFinishedFromBullish = false;
|
||||
is3MaFinishedFromBearish = false;
|
||||
|
||||
//
|
||||
// XCA ...
|
||||
|
||||
@@ -910,7 +966,7 @@ struct XCAEAConditions
|
||||
//
|
||||
isSarFinishedFromBullish = false;
|
||||
isSarFinishedFromBearish = false;
|
||||
|
||||
|
||||
//
|
||||
// PEAK ...
|
||||
|
||||
@@ -1287,6 +1343,36 @@ struct XCAEAConditions
|
||||
bullishScore += score;
|
||||
}
|
||||
|
||||
//
|
||||
if (is3MaBullish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (is3MaBullishState)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (is3MaBullishOrdered)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (is3MaSwitchedToBullish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (is3MaFinishedFromBearish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (is3MaSwitchedToBullishState)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (is3MaSwitchedToBullishOrdered)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
|
||||
//
|
||||
if (isFastUnderSlow)
|
||||
{
|
||||
@@ -1313,6 +1399,35 @@ struct XCAEAConditions
|
||||
bearishScore += score;
|
||||
}
|
||||
|
||||
//
|
||||
if (is3MaBearish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (is3MaBearishState)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (is3MaBearishOrdered)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (is3MaSwitchedToBearish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (is3MaFinishedFromBullish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (is3MaSwitchedToBearishState)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (is3MaSwitchedToBearishOrdered)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
//
|
||||
// KI ...
|
||||
|
||||
@@ -2099,6 +2214,20 @@ struct XCAEAConditions
|
||||
ToString("isMediumUnderSlow", isMediumUnderSlow, ignoreFalseConditions, separator) +
|
||||
ToString("isMediumCrossedOverSlow", isMediumCrossedOverSlow, ignoreFalseConditions, separator) +
|
||||
ToString("isMediumCrossedUnderSlow", isMediumCrossedUnderSlow, ignoreFalseConditions, separator) +
|
||||
ToString("is3MaBullishOrdered", is3MaBullishOrdered, ignoreFalseConditions, separator) +
|
||||
ToString("is3MaBearishOrdered", is3MaBearishOrdered, ignoreFalseConditions, separator) +
|
||||
ToString("is3MaSwitchedToBullishOrdered", is3MaSwitchedToBullishOrdered, ignoreFalseConditions, separator) +
|
||||
ToString("is3MaSwitchedToBearishOrdered", is3MaSwitchedToBearishOrdered, ignoreFalseConditions, separator) +
|
||||
ToString("is3MaBullishState", is3MaBullishState, ignoreFalseConditions, separator) +
|
||||
ToString("is3MaBearishState", is3MaBearishState, ignoreFalseConditions, separator) +
|
||||
ToString("is3MaSwitchedToBullishState", is3MaSwitchedToBullishState, ignoreFalseConditions, separator) +
|
||||
ToString("is3MaSwitchedToBearishState", is3MaSwitchedToBearishState, ignoreFalseConditions, separator) +
|
||||
ToString("is3MaBullish", is3MaBullish, ignoreFalseConditions, separator) +
|
||||
ToString("is3MaBearish", is3MaBearish, ignoreFalseConditions, separator) +
|
||||
ToString("is3MaSwitchedToBullish", is3MaSwitchedToBullish, ignoreFalseConditions, separator) +
|
||||
ToString("is3MaSwitchedToBearish", is3MaSwitchedToBearish, ignoreFalseConditions, separator) +
|
||||
ToString("is3MaFinishedFromBullish", is3MaFinishedFromBullish, ignoreFalseConditions, separator) +
|
||||
ToString("is3MaFinishedFromBearish", is3MaFinishedFromBearish, ignoreFalseConditions, separator) +
|
||||
"-----------------------" + separator +
|
||||
"XCA: " + separator +
|
||||
"-----------------------" + separator +
|
||||
@@ -2758,8 +2887,8 @@ class XCXCAEAHelper : XCBase
|
||||
*/
|
||||
bool Get3MAConditions(
|
||||
X121X3MAConditions &conditions, //
|
||||
int barIndex = 0, //
|
||||
int loopback = 5 //
|
||||
int barIndex = 0, //
|
||||
int loopback = 5 //
|
||||
)
|
||||
{
|
||||
//
|
||||
@@ -2896,7 +3025,7 @@ class XCXCAEAHelper : XCBase
|
||||
result =
|
||||
result &&
|
||||
zBar.GetPreviousBar(cBar);
|
||||
result =
|
||||
result =
|
||||
result &&
|
||||
cBar.GetPreviousBar(pBar);
|
||||
result =
|
||||
@@ -2975,59 +3104,73 @@ class XCXCAEAHelper : XCBase
|
||||
|
||||
//
|
||||
// Buffers ...
|
||||
|
||||
|
||||
//
|
||||
Copy (
|
||||
Copy(
|
||||
x3maConditions.fastBuffer,
|
||||
conditions.fastBuffer //
|
||||
);
|
||||
|
||||
|
||||
//
|
||||
Copy (
|
||||
Copy(
|
||||
x3maConditions.mediumBuffer,
|
||||
conditions.mediumBuffer //
|
||||
);
|
||||
|
||||
|
||||
//
|
||||
Copy (
|
||||
Copy(
|
||||
x3maConditions.slowBuffer,
|
||||
conditions.slowBuffer //
|
||||
);
|
||||
|
||||
|
||||
//
|
||||
Copy (
|
||||
Copy(
|
||||
x3maConditions.fastStateBuffer,
|
||||
conditions.fastStateBuffer //
|
||||
);
|
||||
|
||||
|
||||
//
|
||||
Copy (
|
||||
Copy(
|
||||
x3maConditions.mediumStateBuffer,
|
||||
conditions.mediumStateBuffer //
|
||||
);
|
||||
|
||||
|
||||
//
|
||||
Copy (
|
||||
Copy(
|
||||
x3maConditions.slowStateBuffer,
|
||||
conditions.slowStateBuffer //
|
||||
);
|
||||
|
||||
);
|
||||
|
||||
//
|
||||
// Conditions ...
|
||||
|
||||
//
|
||||
conditions.is3MaBullish = x3maConditions.is3MaBullish;
|
||||
conditions.is3MaBearish = x3maConditions.is3MaBearish;
|
||||
conditions.isFastOverSlow = x3maConditions.isFastOverSlow;
|
||||
conditions.isFastUnderSlow = x3maConditions.isFastUnderSlow;
|
||||
conditions.isFastOverMedium = x3maConditions.isFastOverMedium;
|
||||
conditions.isMediumOverSlow = x3maConditions.isMediumOverSlow;
|
||||
conditions.isFastUnderMedium = x3maConditions.isFastUnderMedium;
|
||||
conditions.isMediumUnderSlow = x3maConditions.isMediumUnderSlow;
|
||||
conditions.is3MaBullishState = x3maConditions.is3MaBullishState;
|
||||
conditions.is3MaBearishState = x3maConditions.is3MaBearishState;
|
||||
conditions.is3MaBullishOrdered = x3maConditions.is3MaBullishOrdered;
|
||||
conditions.is3MaBearishOrdered = x3maConditions.is3MaBearishOrdered;
|
||||
conditions.isFastCrossedOverSlow = x3maConditions.isFastCrossedOverSlow;
|
||||
conditions.is3MaSwitchedToBullish = x3maConditions.is3MaSwitchedToBullish;
|
||||
conditions.is3MaSwitchedToBearish = x3maConditions.is3MaSwitchedToBearish;
|
||||
conditions.isFastCrossedUnderSlow = x3maConditions.isFastCrossedUnderSlow;
|
||||
conditions.isFastCrossedOverMedium = x3maConditions.isFastCrossedOverMedium;
|
||||
conditions.isMediumCrossedOverSlow = x3maConditions.isMediumCrossedOverSlow;
|
||||
conditions.is3MaFinishedFromBullish = x3maConditions.is3MaFinishedFromBullish;
|
||||
conditions.is3MaFinishedFromBearish = x3maConditions.is3MaFinishedFromBearish;
|
||||
conditions.isFastCrossedUnderMedium = x3maConditions.isFastCrossedUnderMedium;
|
||||
conditions.isMediumCrossedUnderSlow = x3maConditions.isMediumCrossedUnderSlow;
|
||||
conditions.is3MaSwitchedToBullishState = x3maConditions.is3MaSwitchedToBullishState;
|
||||
conditions.is3MaSwitchedToBearishState = x3maConditions.is3MaSwitchedToBearishState;
|
||||
conditions.is3MaSwitchedToBullishOrdered = x3maConditions.is3MaSwitchedToBullishOrdered;
|
||||
conditions.is3MaSwitchedToBearishOrdered = x3maConditions.is3MaSwitchedToBearishOrdered;
|
||||
|
||||
//
|
||||
// XCA ...
|
||||
@@ -3551,4 +3694,4 @@ class XCXCAEAHelper : XCBase
|
||||
int stochasticHandler;
|
||||
};
|
||||
|
||||
//
|
||||
//
|
||||
@@ -666,17 +666,98 @@ bool DetectXCAEAConditions(
|
||||
// Conditions ...
|
||||
|
||||
//
|
||||
// PEAK ...
|
||||
double zPeak = conditions.peakBuffer[zIDX];
|
||||
double cPeak = conditions.peakBuffer[cIDX];
|
||||
double pPeak = conditions.peakBuffer[pIDX];
|
||||
double p2Peak = conditions.peakBuffer[p2IDX];
|
||||
|
||||
//
|
||||
// VALE ...
|
||||
double zVale = conditions.valeBuffer[zIDX];
|
||||
double cVale = conditions.valeBuffer[cIDX];
|
||||
double pVale = conditions.valeBuffer[pIDX];
|
||||
double p2Vale = conditions.valeBuffer[p2IDX];
|
||||
|
||||
//
|
||||
// X3MA ...
|
||||
|
||||
//
|
||||
// FAST ...
|
||||
|
||||
//
|
||||
double z3MAFast = conditions.fastBuffer[zIDX];
|
||||
double c3MAFast = conditions.fastBuffer[cIDX];
|
||||
double p3MAFast = conditions.fastBuffer[pIDX];
|
||||
double p23MAFast = conditions.fastBuffer[p2IDX];
|
||||
|
||||
//
|
||||
double z3MAFastState = conditions.fastStateBuffer[zIDX];
|
||||
double c3MAFastState = conditions.fastStateBuffer[cIDX];
|
||||
double p3MAFastState = conditions.fastStateBuffer[pIDX];
|
||||
double p23MAFastState = conditions.fastStateBuffer[p2IDX];
|
||||
|
||||
//
|
||||
// MEDIUM ...
|
||||
|
||||
//
|
||||
double z3MAMedium = conditions.mediumBuffer[zIDX];
|
||||
double c3MAMedium = conditions.mediumBuffer[cIDX];
|
||||
double p3MAMedium = conditions.mediumBuffer[pIDX];
|
||||
double p23MAMedium = conditions.mediumBuffer[p2IDX];
|
||||
|
||||
//
|
||||
double z3MAMediumState = conditions.mediumStateBuffer[zIDX];
|
||||
double c3MAMediumState = conditions.mediumStateBuffer[cIDX];
|
||||
double p3MAMediumState = conditions.mediumStateBuffer[pIDX];
|
||||
double p23MAMediumState = conditions.mediumStateBuffer[p2IDX];
|
||||
|
||||
//
|
||||
// SLOW ...
|
||||
|
||||
//
|
||||
double z3MASlow = conditions.slowBuffer[zIDX];
|
||||
double c3MASlow = conditions.slowBuffer[cIDX];
|
||||
double p3MASlow = conditions.slowBuffer[pIDX];
|
||||
double p23MASlow = conditions.slowBuffer[p2IDX];
|
||||
|
||||
//
|
||||
double z3MASlowState = conditions.slowStateBuffer[zIDX];
|
||||
double c3MASlowState = conditions.slowStateBuffer[cIDX];
|
||||
double p3MASlowState = conditions.slowStateBuffer[pIDX];
|
||||
double p23MASlowState = conditions.slowStateBuffer[p2IDX];
|
||||
|
||||
//
|
||||
double x3maBullishGapUpper = c3MAMedium;
|
||||
double x3maBullishGapLower = c3MASlow;
|
||||
|
||||
//
|
||||
double x3maBearishGapUpper = c3MASlow;
|
||||
double x3maBearishGapLower = c3MAMedium;
|
||||
|
||||
//
|
||||
// Create Conditions ...
|
||||
|
||||
//
|
||||
bool isX3MABullishState =
|
||||
z3MAFast > c3MAFast &&
|
||||
isCBarValidForBullish &&
|
||||
c3MAFast > c3MAMedium &&
|
||||
isCBarBullishRejected &&
|
||||
c3MAMedium > c3MASlow &&
|
||||
cBar.low < x3maBullishGapLower &&
|
||||
cBar.GetDown() > x3maBullishGapLower;
|
||||
|
||||
//
|
||||
bool isX3MABearishState =
|
||||
z3MAFast < c3MAFast &&
|
||||
isCBarValidForBearish &&
|
||||
c3MAFast < c3MAMedium &&
|
||||
isCBarBearishRejected &&
|
||||
c3MAMedium < c3MASlow &&
|
||||
cBar.high > x3maBearishGapLower &&
|
||||
cBar.GetUp() < x3maBearishGapLower;
|
||||
|
||||
//
|
||||
// Parsing Pivots ...
|
||||
|
||||
|
||||
@@ -813,12 +813,12 @@ class XCXCAEASignaller : XCBase
|
||||
|
||||
//
|
||||
// XOSCS ...
|
||||
inputs.oscsInputs.rsiLength = 4;
|
||||
inputs.oscsInputs.rsiOBLevel = 90;
|
||||
inputs.oscsInputs.rsiOSLevel = 10;
|
||||
inputs.oscsInputs.cciLength = 7;
|
||||
inputs.oscsInputs.cciOBLevel = 130;
|
||||
inputs.oscsInputs.cciOSLevel = -130;
|
||||
// inputs.oscsInputs.rsiLength = 4;
|
||||
// inputs.oscsInputs.rsiOBLevel = 90;
|
||||
// inputs.oscsInputs.rsiOSLevel = 10;
|
||||
// inputs.oscsInputs.cciLength = 7;
|
||||
// inputs.oscsInputs.cciOBLevel = 130;
|
||||
// inputs.oscsInputs.cciOSLevel = -130;
|
||||
// inputs.oscsInputs.mfiLength = 5;
|
||||
// inputs.oscsInputs.rviLength = 5;
|
||||
|
||||
@@ -861,21 +861,24 @@ class XCXCAEASignaller : XCBase
|
||||
detector.detectCCIValePivots = false;
|
||||
detector.detectFVGBullishPivots = false;
|
||||
detector.detectFVGBearishPivots = false;
|
||||
detector.detectValeSupSWLPivots = true;
|
||||
detector.detectPeakResSWHPivots = true;
|
||||
detector.detectPVFVGBullishPivots = true;
|
||||
detector.detectPVFVGBearishPivots = true;
|
||||
detector.detectRSICrossedOverOSPivots = true;
|
||||
detector.detectRSICrossedUnderOBPivots = true;
|
||||
detector.detectCCICrossedOverOSPivots = false;
|
||||
detector.detectCCICrossedUnderOBPivots = false;
|
||||
|
||||
//
|
||||
detector.detectValeSupSWLPivots = true;
|
||||
detector.detectPeakResSWHPivots = true;
|
||||
detector.detectTrendBullishPivots = true;
|
||||
detector.detectTrendBearishPivots = true;
|
||||
detector.detectRSICrossedOverOSPivots = true;
|
||||
detector.detectRSICrossedUnderOBPivots = true;
|
||||
|
||||
//
|
||||
// Initialize and Configure Drawer ...
|
||||
drawer = new XCXCAEAPOIDrawer(detector);
|
||||
|
||||
//
|
||||
drawer.ignoreUpdateOSCTos = true;
|
||||
drawer.drawTrendPivotsOnlySelectedFVG = true;
|
||||
|
||||
//
|
||||
// Configure Drawer ...
|
||||
@@ -888,14 +891,16 @@ class XCXCAEASignaller : XCBase
|
||||
drawer.drawCCIValePivots = false;
|
||||
drawer.drawFVGBullishPivots = false;
|
||||
drawer.drawFVGBearishPivots = false;
|
||||
drawer.drawCCICrossedOverOSPivots = false;
|
||||
drawer.drawCCICrossedUnderOBPivots = false;
|
||||
|
||||
//
|
||||
drawer.drawValeSupSWLPivots = true;
|
||||
drawer.drawPeakResSWHPivots = true;
|
||||
drawer.drawPVFVGBullishPivots = true;
|
||||
drawer.drawPVFVGBearishPivots = true;
|
||||
drawer.drawTrendBullishPivots = true;
|
||||
drawer.drawTrendBearishPivots = true;
|
||||
drawer.drawRSICrossedOverOSPivots = true;
|
||||
drawer.drawRSICrossedUnderOBPivots = true;
|
||||
drawer.drawCCICrossedOverOSPivots = true;
|
||||
drawer.drawCCICrossedUnderOBPivots = true;
|
||||
|
||||
//
|
||||
// Configure Widths ...
|
||||
@@ -911,8 +916,8 @@ class XCXCAEASignaller : XCBase
|
||||
drawer.peakResSWHPivotsWidth = 1;
|
||||
drawer.trendLineBullishWidth = 4;
|
||||
drawer.trendLineBullishWidth = 4;
|
||||
drawer.pvFVGBullishPivotsWidth = 1;
|
||||
drawer.pvFVGBearishPivotsWidth = 1;
|
||||
drawer.trendBullishPivotsWidth = 1;
|
||||
drawer.trendBearishPivotsWidth = 1;
|
||||
drawer.rsiCrossedOverOSPivotsWidth = 4;
|
||||
drawer.rsiCrossedUnderOBPivotsWidth = 4;
|
||||
drawer.cciCrossedOverOSPivotsWidth = 4;
|
||||
@@ -926,14 +931,14 @@ class XCXCAEASignaller : XCBase
|
||||
drawer.rsiValePivotsColor = clrAqua;
|
||||
drawer.cciPeakPivotsColor = clrMagenta;
|
||||
drawer.cciValePivotsColor = clrAqua;
|
||||
drawer.fvgBullishPivotsColor = clrLime;
|
||||
drawer.fvgBearishPivotsColor = clrRed;
|
||||
drawer.fvgBullishPivotsColor = clrAqua;
|
||||
drawer.fvgBearishPivotsColor = clrMagenta;
|
||||
drawer.valeSupSWLPivotsColor = clrAqua;
|
||||
drawer.peakResSWHPivotsColor = clrMagenta;
|
||||
drawer.trendLineBullishColor = clrAqua;
|
||||
drawer.trendLineBullishColor = clrMagenta;
|
||||
drawer.pvFVGBullishPivotsColor = clrLime;
|
||||
drawer.pvFVGBearishPivotsColor = clrRed;
|
||||
drawer.trendBullishPivotsColor = clrLime;
|
||||
drawer.trendBearishPivotsColor = clrRed;
|
||||
drawer.rsiCrossedOverOSPivotsColor = clrAqua;
|
||||
drawer.rsiCrossedUnderOBPivotsColor = clrMagenta;
|
||||
drawer.cciCrossedOverOSPivotsColor = clrAqua;
|
||||
@@ -953,8 +958,8 @@ class XCXCAEASignaller : XCBase
|
||||
drawer.peakResSWHPivotsStyle = STYLE_SOLID;
|
||||
drawer.trendLineBullishWidth = STYLE_SOLID;
|
||||
drawer.trendLineBullishWidth = STYLE_SOLID;
|
||||
drawer.pvFVGBullishPivotsStyle = STYLE_DASHDOTDOT;
|
||||
drawer.pvFVGBearishPivotsStyle = STYLE_DASHDOTDOT;
|
||||
drawer.trendBullishPivotsStyle = STYLE_DASHDOTDOT;
|
||||
drawer.trendBearishPivotsStyle = STYLE_DASHDOTDOT;
|
||||
drawer.rsiCrossedOverOSPivotsStyle = STYLE_DASHDOTDOT;
|
||||
drawer.rsiCrossedUnderOBPivotsStyle = STYLE_DASHDOTDOT;
|
||||
drawer.cciCrossedOverOSPivotsStyle = STYLE_DASHDOTDOT;
|
||||
|
||||
Reference in New Issue
Block a user