last ...
This commit is contained in:
@@ -13258,6 +13258,20 @@ int GetCycleLengthOn(
|
|||||||
//
|
//
|
||||||
// Direction ...
|
// Direction ...
|
||||||
|
|
||||||
|
//
|
||||||
|
bool HasDirection(ENUM_X_DIRECTION value)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
bool result = false;
|
||||||
|
|
||||||
|
//
|
||||||
|
result = value != X_DIRECTION_NONE &&
|
||||||
|
value != X_DIRECTION_ALL;
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
bool IsBullish(ENUM_X_DIRECTION value)
|
bool IsBullish(ENUM_X_DIRECTION value)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -361,7 +361,11 @@ class XCX121SMCTestStrategy : public XCX121SMCBaseStrategy
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Detect Fair Value Gaps ...
|
// Detect Fair Value Gaps ...
|
||||||
|
bool hasPOI = FindPOIInPivot(
|
||||||
|
X_POI_SWING_HIGH,
|
||||||
|
lastPivot,
|
||||||
|
mVisionPOIStat);
|
||||||
|
// TODO:
|
||||||
|
|
||||||
//
|
//
|
||||||
bool isOrderFlowBullish = IsBullish(mOrderFlowDir);
|
bool isOrderFlowBullish = IsBullish(mOrderFlowDir);
|
||||||
@@ -1623,6 +1627,225 @@ class XCX121SMCTestStrategy : public XCX121SMCBaseStrategy
|
|||||||
ClearDraws();
|
ClearDraws();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool FindPOIInPivot(
|
||||||
|
XCBasePOI *&pois[],
|
||||||
|
ENUM_XPOIS type,
|
||||||
|
XPVPivot &pivot,
|
||||||
|
XPOIState &state,
|
||||||
|
ENUM_X_DIRECTION dir = X_DIRECTION_NONE //
|
||||||
|
)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
bool result = false;
|
||||||
|
|
||||||
|
//
|
||||||
|
Clean(pois);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Validate Inputs ...
|
||||||
|
result =
|
||||||
|
//
|
||||||
|
type != X_POI_NONE &&
|
||||||
|
pivot.IsValid() &&
|
||||||
|
state.IsValid() &&
|
||||||
|
state.HasChild()
|
||||||
|
//
|
||||||
|
;
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
int swingHighsCunt = CountSwingHighs();
|
||||||
|
int swingLowsCunt = CountSwingLows();
|
||||||
|
int bullishMomentumBarsCunt = CountBullishMomentumBars();
|
||||||
|
int bearishMomentumBarsCunt = CountBearishMomentumBars();
|
||||||
|
int bullishRejectionBarsCunt = CountBullishRejectionBars();
|
||||||
|
int bearishRejectionBarsCunt = CountBearishRejectionBars();
|
||||||
|
int supportZonesCunt = CountSupportZones();
|
||||||
|
int resistanceZonesCunt = CountResistanceZones();
|
||||||
|
int supplyZonesCunt = CountSupplyZones();
|
||||||
|
int demandZonesCunt = CountDemandZones();
|
||||||
|
int bullishOrderBlocksCunt = CountBullishOrderBlocks();
|
||||||
|
int bearishOrderBlocksCunt = CountBearishOrderBlocks();
|
||||||
|
int bullishFairValueGapsCunt = CountBullishFairValueGaps();
|
||||||
|
int bearishFairValueGapsCunt = CountBearishFairValueGaps();
|
||||||
|
|
||||||
|
//
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
case X_POI_MOMENTUM_BAR: {
|
||||||
|
//
|
||||||
|
// Validate Direction ...
|
||||||
|
result = HasDirection(dir);
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Validate State POI(s) ...
|
||||||
|
result = IsValidSize();
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
case X_POI_REJECTION_BAR:
|
||||||
|
//
|
||||||
|
// Validate Direction ...
|
||||||
|
result = HasDirection(dir);
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Validate State POI(s) ...
|
||||||
|
result = IsValidSize();
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
break;
|
||||||
|
|
||||||
|
//
|
||||||
|
case X_POI_SWING_HIGH:
|
||||||
|
//
|
||||||
|
result = IsValidSize();
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
break;
|
||||||
|
|
||||||
|
//
|
||||||
|
case X_POI_SWING_LOW:
|
||||||
|
//
|
||||||
|
result = IsValidSize();
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
break;
|
||||||
|
|
||||||
|
//
|
||||||
|
case X_POI_SUPPORT_ZONE:
|
||||||
|
//
|
||||||
|
result = IsValidSize();
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
break;
|
||||||
|
|
||||||
|
//
|
||||||
|
case X_POI_RESISTANCE_ZONE:
|
||||||
|
//
|
||||||
|
result = IsValidSize();
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
break;
|
||||||
|
|
||||||
|
//
|
||||||
|
case X_POI_SUPPLY_ZONE:
|
||||||
|
//
|
||||||
|
result = IsValidSize();
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
break;
|
||||||
|
|
||||||
|
//
|
||||||
|
case X_POI_DEMAND_ZONE:
|
||||||
|
//
|
||||||
|
result = IsValidSize();
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
break;
|
||||||
|
|
||||||
|
//
|
||||||
|
case X_POI_BULLISH_ORDERBLOCK:
|
||||||
|
//
|
||||||
|
result = IsValidSize();
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
break;
|
||||||
|
|
||||||
|
//
|
||||||
|
case X_POI_BEARISH_ORDERBLOCK:
|
||||||
|
//
|
||||||
|
result = IsValidSize();
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
break;
|
||||||
|
|
||||||
|
//
|
||||||
|
case X_POI_BULLISH_FVG:
|
||||||
|
//
|
||||||
|
result = IsValidSize();
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
break;
|
||||||
|
|
||||||
|
//
|
||||||
|
case X_POI_BEARISH_FVG:
|
||||||
|
//
|
||||||
|
result = IsValidSize();
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Drawings ...
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Draw Order Flow ...
|
* Draw Order Flow ...
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user