last works on Strategy 1 of XFIMA Signaller ...

This commit is contained in:
2025-11-01 20:42:24 +03:30
parent 49f09c2307
commit 121b3ffb5e
3 changed files with 209 additions and 1 deletions
@@ -5659,6 +5659,14 @@ bool HasInside(
return result;
}
/**
* Check Specified ZOne is Affected by Specified Bar or not ...
*
* @param bar: XOHCL, reference to Specified Bar ...
* @param zone: XBoxZone, reference to Specified Zone ...
*
* @return ( bool )
*/
bool IsZoneAffected(
XOHCL &bar,
XBoxZone &zone //
@@ -6167,6 +6175,14 @@ int GetTesterBars(
return result;
}
/**
* Check Specified Zone is Breaked or not ...
*
* @param zone: XBoxZone, reference to Specified Zone ...
* @param priceType: ENUM_X_PRICE, Specified Price Type for Zone Break Detection ...
*
* @return ( bool )
*/
bool IsBreaked(
XBoxZone &zone,
ENUM_X_PRICE priceType = X_PRICE_CLOSE //
@@ -6225,6 +6241,72 @@ bool IsBreaked(
return result;
}
/**
* Validate Zones Range ...
*
* @param source: XBoxZone, collection reference to Validate ...
* @param minAllowedRange: double, min allowed range to Validate ...
*
* @return ( int )
*/
int ValidateZonesRange(
XBoxZone &source[],
double minAllowedRange //
)
{
//
int result = 0;
//
// Validate ...
bool has = HasChild(source) &&
minAllowedRange > 0;
if (!has)
{
return result;
}
//
XBoxZone iTMP;
XBoxZone tmps[];
Copy(source, tmps);
XClean(source);
while (HasChild(tmps))
{
//
iTMP.Clean();
iTMP = tmps[0];
ArrayRemove(tmps, 0, 1);
//
// Check Range Validation ...
has = iTMP.GetRange() > minAllowedRange;
if (has)
{
AddIfNotExists(iTMP, source);
}
}
//
result = ArraySize(source);
//
// Cleanup ...
XClean(tmps);
iTMP.Clean();
//
return result;
}
/**
* Remove Breaked Zones ...
*
* @param source: XBoxZone, collection reference to Remove Breaked Zones ...
* @param priceType: ENUM_X_PRICE, Specified Price type of Break Detection ...
*
* @return ( int )
*/
int RemoveBreakedZones(
XBoxZone &source[],
ENUM_X_PRICE priceType = X_PRICE_CLOSE //