add support of Consolidation Zone ibside XPOIDetector and XPOIState ...
This commit is contained in:
@@ -384,6 +384,11 @@ struct XPOIState
|
||||
XCFVG *bullishFairValueGaps[]; // Holds Founded Bullish Fair Value Gaps ...
|
||||
XCFVG *bearishFairValueGaps[]; // Holds Founded Bearish Fair Value Gaps ...
|
||||
|
||||
//
|
||||
XConsolidationZone consolidationZones[]; // Holds Founded Consolidation Zones ...
|
||||
XConsolidationZone bullishConsolidationZones[]; // Holds Founded Bullish Consolidation Zones ...
|
||||
XConsolidationZone bearishConsolidationZones[]; // Holds Founded Bearih Consolidation Zones ...
|
||||
|
||||
//
|
||||
// Constructor ...
|
||||
void XPOIState()
|
||||
@@ -437,6 +442,11 @@ struct XPOIState
|
||||
Clean(bullishFairValueGaps);
|
||||
Clean(bearishFairValueGaps);
|
||||
|
||||
//
|
||||
Clean(consolidationZones);
|
||||
Clean(bullishConsolidationZones);
|
||||
Clean(bearishConsolidationZones);
|
||||
|
||||
//
|
||||
ZeroMemory(this);
|
||||
}
|
||||
@@ -474,20 +484,22 @@ struct XPOIState
|
||||
//
|
||||
result =
|
||||
//
|
||||
IsValidSize(CountSwingHighs()) ||
|
||||
IsValidSize(CountSwingLows()) ||
|
||||
IsValidSize(CountBullishMomentumBars()) ||
|
||||
IsValidSize(CountBearishMomentumBars()) ||
|
||||
IsValidSize(CountBullishRejectionBars()) ||
|
||||
IsValidSize(CountBearishRejectionBars()) ||
|
||||
IsValidSize(CountSupportZones()) ||
|
||||
IsValidSize(CountResistanceZones()) ||
|
||||
IsValidSize(CountSupplyZones()) ||
|
||||
IsValidSize(CountDemandZones()) ||
|
||||
IsValidSize(CountBullishOrderBlocks()) ||
|
||||
IsValidSize(CountBearishOrderBlocks()) ||
|
||||
IsValidSize(CountBullishFairValueGaps()) ||
|
||||
IsValidSize(CountBearishFairValueGaps())
|
||||
HasSwingLows() ||
|
||||
HasSwingHighs() ||
|
||||
HasSupplyZones() ||
|
||||
HasDemandZones() ||
|
||||
HasSupportZones() ||
|
||||
HasResistanceZones() ||
|
||||
HasBullishOrderBlocks() ||
|
||||
HasBearishOrderBlocks() ||
|
||||
HasBullishMomentumBars() ||
|
||||
HasBearishMomentumBars() ||
|
||||
HasBullishRejectionBars() ||
|
||||
HasBearishRejectionBars() ||
|
||||
HasBullishFairValueGaps() ||
|
||||
HasBearishFairValueGaps() ||
|
||||
HasBullishConsolidationZones() ||
|
||||
HasBearishConsolidationZones()
|
||||
//
|
||||
;
|
||||
|
||||
@@ -495,101 +507,6 @@ struct XPOIState
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fill Dest State by Current State's Data ...
|
||||
*
|
||||
* @param dest: XPOIState instance, reference to specified dest ...
|
||||
*
|
||||
*/
|
||||
void Fill(XPOIState &dest)
|
||||
{
|
||||
//
|
||||
if (!IsValid() ||
|
||||
!HasChild())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
dest.symbol = symbol;
|
||||
dest.period = period;
|
||||
dest.time = time;
|
||||
|
||||
//
|
||||
Copy(
|
||||
swingHighs,
|
||||
dest.swingHighs,
|
||||
false //
|
||||
);
|
||||
Copy(
|
||||
swingLows,
|
||||
dest.swingLows,
|
||||
false //
|
||||
);
|
||||
Copy(
|
||||
bullishMomentumBars,
|
||||
dest.bullishMomentumBars,
|
||||
false //
|
||||
);
|
||||
Copy(
|
||||
bearishMomentumBars,
|
||||
dest.bearishMomentumBars,
|
||||
false //
|
||||
);
|
||||
Copy(
|
||||
bullishRejectionBars,
|
||||
dest.bullishRejectionBars,
|
||||
false //
|
||||
);
|
||||
Copy(
|
||||
bearishRejectionBars,
|
||||
dest.bearishRejectionBars,
|
||||
false //
|
||||
);
|
||||
Copy(
|
||||
supportZones,
|
||||
dest.supportZones,
|
||||
false //
|
||||
);
|
||||
Copy(
|
||||
resistanceZones,
|
||||
dest.resistanceZones,
|
||||
false //
|
||||
);
|
||||
Copy(
|
||||
supplyZones,
|
||||
dest.supplyZones,
|
||||
false //
|
||||
);
|
||||
Copy(
|
||||
demandZones,
|
||||
dest.demandZones,
|
||||
false //
|
||||
);
|
||||
Copy(
|
||||
bullishOrderBlocks,
|
||||
dest.bullishOrderBlocks,
|
||||
false //
|
||||
);
|
||||
Copy(
|
||||
bearishOrderBlocks,
|
||||
dest.bearishOrderBlocks,
|
||||
false //
|
||||
);
|
||||
Copy(
|
||||
bullishFairValueGaps,
|
||||
dest.bullishFairValueGaps,
|
||||
false //
|
||||
);
|
||||
Copy(
|
||||
bearishFairValueGaps,
|
||||
dest.bearishFairValueGaps,
|
||||
false //
|
||||
);
|
||||
|
||||
//
|
||||
}
|
||||
|
||||
//
|
||||
// Counters ...
|
||||
|
||||
@@ -1068,6 +985,42 @@ struct XPOIState
|
||||
return IsValidSize(CountBearishFairValueGaps());
|
||||
}
|
||||
|
||||
//
|
||||
bool HasConsolidationZones()
|
||||
{
|
||||
return HasChild(consolidationZones);
|
||||
}
|
||||
|
||||
//
|
||||
int CountConsolidationZones()
|
||||
{
|
||||
return ArraySize(consolidationZones);
|
||||
}
|
||||
|
||||
//
|
||||
bool HasBullishConsolidationZones()
|
||||
{
|
||||
return HasChild(bullishConsolidationZones);
|
||||
}
|
||||
|
||||
//
|
||||
int CountBullishConsolidationZones()
|
||||
{
|
||||
return ArraySize(bullishConsolidationZones);
|
||||
}
|
||||
|
||||
//
|
||||
bool HasBearishConsolidationZones()
|
||||
{
|
||||
return HasChild(bearishConsolidationZones);
|
||||
}
|
||||
|
||||
//
|
||||
int CountBearishConsolidationZones()
|
||||
{
|
||||
return ArraySize(bearishConsolidationZones);
|
||||
}
|
||||
|
||||
//
|
||||
void UpdateTo(datetime value = NULL)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user