This commit is contained in:
2025-05-13 20:19:58 +03:30
parent 8a329570a5
commit 4b91fff5d9
9 changed files with 875 additions and 820 deletions
+46 -65
View File
@@ -261,6 +261,12 @@ class XCXCAEASignaller : XCBase
loopback //
);
//
// Here we Can Validate Decision Zone ...
if (hasDecisionZone)
{
}
//
// Make Signal Box UnAvailable ...
if (hasDecisionZone)
@@ -409,6 +415,13 @@ class XCXCAEASignaller : XCBase
int toIDX = conditions.decisionZone.ToIndex();
int fromIDX = conditions.decisionZone.FromIndex();
//
// Check Box Size ...
double maxAllowedBoxRange = 400;
double range = conditions.decisionZone.GetRange();
bool isTooLarge = range > (maxAllowedBoxRange * points);
double decisionMiddlePrice = conditions.decisionZone.GetMid();
//
XBoxZone decisionOBs[];
ENUM_XCA_PIVOTS allowedTypes[];
@@ -455,27 +468,37 @@ class XCXCAEASignaller : XCBase
//
// Checking Trigger Cond 1 ...
bool canTriggerCond1 = false;
// CanTriggerCond1(
// helper,
// conditions.decisionZone,
// triggerDir,
// sl,
// tp,
// barIndex //
// );
if (isTooLarge)
{
//
canTriggerCond1 = CanTriggerCond1(
helper,
conditions.decisionZone,
triggerDir,
sl,
tp,
iObjects,
barIndex //
);
}
//
// Checking Trigger Cond 2 ...
bool canTriggerCond2 = CanTriggerCond2(
helper,
conditions.decisionZone,
decisionOBs,
triggerDir,
sl,
tp,
iObjects,
barIndex //
);
bool canTriggerCond2 = false;
if (!isTooLarge)
{
//
canTriggerCond2 = CanTriggerCond2(
helper,
conditions.decisionZone,
decisionOBs,
triggerDir,
sl,
tp,
iObjects,
barIndex //
);
}
//
// Checking Trigger Cond 3 ...
@@ -490,63 +513,21 @@ class XCXCAEASignaller : XCBase
// barIndex //
// );
//
// Update Signal Box To ...
conditions.decisionZone.to = cTime;
//
// Draw Decision Zone ...
XCBoxObject *iDecisionObj;
has = helper.poiDrawer.DrawBox(
drawer.DrawBox(
conditions.decisionZone,
iDecisionObj //
cTime,
true, // Draw Middle Line ...
true // Ignore Type ...
);
if (has)
{
mObjects.Add(iDecisionObj);
}
ZeroMemory(iDecisionObj);
//
// Drw Box Range Middle ...
double decisionMiddlePrice = conditions.decisionZone.GetMid();
string iDecisionMiddleName = conditions.decisionZone.GetMiddleTag();
CChartObjectTrend *iDecisionMiddleObj;
iDecisionMiddleObj = new CChartObjectTrend();
has = iDecisionMiddleObj.Create(
0,
iDecisionMiddleName,
0,
conditions.decisionZone.from,
decisionMiddlePrice,
conditions.decisionZone.to,
decisionMiddlePrice //
);
if (has)
{
//
iDecisionMiddleObj.Width(2);
iDecisionMiddleObj.Style(STYLE_DASH);
//
color iColor =
conditions.decisionZone.IsBullish()
? clrAqua
: clrMagenta;
iDecisionMiddleObj.Color(iColor);
//
mObjects.Add(iDecisionMiddleObj);
}
ZeroMemory(iDecisionMiddleObj);
//
// Adding Drawn Objects to Drawn Stores ...
for (int i = 0; i < iObjects.Total(); i++)
{
mObjects.Add(iObjects.At(i));
}
// iObjects.Clear();
// ZeroMemory(iObjects);
//
// Summarizing Result ...