This commit is contained in:
2025-01-02 13:24:37 +03:30
parent 1c169cebe2
commit 410c6793ae
8 changed files with 795 additions and 266 deletions
+135 -1
View File
@@ -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;
}
//
};
//