last ...
This commit is contained in:
@@ -324,6 +324,39 @@ struct XPVPivot
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate Liquidity Percent for Specified Direction ...
|
||||
*
|
||||
* @param forDirection: ENUM_X_DIRECTION member, Specified Liquidity ...
|
||||
* @param price: Double, Specified Price ...
|
||||
*
|
||||
* @return ( double )
|
||||
*/
|
||||
double CalculateLiquidityPercent(
|
||||
ENUM_X_DIRECTION forDirection,
|
||||
double price = 0 //
|
||||
)
|
||||
{
|
||||
//
|
||||
double result = 0;
|
||||
|
||||
//
|
||||
if (!IsValid())
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = state
|
||||
.CalculateLiquidityPercent(
|
||||
forDirection,
|
||||
price //
|
||||
);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
/**
|
||||
|
||||
@@ -206,22 +206,29 @@ class XCX121SMCTestStrategy : public XCX121SMCBaseStrategy
|
||||
double pivotMid = lastPivot.CalculateMid();
|
||||
|
||||
//
|
||||
// Looks For Long ...
|
||||
// - [] Bullish Direction;
|
||||
// - [] Discount Area;
|
||||
bool lookupLong =
|
||||
isBullish &&
|
||||
bid < pivotMid &&
|
||||
bid > lastPivot.lower;
|
||||
// Calculate Liquidity Percent ...
|
||||
double bullishLiquidityPercent = lastPivot
|
||||
.CalculateLiquidityPercent(X_DIRECTION_BULLISH);
|
||||
double bearishLiquidityPercent = lastPivot
|
||||
.CalculateLiquidityPercent(X_DIRECTION_BEARISH);
|
||||
|
||||
//
|
||||
// Looks For Short ...
|
||||
// - [] Bearish Direction ...
|
||||
// - [] Premium Area ...
|
||||
bool lookupShort =
|
||||
isBearish &&
|
||||
bool isInDiscount =
|
||||
bid < pivotMid &&
|
||||
bid > lastPivot.lower;
|
||||
if (isInDiscount)
|
||||
{
|
||||
Print("In Disount Zone ...");
|
||||
}
|
||||
|
||||
//
|
||||
bool IsInPremium =
|
||||
bid > pivotMid &&
|
||||
bid < lastPivot.upper;
|
||||
if (IsInPremium)
|
||||
{
|
||||
Print("In Premium Zone ...");
|
||||
}
|
||||
|
||||
//
|
||||
// Check Order Flow Validation ...
|
||||
@@ -272,14 +279,6 @@ class XCX121SMCTestStrategy : public XCX121SMCBaseStrategy
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = lookupLong ||
|
||||
lookupShort;
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = hasLong ||
|
||||
hasShort;
|
||||
|
||||
Reference in New Issue
Block a user