This commit is contained in:
2025-04-13 22:16:17 +03:30
parent 1d91d3be1b
commit ab6ddf0b43
6 changed files with 1768 additions and 55 deletions
+20 -23
View File
@@ -66,7 +66,6 @@ struct XSTRCCIStrategyConditions
double tp;
double pivot;
double point;
double sls[];
string provider;
double targets[];
@@ -79,7 +78,7 @@ struct XSTRCCIStrategyConditions
XBoxZone signalBox;
ENUM_X_DIRECTION dir;
ENUM_X_POSITION_TYPES type;
ENUM_X_DIRECTION signalDir;
XSTRCCIConditions conditions;
//
// Constructor ...
@@ -113,16 +112,15 @@ struct XSTRCCIStrategyConditions
triggerTime = NULL;
//
Clean(sls);
Clean(targets);
//
signalBox.Clean();
conditions.Clean();
//
dir = X_DIRECTION_NONE;
type = X_POSITION_TYPE_NONE;
signalDir = X_DIRECTION_NONE;
//
}
@@ -164,7 +162,7 @@ struct XSTRCCIStrategyConditions
(sl > 0 ||
tp > 0) &&
IsValid() &&
HasDirection(signalDir);
HasDirection(dir);
if (!result)
{
return result;
@@ -172,7 +170,7 @@ struct XSTRCCIStrategyConditions
//
result =
IsBullish(signalDir);
IsBullish(dir);
//
return result;
@@ -193,7 +191,7 @@ struct XSTRCCIStrategyConditions
(sl > 0 ||
tp > 0) &&
IsValid() &&
HasDirection(signalDir);
HasDirection(dir);
if (!result)
{
return result;
@@ -201,7 +199,7 @@ struct XSTRCCIStrategyConditions
//
result =
IsBearish(signalDir);
IsBearish(dir);
//
return result;
@@ -421,6 +419,7 @@ int AddGuard(
//
bool DetectXSTRCCIConditions(
XSTRCCIConditions &conditions,
XBoxZone &box,
ENUM_X_DIRECTION &dir,
XCXSTRCCIHelper *helper,
@@ -433,6 +432,7 @@ bool DetectXSTRCCIConditions(
//
box.Clean();
conditions.Clean();
dir = X_DIRECTION_NONE;
//
@@ -447,7 +447,6 @@ bool DetectXSTRCCIConditions(
ENUM_TIMEFRAMES period = helper.GetPeriod();
//
XSTRCCIConditions conditions;
result = helper.GetConditions(
conditions,
barIndex,
@@ -505,6 +504,10 @@ bool DetectXSTRCCIConditions(
p3Bar.Clean();
p4Bar.Clean();
//
box.Clean();
conditions.Clean();
//
return result;
}
@@ -750,17 +753,6 @@ bool DetectXSTRCCIConditions(
//
box.type = ToString(dir) + "_Signal_" + conditions.symbol + "_" + ToString(conditions.period);
//
XCBoxObject *iObj;
bool isCreated = helper.poiDrawer.DrawBox(
box,
iObj //
);
if (isCreated)
{
Print("Signal Box ...");
}
}
//
@@ -770,6 +762,14 @@ bool DetectXSTRCCIConditions(
//
// Cleanup Resources ...
//
if (!result)
{
//
box.Clean();
conditions.Clean();
}
//
zBar.Clean();
cBar.Clean();
@@ -778,9 +778,6 @@ bool DetectXSTRCCIConditions(
p3Bar.Clean();
p4Bar.Clean();
//
conditions.Clean();
//
return result;
}