This commit is contained in:
2025-10-11 16:58:19 +03:30
parent cc0c0872bc
commit 85db6eeca1
3 changed files with 511 additions and 58 deletions
@@ -372,56 +372,37 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
structureConfig,
barIndex //
);
poiDrawer.drawnObjects.Clear();
poiDrawer.DrawMarketStructure(
structure,
structureDrawConfig //
);
// //
// // Testing Porposes ...
// has = fimaHelper.IsBoundaryFakeBreaked(
// iDir,
// barIndex,
// X_PRICE_CLOSE,
// X_PRICE_CLOSE //
// poiDrawer.drawnObjects.Clear();
// poiDrawer.DrawMarketStructure(
// structure,
// structureDrawConfig //
// );
// if (has)
// {
// Print("Faked Break ...");
// }
//
// Disable Signallers ...
// has = false;
// iDir = X_DIRECTION_NONE;
//
// Strategy 1 ...
// Works on Support or Resistances Areas ...
has = Strategy1HasSignal(
iBar,
iZone,
iTargets,
iDir,
iFIMAConditions,
structure //
);
// has = Strategy1HasSignal(
// iBar,
// iZone,
// iTargets,
// iDir,
// iFIMAConditions,
// structure //
// );
//
// Strategy 2 ...
// Works on MA Crosses ...
has = false;
if (!has)
{
//
// has = Strategy2HasSignal(
// iBar,
// iZone,
// iTargets,
// iDir,
// iFIMAConditions,
// structure //
// );
has = Strategy2HasSignal(
iBar,
iZone,
iTargets,
iDir,
iFIMAConditions,
structure //
);
}
//
@@ -763,7 +744,7 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
//
Print("Affected Zone ...");
}
//
// Draw Bar Pattern ...
// poiDrawer.DrawPatternAnalysis(barAnalysis, structureDrawConfig.barAnalysisDrawConfig);
@@ -905,37 +886,83 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
}
//
// Detect Specified MA Cross ...
// result = HasDirection(structure.maCrossDir);
result = false;
bool isBullish = false;
bool isBearish = false;
//
// Do Signal Detection ...
//
// result = fimaHelper.HasHKBasedTrend(dir, bar.Index(), 1);
// bool isBullish = result &&
// IsXBullish(dir);
// bool isBearish = result &&
// IsXBearish(dir);
//
// Get Bar Pattern ...
// XPatternAnalysis barAnalysis;
// result =
// poiDetector.AnalyseBarPatterns(
// bar,
// barAnalysis,
// structureConfig.barsAnalysisConfig //
// );
// bool isBullish = barAnalysis.Count(X_DIRECTION_BULLISH) >= 4;
// bool isBearish = barAnalysis.Count(X_DIRECTION_BEARISH) >= 4;
//
// Prepare zone ...
if (result)
{
//
zone.to = bar.time;
zone.from = GetBarTime(
bar.symbol,
bar.period,
bar.Index() + 2 //
);
zone.symbol = bar.symbol;
zone.period = bar.period;
// zone.dir = structure.maCrossDir;
zone.lower = bar.FindLowest(2, MODE_LOW);
zone.upper = bar.FindHighest(2, MODE_HIGH);
// zone.type = name + "_" + ToXString(structure.maCrossDir);
// Draw Bar Patterns Analysis ...
// poiDrawer.DrawPatternAnalysis(
// barAnalysis,
// structureDrawConfig.barAnalysisDrawConfig //
// );
//
if (isBullish)
{
Print("Bullish HK Bond Trend ...");
}
//
if (isBearish)
{
Print("Bearish HK Bond Trend ...");
}
//
Print(ToXString(dir), " Detected ...");
}
//
// Cleanup ...
result = false;
dir = X_DIRECTION_NONE;
//
// Draw Custom Requirements ...
//
// Prepare Decision Zone ...
if (result)
{
//
// Create Decision Zone and Validate it ...
//
result = zone.IsValid();
}
//
// Check Result ...
// Provide Direction and Targets if Required ...
if (result)
{
//
// dir = structure.maCrossDir;
// Handle Signal Direction ...
//
// Handle Targets Detection ...