last ...
This commit is contained in:
@@ -6821,6 +6821,19 @@ int AddRef(
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Check Specified Array Has Childs or not ...
|
||||
template <typename T>
|
||||
bool HasChild(T &buffer[])
|
||||
{
|
||||
return IsValidSize(ArraySize(buffer));
|
||||
}
|
||||
template <typename T>
|
||||
bool SpecificHasChild(T &buffer[])
|
||||
{
|
||||
return HasChild(buffer);
|
||||
}
|
||||
|
||||
//
|
||||
// Remove Specified Item from an Array ...
|
||||
template <typename T>
|
||||
|
||||
@@ -5400,7 +5400,7 @@ struct XPriceZones
|
||||
};
|
||||
|
||||
//
|
||||
// TODO: Complete this ...
|
||||
// Market Strucutre Model ...
|
||||
struct XMarketStructure
|
||||
{
|
||||
//
|
||||
@@ -5412,7 +5412,11 @@ struct XMarketStructure
|
||||
|
||||
//
|
||||
XPVPivotPoint vales[];
|
||||
XPriceZones valePriceZones[];
|
||||
|
||||
//
|
||||
XPVPivotPoint peaks[];
|
||||
XPriceZones peakPriceZones[];
|
||||
|
||||
//
|
||||
XOHCL lowestValeBar;
|
||||
@@ -5423,6 +5427,136 @@ struct XMarketStructure
|
||||
XOHCL highestPeakBar;
|
||||
XOHCL peakBelowHighestPeakValeBar;
|
||||
XOHCL highestPeakValeBreakeDownBar;
|
||||
|
||||
//
|
||||
XMarketStructure()
|
||||
{
|
||||
Clean();
|
||||
}
|
||||
|
||||
/**
|
||||
* Cleanup ...
|
||||
*/
|
||||
void Clean()
|
||||
{
|
||||
//
|
||||
symbol = NULL;
|
||||
period = NULL;
|
||||
bias = X_DIRECTION_NONE;
|
||||
|
||||
//
|
||||
Clean(vales);
|
||||
Clean(peaks);
|
||||
Clean(valePriceZones);
|
||||
Clean(peakPriceZones);
|
||||
|
||||
//
|
||||
lowestValeBar.Clean();
|
||||
lowestValePeakBreakeUpBar.Clean();
|
||||
valeAboveLowestValePeakBar.Clean();
|
||||
|
||||
//
|
||||
highestPeakBar.Clean();
|
||||
peakBelowHighestPeakValeBar.Clean();
|
||||
highestPeakValeBreakeDownBar.Clean();
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate Model ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool IsValid()
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result =
|
||||
IsValid(symbol) &&
|
||||
IsValid(period) &&
|
||||
bias != X_DIRECTION_NONE;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check Bullish Trend ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool IsBullish()
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result =
|
||||
//
|
||||
IsValid() &&
|
||||
IsBullish(bias) &&
|
||||
HasChild(peaks) &&
|
||||
HasDirection(bias) &&
|
||||
lowestValeBar.IsValid() &&
|
||||
HasChild(peakPriceZones) &&
|
||||
lowestValePeakBreakeUpBar.IsValid() &&
|
||||
valeAboveLowestValePeakBar.IsValid()
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check Bearish Trend ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool IsBearish()
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result =
|
||||
//
|
||||
IsValid() &&
|
||||
IsBearish(bias) &&
|
||||
HasChild(vales) &&
|
||||
HasDirection(bias) &&
|
||||
highestPeakBar.IsValid() &&
|
||||
HasChild(valePriceZones) &&
|
||||
peakBelowHighestPeakValeBar.IsValid() &&
|
||||
highestPeakValeBreakeDownBar.IsValid()
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check Has Trend ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool HasTrend()
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result = IsValid() &&
|
||||
(IsBullish() ||
|
||||
IsBearish());
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
};
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user