last ...
This commit is contained in:
@@ -895,6 +895,7 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
|
|||||||
result = false;
|
result = false;
|
||||||
bool isBullish = false;
|
bool isBullish = false;
|
||||||
bool isBearish = false;
|
bool isBearish = false;
|
||||||
|
ENUM_X_DIRECTION tmpDir;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Do Signal Detection ...
|
// Do Signal Detection ...
|
||||||
@@ -904,10 +905,72 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
|
|||||||
// Here we Have to Prepare Some Directional Confirmations Using Indicators ...
|
// Here we Have to Prepare Some Directional Confirmations Using Indicators ...
|
||||||
// for Validate Signals ...
|
// for Validate Signals ...
|
||||||
|
|
||||||
|
//
|
||||||
|
int verifierBarIndex = pBar.Index();
|
||||||
|
|
||||||
|
//
|
||||||
|
bool hasSarSwitch = fimaHelper.HasSARSwitch(tmpDir, verifierBarIndex);
|
||||||
|
bool isSarSwitchedToBullish = hasSarSwitch &&
|
||||||
|
IsXBullish(tmpDir);
|
||||||
|
bool isSarSwitchedToBearish = hasSarSwitch &&
|
||||||
|
IsXBearish(tmpDir);
|
||||||
|
|
||||||
|
//
|
||||||
|
bool hasMACross = fimaHelper.HasMACross(
|
||||||
|
tmpDir,
|
||||||
|
verifierBarIndex,
|
||||||
|
structureConfig.maCrossValidationDiffMultiplier //
|
||||||
|
);
|
||||||
|
bool isCrossedOver = hasMACross &&
|
||||||
|
IsXBullish(tmpDir);
|
||||||
|
bool isCrossedUnder = hasMACross &&
|
||||||
|
IsXBearish(tmpDir);
|
||||||
|
|
||||||
|
//
|
||||||
|
bool hasHKSwitch = fimaHelper.HasHKSwitch(tmpDir, verifierBarIndex);
|
||||||
|
bool isHKSwitchedToBullish = hasHKSwitch &&
|
||||||
|
IsXBullish(tmpDir);
|
||||||
|
bool isHKSwitchedToBearish = hasHKSwitch &&
|
||||||
|
IsXBearish(tmpDir);
|
||||||
|
|
||||||
|
//
|
||||||
|
bool isBoundaryFakeBreaked = fimaHelper.IsBoundaryFakeBreaked(tmpDir, verifierBarIndex);
|
||||||
|
bool isBoundaryFakeBreakedBullish = isBoundaryFakeBreaked &&
|
||||||
|
IsXBullish(tmpDir);
|
||||||
|
bool isBoundaryFakeBreakedBearish = isBoundaryFakeBreaked &&
|
||||||
|
IsBearish(tmpDir);
|
||||||
|
|
||||||
//
|
//
|
||||||
bool hasZigZagHigherLow = fimaHelper.HasZigZagHigherLow(bar.Index(), true);
|
bool hasZigZagHigherLow = fimaHelper.HasZigZagHigherLow(bar.Index(), true);
|
||||||
bool hasZigZagLowerHigh = fimaHelper.HasZigZagLowerHigh(bar.Index(), true);
|
bool hasZigZagLowerHigh = fimaHelper.HasZigZagLowerHigh(bar.Index(), true);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Summarize Confirmations ...
|
||||||
|
|
||||||
|
//
|
||||||
|
bool isBullishConfirmed =
|
||||||
|
(hasZigZagHigherLow &&
|
||||||
|
(
|
||||||
|
//
|
||||||
|
isCrossedOver ||
|
||||||
|
isHKSwitchedToBullish ||
|
||||||
|
isSarSwitchedToBullish ||
|
||||||
|
isBoundaryFakeBreakedBullish
|
||||||
|
//
|
||||||
|
));
|
||||||
|
|
||||||
|
//
|
||||||
|
bool isBearishConfirmed =
|
||||||
|
(hasZigZagLowerHigh &&
|
||||||
|
(
|
||||||
|
//
|
||||||
|
isCrossedUnder ||
|
||||||
|
isHKSwitchedToBearish ||
|
||||||
|
isSarSwitchedToBearish ||
|
||||||
|
isBoundaryFakeBreakedBullish
|
||||||
|
//
|
||||||
|
));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Validation Patterns ...
|
// Validation Patterns ...
|
||||||
int directionalPatternsValidations = 3;
|
int directionalPatternsValidations = 3;
|
||||||
@@ -916,11 +979,20 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
|
|||||||
// Check Bullish Conditions ...
|
// Check Bullish Conditions ...
|
||||||
isBullish =
|
isBullish =
|
||||||
//
|
//
|
||||||
|
// Confirmations Passed ...
|
||||||
|
isBullishConfirmed &&
|
||||||
|
//
|
||||||
|
// Quarters Has Minor Support Zone ...
|
||||||
_structure.barAnalysis.HasMinorSupport() &&
|
_structure.barAnalysis.HasMinorSupport() &&
|
||||||
|
//
|
||||||
|
// Current Bar's Price Placed Propper ...
|
||||||
bar.open > _structure.barAnalysis.minorSupport.upper &&
|
bar.open > _structure.barAnalysis.minorSupport.upper &&
|
||||||
bar.close > _structure.barAnalysis.minorSupport.upper &&
|
bar.close > _structure.barAnalysis.minorSupport.upper &&
|
||||||
|
//
|
||||||
|
// Required Number of Pivots Validation Exists ...
|
||||||
(_structure.barsAnalysis[1].Count(X_DIRECTION_BULLISH) >= directionalPatternsValidations) &&
|
(_structure.barsAnalysis[1].Count(X_DIRECTION_BULLISH) >= directionalPatternsValidations) &&
|
||||||
//
|
//
|
||||||
|
// Bar or PBar ReTested Quarter Zone ...
|
||||||
(IsTested(
|
(IsTested(
|
||||||
pBar,
|
pBar,
|
||||||
_structure.barAnalysis.minorSupport //
|
_structure.barAnalysis.minorSupport //
|
||||||
@@ -928,9 +1000,7 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
|
|||||||
IsTested(
|
IsTested(
|
||||||
p2Bar,
|
p2Bar,
|
||||||
_structure.barAnalysis.minorSupport //
|
_structure.barAnalysis.minorSupport //
|
||||||
)) &&
|
))
|
||||||
//
|
|
||||||
(hasZigZagHigherLow)
|
|
||||||
//
|
//
|
||||||
;
|
;
|
||||||
|
|
||||||
@@ -938,11 +1008,20 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
|
|||||||
// Check Bearish Conditions ...
|
// Check Bearish Conditions ...
|
||||||
isBearish =
|
isBearish =
|
||||||
//
|
//
|
||||||
|
// Confirmations Passed ...
|
||||||
|
isBearishConfirmed &&
|
||||||
|
//
|
||||||
|
// Quarters Has Minor Resistance Zone ...
|
||||||
_structure.barAnalysis.HasMinorResistance() &&
|
_structure.barAnalysis.HasMinorResistance() &&
|
||||||
|
//
|
||||||
|
// Current Bar's Price Placed Propper ...
|
||||||
bar.open < _structure.barAnalysis.minorResistance.lower &&
|
bar.open < _structure.barAnalysis.minorResistance.lower &&
|
||||||
bar.close < _structure.barAnalysis.minorResistance.lower &&
|
bar.close < _structure.barAnalysis.minorResistance.lower &&
|
||||||
|
//
|
||||||
|
// Required Number of Pivots Validation Exists ...
|
||||||
(_structure.barsAnalysis[1].Count(X_DIRECTION_BEARISH) >= directionalPatternsValidations) &&
|
(_structure.barsAnalysis[1].Count(X_DIRECTION_BEARISH) >= directionalPatternsValidations) &&
|
||||||
//
|
//
|
||||||
|
// Bar or pBar ReTested Quarter Zone ...
|
||||||
(IsTested(
|
(IsTested(
|
||||||
pBar,
|
pBar,
|
||||||
_structure.barAnalysis.minorResistance //
|
_structure.barAnalysis.minorResistance //
|
||||||
@@ -950,9 +1029,7 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
|
|||||||
IsTested(
|
IsTested(
|
||||||
p2Bar,
|
p2Bar,
|
||||||
_structure.barAnalysis.minorResistance //
|
_structure.barAnalysis.minorResistance //
|
||||||
)) &&
|
))
|
||||||
//
|
|
||||||
(hasZigZagLowerHigh)
|
|
||||||
//
|
//
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user