This commit is contained in:
2025-05-11 23:40:52 +03:30
parent c378ce4b4e
commit 1623925eb0
6 changed files with 961 additions and 318 deletions
+36 -103
View File
@@ -475,25 +475,29 @@ class XCXCAEASignaller : XCBase
//
// Checking Signal's Decision Zone ...
// On Analyse Time Frame ...
hasDecisionZone = DetectDecisionZone(
analyseHelper,
drawer,
decisionZone,
decisionZoneDir,
conditions,
zIndex,
loopback //
);
//
// Make Signal Box UnAvailable ...
if (hasDecisionZone)
if (!HasChild(mConditionsCollection))
{
//
AddRef(
hasDecisionZone = DetectDecisionZone(
analyseHelper,
drawer,
decisionZone,
unAvailableBoxes //
decisionZoneDir,
conditions,
zIndex,
loopback //
);
//
// Make Signal Box UnAvailable ...
if (hasDecisionZone)
{
//
AddRef(
decisionZone,
unAvailableBoxes //
);
}
}
//
@@ -554,7 +558,7 @@ class XCXCAEASignaller : XCBase
bool DetectSignalTrigger(
XCAEAStrategyConditions &conditions,
int barIndex = 0,
int maxAllowedSetupAge = 200 //
int maxAllowedSetupAge = 1000 //
)
{
//
@@ -618,76 +622,12 @@ class XCXCAEASignaller : XCBase
double sl = 0;
double tp = 0;
ENUM_X_DIRECTION triggerDir = X_DIRECTION_NONE;
//
// Detect All Inside Directional FVGs ...
XBoxZone fvgs[];
int toIDX = conditions.decisionZone.ToIndex();
int fromIDX = conditions.decisionZone.FromIndex();
for (int i = fromIDX; i > toIDX; i--)
{
//
XOHCL iBar;
XBoxZone iFVG;
//
// Initialize iBar ...
has = iBar.Init(
conditions.symbol,
conditions.period,
i //
);
if (!has)
{
//
iFVG.Clean();
iBar.Clean();
//
continue;
}
//
// Check iBar has FVG ...
has = helper
.barAnalyser
.IsFVG(
iBar,
iFVG,
true //
);
if (!has)
{
//
iBar.Clean();
iFVG.Clean();
//
continue;
}
//
// Check FVG Direction and Placement ...
has =
iFVG.dir == conditions.decisionZone.dir &&
iFVG.upper < conditions.decisionZone.upper &&
iFVG.lower > conditions.decisionZone.lower;
if (has)
{
//
iFVG.to = cTime;
AddRef(
iFVG,
fvgs //
);
}
//
iBar.Clean();
iFVG.Clean();
}
bool hasFVGs = HasChild(fvgs);
int fvgsCount = ArraySize(fvgs);
//
CArrayObj *iObjects;
iObjects = new CArrayObj();
//
// Checking Trigger Cond 0 ...
@@ -733,6 +673,7 @@ class XCXCAEASignaller : XCBase
triggerDir,
sl,
tp,
iObjects,
barIndex //
);
@@ -754,28 +695,12 @@ class XCXCAEASignaller : XCBase
ZeroMemory(iObj);
//
// Draw FVGs ...
if (hasFVGs)
for (int i = 0; i < iObjects.Total(); i++)
{
//
for (int i = 0; i < fvgsCount; i++)
{
//
fvgs[i].to = cTime;
//
XCBoxObject *iObj;
has = helper.poiDrawer.DrawBox(
fvgs[i],
iObj //
);
if (has)
{
mObjects.Add(iObj);
}
ZeroMemory(iObj);
}
mObjects.Add(iObjects.At(i));
}
// iObjects.Clear();
// ZeroMemory(iObjects);
//
// Summarizing Result ...
@@ -879,6 +804,14 @@ class XCXCAEASignaller : XCBase
conditions.Clean();
}
//
// Checking Decision Zone Validation ...
bool isValid = conditions.decisionZone.IsValid();
if (!isValid)
{
conditions.Clean();
}
//
// Check Box Price ...
has = IsBoxBreaked(