last works on FIMA Back Tester ...

This commit is contained in:
2025-09-19 15:10:55 +03:30
parent 38d741da18
commit 5872d9f29b
4 changed files with 395 additions and 48 deletions
@@ -188,6 +188,15 @@ class XCXFIMABaseSignaller : public XCBaseSignaller
return result;
}
/**
* Normalizing Signal by Signaller Custom Props ...
*
* @param signal: XSignal ...
*/
void virtual NormalizeSignal(XSignal &signal)
{
}
//
// Protected ...
protected:
@@ -208,6 +217,7 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
public:
//
// Props ...
int fvgLookupLenght; // Maximum Lenght for Looking up FVG before Crosses
//
// Constructor ...
@@ -229,6 +239,8 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
_defaultSignalVolume //
)
{
//
fvgLookupLenght = 5;
}
//
@@ -323,20 +335,95 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
//
// Do Conditions Validating ...
//
// Validate MA Positions ...
double iFastMa = fimaConditions.maFastBuffer[cIdx];
double iSlowMa = fimaConditions.maSlowBuffer[cIdx];
double iFiboUpper = fimaConditions.fiboUpperBuffer[cIdx];
double iFiboLower = fimaConditions.fiboLowerBuffer[cIdx];
//
// Checking Has FVG ...
XBoxZone fvg;
ENUM_X_DIRECTION fvgDir;
bool hasFVG = patternDetector.HasFVG(
bar,
fvgDir,
fvg,
fvgLookupLenght //
);
//
// Checking Crossed On Shadow ...
//
bool isCrossedOverHappensOnShadow =
isFastCrossedOverSlow &&
iFastMa <= bar.GetDown() &&
iFastMa >= bar.low;
//
bool isCrossedUnderHappensOnShadow =
isFastCrossedUnderSlow &&
iFastMa <= bar.high &&
iFastMa >= bar.GetUp();
//
// Bullish Validation ...
bool isBullish =
//
// Has Cross ...
isFastCrossedOverSlow
//
&&
//
// Cross Places Based on Fibo ...
MathMax(iFastMa, iSlowMa) < iFiboLower
//
&&
//
(
//
// Checking FVG ...
(hasFVG &&
fvg.IsBullish())
//
||
//
// Checking Crossed Place ...
isCrossedOverHappensOnShadow
//
)
//
;
//
// Bearish Validation ...
bool isBearish =
//
// Has Cross ...
isFastCrossedUnderSlow
//
&&
//
// Cross Places Based on Fibo ...
MathMin(iFastMa, iSlowMa) > iFiboUpper
//
&&
//
(
//
// Checking FVG ...
(hasFVG &&
fvg.IsBearish())
//
||
//
// Checking Crossed Place ...
isCrossedUnderHappensOnShadow
//
)
//
;
//
@@ -360,9 +447,11 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
{
//
// Prepare Founded Signal ...
XTarget targets[];
has = PrepareSignal(
signal,
signalDir //
signalDir,
targets //
);
if (has)
{
@@ -405,6 +494,27 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
return result;
}
//
// Private ...
private:
//
// Props ...
//
// Lookup FVG ...
bool LookupFVG(
XOHCL &bar,
ENUM_X_DIRECTION &dir,
XBoxZone &fvgBox //
)
{
//
bool result = false;
//
return result;
}
//
};