This commit is contained in:
2025-05-13 21:19:37 +03:30
parent 4b91fff5d9
commit 75a0a1f088
3 changed files with 1662 additions and 872 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+56 -63
View File
@@ -411,6 +411,7 @@ class XCXCAEASignaller : XCBase
// Checking Trigger Conditions ...
double sl = 0;
double tp = 0;
XTarget targets[];
ENUM_X_DIRECTION triggerDir = X_DIRECTION_NONE;
int toIDX = conditions.decisionZone.ToIndex();
int fromIDX = conditions.decisionZone.FromIndex();
@@ -423,7 +424,17 @@ class XCXCAEASignaller : XCBase
double decisionMiddlePrice = conditions.decisionZone.GetMid();
//
XBoxZone decisionOBs[];
// Draw Decision Zone ...
drawer.DrawBox(
conditions.decisionZone,
cTime,
true, // Draw Middle Line ...
true // Ignore Type ...
);
//
// Detect Required Pivots ...
XBoxZone decisionPivots[];
ENUM_XCA_PIVOTS allowedTypes[];
if (isBullish)
{
@@ -441,29 +452,26 @@ class XCXCAEASignaller : XCBase
allowedTypes //
);
}
int decisionOBsCount = detector.FillPivots(
int decisionPivotsCount = detector.FillPivots(
conditions.decisionZone,
decisionOBs,
decisionPivots,
unAvailableBoxes,
allowedTypes,
cTime //
);
//
// Define a Temparory Objects
// Array instance for Holding Drawn Objects ...
CArrayObj *iObjects;
iObjects = new CArrayObj();
//
// Check Different Trigger Conditions ...
//
// Checking Trigger Cond 0 ...
bool canTriggerCond0 = false;
// CanTriggerCond0(
// helper,
// conditions.decisionZone,
// triggerDir,
// sl,
// tp,
// barIndex //
// );
//
// Checking Trigger Cond 1 ...
@@ -474,9 +482,10 @@ class XCXCAEASignaller : XCBase
canTriggerCond1 = CanTriggerCond1(
helper,
conditions.decisionZone,
decisionPivots,
triggerDir,
sl,
tp,
targets,
iObjects,
barIndex //
);
@@ -491,10 +500,10 @@ class XCXCAEASignaller : XCBase
canTriggerCond2 = CanTriggerCond2(
helper,
conditions.decisionZone,
decisionOBs,
decisionPivots,
triggerDir,
sl,
tp,
targets,
iObjects,
barIndex //
);
@@ -503,24 +512,6 @@ class XCXCAEASignaller : XCBase
//
// Checking Trigger Cond 3 ...
bool canTriggerCond3 = false;
// CanTriggerCond3(
// helper,
// conditions.decisionZone,
// triggerDir,
// sl,
// tp,
// iObjects,
// barIndex //
// );
//
// Draw Decision Zone ...
drawer.DrawBox(
conditions.decisionZone,
cTime,
true, // Draw Middle Line ...
true // Ignore Type ...
);
//
// Adding Drawn Objects to Drawn Stores ...
@@ -557,16 +548,6 @@ class XCXCAEASignaller : XCBase
);
conditions.entry = entry;
//
if (tp > 0.0)
{
//
Add(
tp,
conditions.targets //
);
}
//
double spred = GetSpread(conditions.symbol);
@@ -578,28 +559,28 @@ class XCXCAEASignaller : XCBase
? entry + reward
: entry - reward;
//
// Handling RF ...
double rfReward = risk * 1.95;
double rfPrice =
isBullish
? entry + rfReward
: entry - rfReward;
Add(
rfPrice,
conditions.targets //
);
// //
// // Handling RF ...
// double rfReward = risk * 1.95;
// double rfPrice =
// isBullish
// ? entry + rfReward
// : entry - rfReward;
// Add(
// rfPrice,
// conditions.targets //
// );
//
rfReward = risk * 2.95;
rfPrice =
isBullish
? entry + rfReward
: entry - rfReward;
Add(
rfPrice,
conditions.targets //
);
// //
// rfReward = risk * 2.95;
// rfPrice =
// isBullish
// ? entry + rfReward
// : entry - rfReward;
// Add(
// rfPrice,
// conditions.targets //
// );
//
// Handling Partial Close ...
@@ -615,6 +596,18 @@ class XCXCAEASignaller : XCBase
? X_POSITION_TYPE_LONG
: X_POSITION_TYPE_SHORT;
//
// Handling Targets ...
bool hasTargets = HasChild(targets);
if (hasTargets)
{
//
Copy(
targets,
conditions.targets //
);
}
//
}