last ...
This commit is contained in:
@@ -1159,7 +1159,13 @@ struct X121SMCStrategySignalProviderData
|
||||
// Prepare all ...
|
||||
bool Prepare(
|
||||
int barIndex = 0,
|
||||
int loopback = 10 //
|
||||
int loopback = 10,
|
||||
bool trigger = false,
|
||||
bool decision = true,
|
||||
bool analyse = true,
|
||||
bool verification = false,
|
||||
bool consolidation = true,
|
||||
bool vision = true //
|
||||
)
|
||||
{
|
||||
//
|
||||
@@ -1186,169 +1192,192 @@ struct X121SMCStrategySignalProviderData
|
||||
|
||||
//
|
||||
// Trigger ...
|
||||
result = triggerCycleHelper.GetConditions(
|
||||
triggerCycleEvents,
|
||||
triggerPoiEvents,
|
||||
triggerConditions,
|
||||
barIndex,
|
||||
loopback //
|
||||
);
|
||||
if (!result)
|
||||
if (trigger)
|
||||
{
|
||||
//
|
||||
Clean(triggerPoiEvents);
|
||||
Clean(triggerCycleEvents);
|
||||
result = triggerCycleHelper.GetConditions(
|
||||
triggerCycleEvents,
|
||||
triggerPoiEvents,
|
||||
triggerConditions,
|
||||
barIndex,
|
||||
loopback //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
//
|
||||
Clean(triggerPoiEvents);
|
||||
Clean(triggerCycleEvents);
|
||||
|
||||
//
|
||||
triggerConditions.Clean();
|
||||
//
|
||||
triggerConditions.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
//
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Decision ...
|
||||
result = decisionCycleHelper.GetConditions(
|
||||
decisionCycleEvents,
|
||||
decisionPoiEvents,
|
||||
decisionConditions,
|
||||
barIndex,
|
||||
loopback //
|
||||
);
|
||||
if (!result)
|
||||
if (decision)
|
||||
{
|
||||
//
|
||||
Clean(triggerPoiEvents);
|
||||
Clean(decisionPoiEvents);
|
||||
Clean(triggerCycleEvents);
|
||||
triggerConditions.Clean();
|
||||
Clean(decisionCycleEvents);
|
||||
decisionConditions.Clean();
|
||||
result = decisionCycleHelper.GetConditions(
|
||||
decisionCycleEvents,
|
||||
decisionPoiEvents,
|
||||
decisionConditions,
|
||||
barIndex,
|
||||
loopback //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
//
|
||||
Clean(triggerPoiEvents);
|
||||
Clean(decisionPoiEvents);
|
||||
Clean(triggerCycleEvents);
|
||||
triggerConditions.Clean();
|
||||
Clean(decisionCycleEvents);
|
||||
decisionConditions.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
//
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Analyse ...
|
||||
result = analyseCycleHelper.GetConditions(
|
||||
analyseCycleEvents,
|
||||
analysePoiEvents,
|
||||
analyseConditions,
|
||||
barIndex,
|
||||
loopback //
|
||||
);
|
||||
if (!result)
|
||||
if (analyse)
|
||||
{
|
||||
//
|
||||
Clean(triggerPoiEvents);
|
||||
Clean(analysePoiEvents);
|
||||
Clean(decisionPoiEvents);
|
||||
Clean(triggerCycleEvents);
|
||||
Clean(analyseCycleEvents);
|
||||
triggerConditions.Clean();
|
||||
analyseConditions.Clean();
|
||||
Clean(decisionCycleEvents);
|
||||
decisionConditions.Clean();
|
||||
result = analyseCycleHelper.GetConditions(
|
||||
analyseCycleEvents,
|
||||
analysePoiEvents,
|
||||
analyseConditions,
|
||||
barIndex,
|
||||
loopback //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
//
|
||||
Clean(triggerPoiEvents);
|
||||
Clean(analysePoiEvents);
|
||||
Clean(decisionPoiEvents);
|
||||
Clean(triggerCycleEvents);
|
||||
Clean(analyseCycleEvents);
|
||||
triggerConditions.Clean();
|
||||
analyseConditions.Clean();
|
||||
Clean(decisionCycleEvents);
|
||||
decisionConditions.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
//
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Verification ...
|
||||
result = verificationCycleHelper.GetConditions(
|
||||
verificationCycleEvents,
|
||||
verificationPoiEvents,
|
||||
verificationConditions,
|
||||
barIndex,
|
||||
loopback //
|
||||
);
|
||||
if (!result)
|
||||
if (verification)
|
||||
{
|
||||
//
|
||||
Clean(triggerPoiEvents);
|
||||
Clean(analysePoiEvents);
|
||||
Clean(decisionPoiEvents);
|
||||
Clean(triggerCycleEvents);
|
||||
Clean(analyseCycleEvents);
|
||||
triggerConditions.Clean();
|
||||
analyseConditions.Clean();
|
||||
Clean(decisionCycleEvents);
|
||||
decisionConditions.Clean();
|
||||
Clean(verificationPoiEvents);
|
||||
Clean(verificationCycleEvents);
|
||||
verificationConditions.Clean();
|
||||
result = verificationCycleHelper.GetConditions(
|
||||
verificationCycleEvents,
|
||||
verificationPoiEvents,
|
||||
verificationConditions,
|
||||
barIndex,
|
||||
loopback //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
//
|
||||
Clean(triggerPoiEvents);
|
||||
Clean(analysePoiEvents);
|
||||
Clean(decisionPoiEvents);
|
||||
Clean(triggerCycleEvents);
|
||||
Clean(analyseCycleEvents);
|
||||
triggerConditions.Clean();
|
||||
analyseConditions.Clean();
|
||||
Clean(decisionCycleEvents);
|
||||
decisionConditions.Clean();
|
||||
Clean(verificationPoiEvents);
|
||||
Clean(verificationCycleEvents);
|
||||
verificationConditions.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
//
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Consolidation ...
|
||||
result = consolidationCycleHelper.GetConditions(
|
||||
consolidationCycleEvents,
|
||||
consolidationPoiEvents,
|
||||
consolidationConditions,
|
||||
barIndex,
|
||||
loopback //
|
||||
);
|
||||
if (!result)
|
||||
if (consolidation)
|
||||
{
|
||||
//
|
||||
Clean(triggerPoiEvents);
|
||||
Clean(analysePoiEvents);
|
||||
Clean(decisionPoiEvents);
|
||||
Clean(triggerCycleEvents);
|
||||
Clean(analyseCycleEvents);
|
||||
triggerConditions.Clean();
|
||||
analyseConditions.Clean();
|
||||
Clean(decisionCycleEvents);
|
||||
decisionConditions.Clean();
|
||||
Clean(verificationPoiEvents);
|
||||
Clean(consolidationPoiEvents);
|
||||
Clean(verificationCycleEvents);
|
||||
verificationConditions.Clean();
|
||||
Clean(consolidationCycleEvents);
|
||||
consolidationConditions.Clean();
|
||||
result = consolidationCycleHelper.GetConditions(
|
||||
consolidationCycleEvents,
|
||||
consolidationPoiEvents,
|
||||
consolidationConditions,
|
||||
barIndex,
|
||||
loopback //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
//
|
||||
Clean(triggerPoiEvents);
|
||||
Clean(analysePoiEvents);
|
||||
Clean(decisionPoiEvents);
|
||||
Clean(triggerCycleEvents);
|
||||
Clean(analyseCycleEvents);
|
||||
triggerConditions.Clean();
|
||||
analyseConditions.Clean();
|
||||
Clean(decisionCycleEvents);
|
||||
decisionConditions.Clean();
|
||||
Clean(verificationPoiEvents);
|
||||
Clean(consolidationPoiEvents);
|
||||
Clean(verificationCycleEvents);
|
||||
verificationConditions.Clean();
|
||||
Clean(consolidationCycleEvents);
|
||||
consolidationConditions.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
//
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Vision ...
|
||||
result = visionCycleHelper.GetConditions(
|
||||
visionCycleEvents,
|
||||
visionPoiEvents,
|
||||
visionConditions,
|
||||
barIndex,
|
||||
loopback //
|
||||
);
|
||||
if (!result)
|
||||
if (vision)
|
||||
{
|
||||
//
|
||||
Clean(visionPoiEvents);
|
||||
Clean(triggerPoiEvents);
|
||||
Clean(analysePoiEvents);
|
||||
Clean(visionCycleEvents);
|
||||
visionConditions.Clean();
|
||||
Clean(decisionPoiEvents);
|
||||
Clean(triggerCycleEvents);
|
||||
Clean(analyseCycleEvents);
|
||||
triggerConditions.Clean();
|
||||
analyseConditions.Clean();
|
||||
Clean(decisionCycleEvents);
|
||||
decisionConditions.Clean();
|
||||
Clean(verificationPoiEvents);
|
||||
Clean(consolidationPoiEvents);
|
||||
Clean(verificationCycleEvents);
|
||||
verificationConditions.Clean();
|
||||
Clean(consolidationCycleEvents);
|
||||
consolidationConditions.Clean();
|
||||
result = visionCycleHelper.GetConditions(
|
||||
visionCycleEvents,
|
||||
visionPoiEvents,
|
||||
visionConditions,
|
||||
barIndex,
|
||||
loopback //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
//
|
||||
Clean(visionPoiEvents);
|
||||
Clean(triggerPoiEvents);
|
||||
Clean(analysePoiEvents);
|
||||
Clean(visionCycleEvents);
|
||||
visionConditions.Clean();
|
||||
Clean(decisionPoiEvents);
|
||||
Clean(triggerCycleEvents);
|
||||
Clean(analyseCycleEvents);
|
||||
triggerConditions.Clean();
|
||||
analyseConditions.Clean();
|
||||
Clean(decisionCycleEvents);
|
||||
decisionConditions.Clean();
|
||||
Clean(verificationPoiEvents);
|
||||
Clean(consolidationPoiEvents);
|
||||
Clean(verificationCycleEvents);
|
||||
verificationConditions.Clean();
|
||||
Clean(consolidationCycleEvents);
|
||||
consolidationConditions.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
//
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
@@ -2593,7 +2622,6 @@ struct X121SMCStrategyConditionParser
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
// Detecting Signal Conditions ...
|
||||
|
||||
@@ -2602,21 +2630,16 @@ struct X121SMCStrategyConditionParser
|
||||
isBullish =
|
||||
//
|
||||
// Base Condition ...
|
||||
cXConditions.isSMHKSwitchedToBullish &&
|
||||
(
|
||||
//
|
||||
// Validate CBar ...
|
||||
cBar.IsBullish() &&
|
||||
cXConditions.supportsBuffer[cIDX] == cXConditions.valesBuffer[zIDX]
|
||||
//
|
||||
(cBar.low >= cXConditions.valesGoldenBuffer[cIDX] ||
|
||||
(cBar.low < cXConditions.valesGoldenBuffer[cIDX] &&
|
||||
cXConditions.isSarSwitchedToBullish)) &&
|
||||
//
|
||||
(cBar.open == cXConditions.xhkSMOpenBuffer[cIDX] ||
|
||||
(cBar.low < cXConditions.xhkSMLowBuffer[cIDX] &&
|
||||
cBar.GetDown() > cXConditions.xhkSMHighBuffer[cIDX])) &&
|
||||
//
|
||||
cXConditions.isSarBullish
|
||||
// cXConditions.isSarSwitchedToBullish &&
|
||||
// cXConditions.isSMHKSwitchedToBullish &&
|
||||
// cBar.low < cXConditions.masLowerBuffer[cIDX] &&
|
||||
// cBar.low < cXConditions.valesGoldenBuffer[cIDX] &&
|
||||
// zBar.close < cXConditions.valesGoldenBuffer[cIDX] &&
|
||||
// cXConditions.xhkSMCloseBuffer[cIDX] < cXConditions.valesGoldenBuffer[cIDX]
|
||||
//
|
||||
)
|
||||
//
|
||||
@@ -2627,21 +2650,9 @@ struct X121SMCStrategyConditionParser
|
||||
isBearish =
|
||||
//
|
||||
// Base Condition ...
|
||||
cXConditions.isSMHKSwitchedToBearish &&
|
||||
(
|
||||
//
|
||||
// Validate CBar ...
|
||||
cBar.IsBearish() &&
|
||||
//
|
||||
(cBar.high <= cXConditions.peaksGoldenBuffer[cIDX] ||
|
||||
(cBar.high > cXConditions.peaksGoldenBuffer[cIDX] &&
|
||||
cXConditions.isSarSwitchedToBearish)) &&
|
||||
//
|
||||
(cBar.open == cXConditions.xhkSMOpenBuffer[cIDX] ||
|
||||
(cBar.high > cXConditions.xhkSMHighBuffer[cIDX] &&
|
||||
cBar.GetUp() < cXConditions.xhkSMLowBuffer[cIDX])) &&
|
||||
//
|
||||
cXConditions.isSarBearish
|
||||
false
|
||||
//
|
||||
)
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user