last ...
This commit is contained in:
@@ -4468,6 +4468,85 @@ struct X121SMCStrategyConditionParser
|
|||||||
bool hasBearishZoneBox = zoneBox.IsValid() &&
|
bool hasBearishZoneBox = zoneBox.IsValid() &&
|
||||||
zoneBox.IsBearish();
|
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 ...
|
// Summarize Conditions ...
|
||||||
|
|
||||||
@@ -4477,6 +4556,7 @@ struct X121SMCStrategyConditionParser
|
|||||||
//
|
//
|
||||||
// Base Bullish Conditions ...
|
// Base Bullish Conditions ...
|
||||||
hasBullishTrend &&
|
hasBullishTrend &&
|
||||||
|
hasBullishCZone &&
|
||||||
hasBullishZoneBox &&
|
hasBullishZoneBox &&
|
||||||
hasBullishSignalBox &&
|
hasBullishSignalBox &&
|
||||||
isBarValidForBullish &&
|
isBarValidForBullish &&
|
||||||
@@ -4492,6 +4572,7 @@ struct X121SMCStrategyConditionParser
|
|||||||
//
|
//
|
||||||
// Base Bearish Conditions ...
|
// Base Bearish Conditions ...
|
||||||
hasBearishTrend &&
|
hasBearishTrend &&
|
||||||
|
hasBearishCZone &&
|
||||||
hasBearishZoneBox &&
|
hasBearishZoneBox &&
|
||||||
hasBearishSignalBox &&
|
hasBearishSignalBox &&
|
||||||
isBarValidForBearish &&
|
isBarValidForBearish &&
|
||||||
@@ -4519,12 +4600,39 @@ struct X121SMCStrategyConditionParser
|
|||||||
|
|
||||||
//
|
//
|
||||||
box.to = TimeCurrent();
|
box.to = TimeCurrent();
|
||||||
|
cZone.to = TimeCurrent();
|
||||||
|
|
||||||
//
|
//
|
||||||
if (result)
|
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 ...");
|
Print("Found ...");
|
||||||
|
|
||||||
|
//
|
||||||
|
ZeroMemory(drawer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user