This commit is contained in:
2025-10-14 12:16:40 +03:30
parent 15ea43b9f3
commit cfe8734715
3 changed files with 357 additions and 9 deletions
@@ -372,11 +372,11 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
structureConfig,
barIndex //
);
// poiDrawer.drawnObjects.Clear();
// poiDrawer.DrawMarketStructure(
// structure,
// structureDrawConfig //
// );
poiDrawer.drawnObjects.Clear();
poiDrawer.DrawMarketStructure(
structure,
structureDrawConfig //
);
//
// Strategy 1 ...
@@ -395,7 +395,22 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
if (!has)
{
//
has = Strategy2HasSignal(
// has = Strategy2HasSignal(
// iBar,
// iZone,
// iTargets,
// iDir,
// iFIMAConditions,
// structure //
// );
}
//
// Strategy 3 ...
if (!has)
{
//
has = Strategy3HasSignal(
iBar,
iZone,
iTargets,
@@ -406,7 +421,17 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
}
//
has = HasDirection(iDir);
has = HasDirection(iDir) &&
iZone.IsValid();
if (has)
{
//
has = false;
iZone.Clean();
iDir = X_DIRECTION_NONE;
}
//
if (has)
{
//
@@ -848,7 +873,7 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
}
/**
* Check Bar Has Signal Based on Strategy 1 ...
* Check Bar Has Signal Based on Strategy 2 ...
*
* @param bar: XOHCL, reference to Bar ...
* @param zone: XBoxZone, reference to holds affected zone ...
@@ -1165,6 +1190,102 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
return result;
}
/**
* Check Bar Has Signal Based on Strategy 3 ...
*
* @param bar: XOHCL, reference to Bar ...
* @param zone: XBoxZone, reference to holds affected zone ...
* @param targets: XTarget, reference to detected Signal's Targets collections ...
* @param dir: ENUM_X_DIRECTION, detected Signal's direction ...
* @param conditions: XFIMAConditions, reference to Bar Specified XFIMA Conditions ...
* @param structure: XFIMAMarketStructure, refrence to Provides Market Structure ...
*
* @return ( bool )
*/
bool Strategy3HasSignal(
XOHCL &bar,
XBoxZone &zone,
XTarget &targets[],
ENUM_X_DIRECTION &dir,
XFIMAConditions &conditions,
XFIMAMarketStructure &_structure //
)
{
//
bool result = false;
//
// Prepare ...
zone.Clean();
XClean(targets);
dir = X_DIRECTION_NONE;
//
// Validate ...
result = bar.IsValid();
if (!result)
{
return result;
}
//
// Define Requirements ...
bool isBullish = false;
bool isBearish = false;
int barIndex = bar.Index();
//
// Do Conditions Checking ...
//
result = fimaHelper.HasMACross(
dir,
barIndex,
structureConfig.maCrossValidationDiffMultiplier //
);
isBullish =
result &&
IsXBullish(dir);
isBearish =
result &&
IsXBearish(dir);
//
result = isBullish ||
isBearish;
//
// Prepare Zone ...
if (result)
{
//
// Zone Detection ...
//
result = zone.IsValid();
}
//
// Prepare Targets ...
if (result)
{
//
// Target Handling ...
}
//
if (!result)
{
//
zone.Clean();
XClean(targets);
dir = X_DIRECTION_NONE;
}
//
return result;
}
//
};