This commit is contained in:
2025-09-26 02:17:10 +03:30
parent 4277b25b87
commit 01197f9152
5 changed files with 1216 additions and 510 deletions
+33 -158
View File
@@ -495,172 +495,47 @@ void OnTick()
}
//
// if (HasDirection(marketStructure.signalKeyBarPatternDir))
// {
// Print("Detected ...");
// }
// if (marketStructure.ob.IsValid() && marketStructure.fvg.IsValid())
// {
// Print("Detected ...");
// }
if (marketStructure.support.IsValid() || marketStructure.resistance.IsValid())
XOHCL pBar;
bool has = cBar.GetPreviousBar(pBar);
if (marketStructure.isPTest)
{
//
XOHCL pBar;
XOHCL p2Bar;
bool has = cBar.GetPreviousBar(pBar);
has = has &&
pBar.GetPreviousBar(p2Bar);
if (!has)
{
//
pBar.Clean();
p2Bar.Clean();
return;
}
// //
// bool isSupportTouched = marketStructure.isSupportTouched;
// bool isResistanceTouched = marketStructure.isResistanceTouched;
// has =
// isSupportTouched ||
// isResistanceTouched;
// if (!has)
// {
// //
// pBar.Clean();
// return;
// }
// //
// // Here we Have to Detect Previous Support or Resistance ...
// XOHCL prevZoneBar;
// XBoxZone prevZoneBox;
// //
// // Previous Support ...
// bool hasPrevSupport = isSupportTouched &&
// fima2Signaller
// .poiDetector
// .HasSupport(
// pBar,
// prevZoneBar,
// detectorConfig.supportAndResistanceValidationLength,
// detectorConfig.supportAndResistanceMaxAllowedLoopback //
// );
// if (hasPrevSupport)
// {
// hasPrevSupport = ToSupportBox(prevZoneBar, prevZoneBox, pBar.time);
// }
// //
// // Previous Resistance ...
// bool hasPrevResistance = isResistanceTouched &&
// fima2Signaller
// .poiDetector
// .HasSupport(
// pBar,
// prevZoneBar,
// detectorConfig.supportAndResistanceValidationLength,
// detectorConfig.supportAndResistanceMaxAllowedLoopback //
// );
// if (hasPrevResistance)
// {
// hasPrevResistance = ToResistanceBox(prevZoneBar, prevZoneBox, pBar.time);
// }
// //
// has = hasPrevSupport ||
// hasPrevResistance;
// if (!has)
// {
// //
// pBar.Clean();
// prevZoneBox.Clean();
// prevZoneBar.Clean();
// return;
// }
// //
// // Select Youngest ...
// int idx = -1;
// //
// if (hasPrevSupport)
// {
// //
// idx = GetYoungestBefore(
// marketStructure.support.from,
// fima2Signaller.poiDetector.supports //
// );
// has = IsValidIndex(idx);
// if (has)
// {
// //
// prevZoneBox.to = pBar.time;
// prevZoneBox = fima2Signaller.poiDetector.supports[idx];
// }
// }
// //
// if (hasPrevResistance)
// {
// //
// idx = GetYoungestBefore(
// marketStructure.resistance.from,
// fima2Signaller.poiDetector.resistances //
// );
// has = IsValidIndex(idx);
// if (has)
// {
// //
// prevZoneBox.to = pBar.time;
// prevZoneBox = fima2Signaller.poiDetector.resistances[idx];
// }
// }
//
// Draw Prev Zone ...
// XCBoxObject *iPrevZoneObj;
// prevZoneBox.to = pBar.time;
// has = fima2Signaller.poiDrawer.DrawBox(
// prevZoneBox,
// iPrevZoneObj //
// );
// if (has)
// {
// //
// XPOIStyle style;
// fima2Signaller.poiDrawer.GetBoxStyle(
// style,
// prevZoneBox.dir //
// );
// style.clr = clrYellow;
// fima2Signaller.poiDrawer.ApplyBoxStyle(
// iPrevZoneObj,
// style //
// );
// //
// style.Clean();
// eaDraws.Add(iPrevZoneObj);
// }
//
// Check Prev Zone is Breaked or not ...
//
// Check For PrevZoneExistanse ...
has = marketStructure.pTestedZone.IsValid();
if (has)
{
Print("Detected ...");
//
// Draw Prev Zone ...
XCBoxObject *iPrevZoneObj;
marketStructure.pTestedZone.to = pBar.time;
has = fima2Signaller.poiDrawer.DrawBox(
marketStructure.pTestedZone,
iPrevZoneObj //
);
if (has)
{
//
XPOIStyle style;
fima2Signaller.poiDrawer.GetBoxStyle(
style,
marketStructure.pTestedZone.dir //
);
style.clr = clrYellow;
fima2Signaller.poiDrawer.ApplyBoxStyle(
iPrevZoneObj,
style //
);
//
style.Clean();
eaDraws.Add(iPrevZoneObj);
}
}
//
// Cleanup Resources ...
pBar.Clean();
p2Bar.Clean();
// prevZoneBox.Clean();
// prevZoneBar.Clean();
Print("Previous Tested ...");
}
pBar.Clean();
//
cBar.Clean();