last ...
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -21,8 +21,7 @@
|
||||
|
||||
//
|
||||
// Imports ...
|
||||
#include "../Classes/x-121.smc.market.cycle.helper.class.mq5"
|
||||
#include "../Libraries/x-121.smc.lib.mq5"
|
||||
#include "../Libraries/x-121.smc.guard.lib.mq5"
|
||||
|
||||
//
|
||||
// Definitions ...
|
||||
@@ -869,147 +868,15 @@ bool DetectX121SMCXSTRPVSiganlSetup(
|
||||
//
|
||||
//
|
||||
|
||||
//
|
||||
double decisionPVMiddle = decisionXConditions.valesBuffer[1] +
|
||||
(decisionXConditions.peaksBuffer[1] - decisionXConditions.valesBuffer[1]) / 2;
|
||||
bool isInDecisionPremium =
|
||||
//
|
||||
ask > decisionPVMiddle &&
|
||||
bid > decisionPVMiddle &&
|
||||
//
|
||||
ask < decisionXConditions.peaksBuffer[1] &&
|
||||
bid < decisionXConditions.peaksBuffer[1]
|
||||
//
|
||||
;
|
||||
bool isInDecisionDiscount =
|
||||
//
|
||||
ask < decisionPVMiddle &&
|
||||
bid < decisionPVMiddle &&
|
||||
//
|
||||
ask < decisionXConditions.valesBuffer[1] &&
|
||||
bid < decisionXConditions.valesBuffer[1]
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isPriceZoneBullish =
|
||||
//
|
||||
!hasDecisionCondition &&
|
||||
!hasAnalyseCondition &&
|
||||
//
|
||||
hasVerificationBullishTrend &&
|
||||
hasAnalyseBullishTrend &&
|
||||
hasDecisionBullishTrend &&
|
||||
//
|
||||
hasAnalysePriceZone &&
|
||||
analysePriceZone.IsBullish() &&
|
||||
isAnalysePriceZoneValidForVale &&
|
||||
//
|
||||
isCBarBullishFormed &&
|
||||
isInDecisionDiscount &&
|
||||
decisionXConditions.isAtrLowerUnderVale &&
|
||||
decisionXConditions.isAtrLowerSlopeBullish &&
|
||||
true
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isPriceZoneBearish =
|
||||
//
|
||||
!hasDecisionCondition &&
|
||||
!hasAnalyseCondition &&
|
||||
//
|
||||
hasVerificationBearishTrend &&
|
||||
hasAnalyseBearishTrend &&
|
||||
hasDecisionBearishTrend &&
|
||||
//
|
||||
hasAnalysePriceZone &&
|
||||
analysePriceZone.IsBearish() &&
|
||||
isAnalysePriceZoneValidForPeak &&
|
||||
//
|
||||
isInDecisionPremium &&
|
||||
isCBarBearishFormed &&
|
||||
decisionXConditions.isAtrUpperOverPeak &&
|
||||
decisionXConditions.isAtrUpperSlopeBearish &&
|
||||
true
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool hasPriceZoneCondition = isPriceZoneBullish ||
|
||||
isPriceZoneBearish;
|
||||
if (hasPriceZoneCondition)
|
||||
{
|
||||
//
|
||||
ENUM_X_DIRECTION pzDir =
|
||||
isPriceZoneBullish
|
||||
? X_DIRECTION_BULLISH
|
||||
: X_DIRECTION_BEARISH;
|
||||
|
||||
//
|
||||
// XCBaseObject *drawnObjects[];
|
||||
// int drawnObjectsCount = triggerCycleHelper
|
||||
// .mPOIDetector
|
||||
// .mDrawer
|
||||
// .DrawPriceZone(
|
||||
// analysePriceZone,
|
||||
// drawnObjects,
|
||||
// pzDir //
|
||||
// );
|
||||
// if (IsValidSize(drawnObjectsCount))
|
||||
// {
|
||||
// Print("DIR: " + EnumToString(pzDir));
|
||||
// }
|
||||
|
||||
//
|
||||
conditions.priceZone = analysePriceZone;
|
||||
conditions.isPriceZoneValidForPeak = isAnalysePriceZoneValidForPeak;
|
||||
conditions.isPriceZoneValidForVale = isAnalysePriceZoneValidForVale;
|
||||
|
||||
//
|
||||
pzPeak = analysePriceZoneUpper;
|
||||
pzVale = analysePriceZoneLower;
|
||||
|
||||
//
|
||||
double point = GetEntry(
|
||||
conditions.symbol,
|
||||
conditions.dir //
|
||||
);
|
||||
|
||||
//
|
||||
// Manipulate Conditions Point ...
|
||||
|
||||
//
|
||||
// point =
|
||||
// isPriceZoneBullish ? pzPeak
|
||||
// : pzVale;
|
||||
conditions.point = point;
|
||||
|
||||
//
|
||||
// Manipulate Conditions Pivot ...
|
||||
|
||||
//
|
||||
conditions.pivot =
|
||||
isPriceZoneBullish
|
||||
? pzVale
|
||||
: pzPeak;
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
//
|
||||
isBullish =
|
||||
isAnalyseBullish ||
|
||||
isDecisionBullish ||
|
||||
isPriceZoneBullish;
|
||||
isDecisionBullish;
|
||||
|
||||
//
|
||||
isBearish =
|
||||
isAnalyseBearish ||
|
||||
isDecisionBearish ||
|
||||
isPriceZoneBearish;
|
||||
isDecisionBearish;
|
||||
|
||||
//
|
||||
result = isBullish ||
|
||||
@@ -1685,6 +1552,37 @@ bool DetectX121SMCXSTRPVSiganlTrigger(
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool DetectX121SMCXSTRPVGuards(
|
||||
X121SMCGuard &guards[],
|
||||
const XPosition &positions[],
|
||||
XC121SMCCycleHelper *triggerCycleHelper,
|
||||
XC121SMCCycleHelper *decisionCycleHelper,
|
||||
XC121SMCCycleHelper *analyseCycleHelper,
|
||||
XC121SMCCycleHelper *verificationCycleHelper,
|
||||
XC121SMCCycleHelper *consolidationCycleHelper,
|
||||
XC121SMCCycleHelper *visionCycleHelper //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result = DetectX121SMCGuards(
|
||||
guards,
|
||||
positions,
|
||||
triggerCycleHelper,
|
||||
decisionCycleHelper,
|
||||
analyseCycleHelper,
|
||||
verificationCycleHelper,
|
||||
consolidationCycleHelper,
|
||||
visionCycleHelper //
|
||||
);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
int AddX121SMCXSTRPVConditionsIfNotExists(
|
||||
X121SMCStrategyXSTRPVSignalConditions &item,
|
||||
|
||||
Reference in New Issue
Block a user