last ...
This commit is contained in:
@@ -2044,3 +2044,76 @@ bool IsReject(
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
RemoveDraws();
|
||||
|
||||
//
|
||||
if (hasLastBullishConsolidationZone)
|
||||
{
|
||||
//
|
||||
XCConsolidationZoneObject *iObj;
|
||||
bool isCreated = visionCycleHelper
|
||||
.mPOIDrawer
|
||||
.CreateConsolidationZone(
|
||||
lastBullishConsolidationZone,
|
||||
iObj //
|
||||
);
|
||||
if (isCreated)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
if (hasLastBearishConsolidationZone)
|
||||
{
|
||||
//
|
||||
XCConsolidationZoneObject *iObj;
|
||||
bool isCreated = visionCycleHelper
|
||||
.mPOIDrawer
|
||||
.CreateConsolidationZone(
|
||||
lastBearishConsolidationZone,
|
||||
iObj //
|
||||
);
|
||||
if (isCreated)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
if (hasPrevBullishConsolidationZone)
|
||||
{
|
||||
//
|
||||
XCConsolidationZoneObject *iObj;
|
||||
bool isCreated = visionCycleHelper
|
||||
.mPOIDrawer
|
||||
.CreateConsolidationZone(
|
||||
prevBullishConsolidationZone,
|
||||
iObj //
|
||||
);
|
||||
if (isCreated)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
if (hasPrevBearishConsolidationZone)
|
||||
{
|
||||
//
|
||||
XCConsolidationZoneObject *iObj;
|
||||
bool isCreated = visionCycleHelper
|
||||
.mPOIDrawer
|
||||
.CreateConsolidationZone(
|
||||
prevBearishConsolidationZone,
|
||||
iObj //
|
||||
);
|
||||
if (isCreated)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,6 +236,7 @@ bool DetectX121SMCGuards(
|
||||
if (!result)
|
||||
{
|
||||
//
|
||||
zBar.Clean();
|
||||
result = HasChild(guards);
|
||||
return result;
|
||||
}
|
||||
@@ -251,6 +252,7 @@ bool DetectX121SMCGuards(
|
||||
{
|
||||
//
|
||||
zBar.Clean();
|
||||
cBar.Clean();
|
||||
result = HasChild(guards);
|
||||
return result;
|
||||
}
|
||||
@@ -267,6 +269,7 @@ bool DetectX121SMCGuards(
|
||||
//
|
||||
zBar.Clean();
|
||||
cBar.Clean();
|
||||
pBar.Clean();
|
||||
result = HasChild(guards);
|
||||
return result;
|
||||
}
|
||||
@@ -284,6 +287,7 @@ bool DetectX121SMCGuards(
|
||||
zBar.Clean();
|
||||
cBar.Clean();
|
||||
pBar.Clean();
|
||||
ppBar.Clean();
|
||||
result = HasChild(guards);
|
||||
return result;
|
||||
}
|
||||
@@ -319,6 +323,13 @@ bool DetectX121SMCGuards(
|
||||
pBar.Clean();
|
||||
ppBar.Clean();
|
||||
result = HasChild(guards);
|
||||
|
||||
//
|
||||
Clean(decisionPoiEvents);
|
||||
Clean(decisionCycleEvents);
|
||||
|
||||
//
|
||||
decisionConditions.Clean();
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -349,6 +360,13 @@ bool DetectX121SMCGuards(
|
||||
//
|
||||
decisionConditions.Clean();
|
||||
|
||||
//
|
||||
Clean(analysePoiEvents);
|
||||
Clean(analyseCycleEvents);
|
||||
|
||||
//
|
||||
analyseConditions.Clean();
|
||||
|
||||
//
|
||||
result = HasChild(guards);
|
||||
return result;
|
||||
@@ -388,6 +406,13 @@ bool DetectX121SMCGuards(
|
||||
//
|
||||
analyseConditions.Clean();
|
||||
|
||||
//
|
||||
Clean(consolidationPoiEvents);
|
||||
Clean(consolidationCycleEvents);
|
||||
|
||||
//
|
||||
consolidationConditions.Clean();
|
||||
|
||||
//
|
||||
result = HasChild(guards);
|
||||
return result;
|
||||
@@ -434,6 +459,13 @@ bool DetectX121SMCGuards(
|
||||
//
|
||||
consolidationConditions.Clean();
|
||||
|
||||
//
|
||||
Clean(visionPoiEvents);
|
||||
Clean(visionCycleEvents);
|
||||
|
||||
//
|
||||
visionConditions.Clean();
|
||||
|
||||
//
|
||||
result = HasChild(guards);
|
||||
return result;
|
||||
|
||||
@@ -267,10 +267,6 @@ class XCX121SMCXWZSignalDetector : public XCBase
|
||||
consolidationConditions.Clean();
|
||||
consolidationXConditions.Clean();
|
||||
|
||||
//
|
||||
RemoveDraws();
|
||||
RemoveWorkingZoneDraws();
|
||||
|
||||
//
|
||||
mConditions.Clean();
|
||||
|
||||
@@ -323,10 +319,6 @@ class XCX121SMCXWZSignalDetector : public XCBase
|
||||
consolidationConditions.Clean();
|
||||
consolidationXConditions.Clean();
|
||||
|
||||
//
|
||||
RemoveDraws();
|
||||
RemoveWorkingZoneDraws();
|
||||
|
||||
//
|
||||
mConditions.Clean();
|
||||
|
||||
@@ -372,10 +364,6 @@ class XCX121SMCXWZSignalDetector : public XCBase
|
||||
consolidationConditions.Clean();
|
||||
consolidationXConditions.Clean();
|
||||
|
||||
//
|
||||
RemoveDraws();
|
||||
RemoveWorkingZoneDraws();
|
||||
|
||||
//
|
||||
mConditions.Clean();
|
||||
|
||||
@@ -414,12 +402,6 @@ class XCX121SMCXWZSignalDetector : public XCBase
|
||||
? canLookupShort
|
||||
: false;
|
||||
|
||||
//
|
||||
DrawWorkingZone(
|
||||
mConditions,
|
||||
visionCycleHelper.mPOIDrawer //
|
||||
);
|
||||
|
||||
//
|
||||
// Here we are Make sure we have Correct:
|
||||
// - WorkSpace ...
|
||||
@@ -474,12 +456,6 @@ class XCX121SMCXWZSignalDetector : public XCBase
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
DrawConditions(
|
||||
mConditions,
|
||||
visionCycleHelper.mPOIDrawer //
|
||||
);
|
||||
|
||||
//
|
||||
isBullish = IsBullish(conditionsDir);
|
||||
isBearish = IsBearish(conditionsDir);
|
||||
@@ -638,77 +614,6 @@ class XCX121SMCXWZSignalDetector : public XCBase
|
||||
;
|
||||
}
|
||||
|
||||
//
|
||||
RemoveDraws();
|
||||
|
||||
//
|
||||
if (hasLastBullishConsolidationZone)
|
||||
{
|
||||
//
|
||||
XCConsolidationZoneObject *iObj;
|
||||
bool isCreated = visionCycleHelper
|
||||
.mPOIDrawer
|
||||
.CreateConsolidationZone(
|
||||
lastBullishConsolidationZone,
|
||||
iObj //
|
||||
);
|
||||
if (isCreated)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
if (hasLastBearishConsolidationZone)
|
||||
{
|
||||
//
|
||||
XCConsolidationZoneObject *iObj;
|
||||
bool isCreated = visionCycleHelper
|
||||
.mPOIDrawer
|
||||
.CreateConsolidationZone(
|
||||
lastBearishConsolidationZone,
|
||||
iObj //
|
||||
);
|
||||
if (isCreated)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
if (hasPrevBullishConsolidationZone)
|
||||
{
|
||||
//
|
||||
XCConsolidationZoneObject *iObj;
|
||||
bool isCreated = visionCycleHelper
|
||||
.mPOIDrawer
|
||||
.CreateConsolidationZone(
|
||||
prevBullishConsolidationZone,
|
||||
iObj //
|
||||
);
|
||||
if (isCreated)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
if (hasPrevBearishConsolidationZone)
|
||||
{
|
||||
//
|
||||
XCConsolidationZoneObject *iObj;
|
||||
bool isCreated = visionCycleHelper
|
||||
.mPOIDrawer
|
||||
.CreateConsolidationZone(
|
||||
prevBearishConsolidationZone,
|
||||
iObj //
|
||||
);
|
||||
if (isCreated)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
bool isConsolidationZonePassed =
|
||||
isBullish
|
||||
@@ -788,12 +693,6 @@ class XCX121SMCXWZSignalDetector : public XCBase
|
||||
//
|
||||
mConditions.UpdateTo(cTime);
|
||||
|
||||
//
|
||||
DrawConditions(
|
||||
mConditions,
|
||||
visionCycleHelper.mPOIDrawer //
|
||||
);
|
||||
|
||||
//
|
||||
Clean(visionPoiEvents);
|
||||
Clean(analysePoiEvents);
|
||||
@@ -1133,10 +1032,6 @@ class XCX121SMCXWZSignalDetector : public XCBase
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
// TODO: Implement Guards ...
|
||||
return false;
|
||||
|
||||
//
|
||||
result = isCycleHelpersValid;
|
||||
if (!result)
|
||||
@@ -1235,7 +1130,8 @@ class XCX121SMCXWZSignalDetector : public XCBase
|
||||
|
||||
//
|
||||
ENUM_X_121_SMC_GUARD_ACTIONS ignoreGuards[1] = {
|
||||
X_121_SMC_GUARD_ACTION_TRAIL_STOP};
|
||||
X_121_SMC_GUARD_ACTION_TRAIL_STOP //
|
||||
};
|
||||
result = DetectX121SMCGuards(
|
||||
provider,
|
||||
guards,
|
||||
|
||||
@@ -594,9 +594,33 @@ class XCX121SMCStrategy : public XCX121SMCBaseStrategy
|
||||
setupDir = mXWZSignalDetector.mConditions.dir;
|
||||
setupTime = mXWZSignalDetector.mConditions.setupTime;
|
||||
|
||||
//
|
||||
if (!isSetuped)
|
||||
{
|
||||
//
|
||||
mXWZSignalDetector.RemoveDraws();
|
||||
mXWZSignalDetector.RemoveWorkingZoneDraws();
|
||||
|
||||
//
|
||||
mXWZSignalDetector.DrawWorkingZone(
|
||||
mXWZSignalDetector.mConditions,
|
||||
mVisionCycleHelper.mPOIDrawer //
|
||||
);
|
||||
|
||||
//
|
||||
mXWZSignalDetector.DrawConditions(
|
||||
mXWZSignalDetector.mConditions,
|
||||
mVisionCycleHelper.mPOIDrawer //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
if (isSetuped)
|
||||
{
|
||||
//
|
||||
mXWZSignalDetector.RemoveDraws();
|
||||
mXWZSignalDetector.RemoveWorkingZoneDraws();
|
||||
|
||||
//
|
||||
int items = mXWZSignalDetector
|
||||
.AddConditionsIfNotExists();
|
||||
@@ -669,6 +693,22 @@ class XCX121SMCStrategy : public XCX121SMCBaseStrategy
|
||||
//
|
||||
if (canTrigger)
|
||||
{
|
||||
//
|
||||
mXWZSignalDetector.RemoveDraws();
|
||||
mXWZSignalDetector.RemoveWorkingZoneDraws();
|
||||
|
||||
//
|
||||
mXWZSignalDetector.DrawWorkingZone(
|
||||
mTmpConditions[i],
|
||||
mVisionCycleHelper.mPOIDrawer //
|
||||
);
|
||||
|
||||
//
|
||||
mXWZSignalDetector.DrawConditions(
|
||||
mTmpConditions[i],
|
||||
mVisionCycleHelper.mPOIDrawer //
|
||||
);
|
||||
|
||||
//
|
||||
selectedIndex = i;
|
||||
mConditions = mTmpConditions[i];
|
||||
|
||||
Reference in New Issue
Block a user