last ...
This commit is contained in:
@@ -4468,6 +4468,85 @@ struct X121SMCStrategyConditionParser
|
||||
bool hasBearishZoneBox = zoneBox.IsValid() &&
|
||||
zoneBox.IsBearish();
|
||||
|
||||
//
|
||||
// Detecting Consolidation Zone ...
|
||||
XBoxZone cZone;
|
||||
if (hasBullishTrend)
|
||||
{
|
||||
//
|
||||
ToBox(
|
||||
cState.bullishConsolidationZones,
|
||||
tmpBoxes //
|
||||
);
|
||||
}
|
||||
else if (hasBearishTrend)
|
||||
{
|
||||
//
|
||||
ToBox(
|
||||
cState.bearishConsolidationZones,
|
||||
tmpBoxes //
|
||||
);
|
||||
}
|
||||
has = HasChild(tmpBoxes);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
idx = GetYoungest(tmpBoxes);
|
||||
has = IsValidIndex(idx);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
cZone = tmpBoxes[idx];
|
||||
|
||||
//
|
||||
// Check Consolidation Zone Place ...
|
||||
has =
|
||||
//
|
||||
(
|
||||
//
|
||||
IsBoxInsideOr(
|
||||
cZone,
|
||||
zoneBox //
|
||||
)
|
||||
//
|
||||
&&
|
||||
//
|
||||
cZone.from >= zoneBox.from
|
||||
//
|
||||
)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
//
|
||||
IsBoxInsideOr(
|
||||
zoneBox,
|
||||
cZone //
|
||||
)
|
||||
//
|
||||
&&
|
||||
//
|
||||
zoneBox.from >= cZone.from
|
||||
//
|
||||
)
|
||||
//
|
||||
;
|
||||
if (!has)
|
||||
{
|
||||
cZone.Clean();
|
||||
}
|
||||
}
|
||||
}
|
||||
Clean(tmpBoxes);
|
||||
|
||||
//
|
||||
bool hasBullishCZone = cZone.IsValid() &&
|
||||
cZone.IsBullish();
|
||||
|
||||
//
|
||||
bool hasBearishCZone = cZone.IsValid() &&
|
||||
cZone.IsBearish();
|
||||
|
||||
//
|
||||
// Summarize Conditions ...
|
||||
|
||||
@@ -4477,6 +4556,7 @@ struct X121SMCStrategyConditionParser
|
||||
//
|
||||
// Base Bullish Conditions ...
|
||||
hasBullishTrend &&
|
||||
hasBullishCZone &&
|
||||
hasBullishZoneBox &&
|
||||
hasBullishSignalBox &&
|
||||
isBarValidForBullish &&
|
||||
@@ -4492,6 +4572,7 @@ struct X121SMCStrategyConditionParser
|
||||
//
|
||||
// Base Bearish Conditions ...
|
||||
hasBearishTrend &&
|
||||
hasBearishCZone &&
|
||||
hasBearishZoneBox &&
|
||||
hasBearishSignalBox &&
|
||||
isBarValidForBearish &&
|
||||
@@ -4519,12 +4600,39 @@ struct X121SMCStrategyConditionParser
|
||||
|
||||
//
|
||||
box.to = TimeCurrent();
|
||||
cZone.to = TimeCurrent();
|
||||
|
||||
//
|
||||
if (result)
|
||||
{
|
||||
//
|
||||
XCPOIDrawer *drawer = provider.visionCycleHelper.mPOIDrawer;
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = drawer.DrawBox(
|
||||
box,
|
||||
iObj //
|
||||
);
|
||||
|
||||
//
|
||||
XCBoxObject *iCObject;
|
||||
has = drawer.DrawBox(
|
||||
cZone,
|
||||
iCObject //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
iCObject.BoxColor(clrLime);
|
||||
iCObject.BoxStyle(STYLE_SOLID);
|
||||
}
|
||||
|
||||
//
|
||||
Print("Found ...");
|
||||
|
||||
//
|
||||
ZeroMemory(drawer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user