last works ...

This commit is contained in:
2024-07-15 17:11:50 +03:30
parent af6685f523
commit 6d7f366f73
11 changed files with 1919 additions and 922 deletions
+46 -112
View File
@@ -2623,8 +2623,7 @@ struct XOHCL
//
// Find Support ...
bool HasSupport(
double &support,
datetime &at,
XOHCL &bar,
ENUM_X_PRICE type = X_PRICE_CLOSE,
int loopback = 21,
int tries = 100 //
@@ -2634,8 +2633,7 @@ struct XOHCL
bool result = false;
//
at = NULL;
support = 0;
bar.Clean();
//
if (loopback < 0)
@@ -2697,8 +2695,7 @@ struct XOHCL
if (result)
{
//
at = iLBar.time;
support = iLBar.high;
bar = iLBar;
break;
}
}
@@ -2710,8 +2707,7 @@ struct XOHCL
//
// Find Resistance ...
bool HasResistance(
double &resistance,
datetime &at,
XOHCL &bar,
ENUM_X_PRICE type = X_PRICE_CLOSE,
int loopback = 21,
int tries = 100 //
@@ -2721,8 +2717,7 @@ struct XOHCL
bool result = false;
//
at = NULL;
resistance = 0;
bar.Clean();
//
if (loopback < 0)
@@ -2784,8 +2779,7 @@ struct XOHCL
if (result)
{
//
at = iHBar.time;
resistance = iHBar.high;
bar = iHBar;
break;
}
}
@@ -2800,10 +2794,8 @@ struct XOHCL
//
// Find Bullish Trend ...
bool HasBullishTrend(
double &highSwings[],
datetime &highSwingTimes[],
double &lowSwings[],
datetime &lowSwingTimes[],
XOHCL &highSwingBars[],
XOHCL &lowSwingBars[],
bool forceMethod2 = false,
int loopback = 3,
int tries = 3,
@@ -2814,10 +2806,8 @@ struct XOHCL
bool result = false;
//
Clean(lowSwings);
Clean(lowSwingTimes);
Clean(highSwings);
Clean(highSwingTimes);
Clean(lowSwingBars);
Clean(highSwingBars);
//
result = IsValid();
@@ -2882,15 +2872,9 @@ struct XOHCL
if (isIHAccepted)
{
//
Add(
iH,
highSwings //
);
//
Add(
iHBar.time,
highSwingTimes //
AddRef(
iHBar,
highSwingBars //
);
//
@@ -2941,15 +2925,9 @@ struct XOHCL
if (isILAccepted)
{
//
Add(
iL,
lowSwings //
);
//
Add(
iLBar.time,
lowSwingTimes //
AddRef(
iLBar,
lowSwingBars //
);
//
@@ -3014,15 +2992,9 @@ struct XOHCL
if (isIHAccepted)
{
//
Add(
iH,
highSwings //
);
//
Add(
iHBar.time,
highSwingTimes //
AddRef(
iHBar,
highSwingBars //
);
//
@@ -3073,15 +3045,9 @@ struct XOHCL
if (isILAccepted)
{
//
Add(
iL,
lowSwings //
);
//
Add(
iLBar.time,
lowSwingTimes //
AddRef(
iLBar,
lowSwingBars //
);
//
@@ -3097,8 +3063,8 @@ struct XOHCL
//
result =
//
ArraySize(lowSwings) == tries &&
ArraySize(highSwings) == tries
ArraySize(lowSwingBars) == tries &&
ArraySize(highSwingBars) == tries
//
;
}
@@ -3107,10 +3073,8 @@ struct XOHCL
if (!result)
{
//
Clean(lowSwings);
Clean(lowSwingTimes);
Clean(highSwings);
Clean(highSwingTimes);
Clean(lowSwingBars);
Clean(highSwingBars);
}
//
@@ -3120,10 +3084,8 @@ struct XOHCL
//
// Find Bearish Trend ...
bool HasBearishTrend(
double &highSwings[],
datetime &highSwingTimes[],
double &lowSwings[],
datetime &lowSwingTimes[],
XOHCL &highSwingBars[],
XOHCL &lowSwingBars[],
bool forceMethod2 = false,
int loopback = 3,
int tries = 3,
@@ -3134,10 +3096,8 @@ struct XOHCL
bool result = false;
//
Clean(lowSwings);
Clean(lowSwingTimes);
Clean(highSwings);
Clean(highSwingTimes);
Clean(lowSwingBars);
Clean(highSwingBars);
//
result = IsValid();
@@ -3202,15 +3162,9 @@ struct XOHCL
if (isIHAccepted)
{
//
Add(
iH,
highSwings //
);
//
Add(
iHBar.time,
highSwingTimes //
AddRef(
iHBar,
highSwingBars //
);
//
@@ -3261,15 +3215,9 @@ struct XOHCL
if (isILAccepted)
{
//
Add(
iL,
lowSwings //
);
//
Add(
iLBar.time,
lowSwingTimes //
AddRef(
iLBar,
lowSwingBars //
);
//
@@ -3334,15 +3282,9 @@ struct XOHCL
if (isIHAccepted)
{
//
Add(
iH,
highSwings //
);
//
Add(
iHBar.time,
highSwingTimes //
AddRef(
iHBar,
highSwingBars //
);
//
@@ -3393,15 +3335,9 @@ struct XOHCL
if (isILAccepted)
{
//
Add(
iL,
lowSwings //
);
//
Add(
iLBar.time,
lowSwingTimes //
AddRef(
iLBar,
lowSwingBars //
);
//
@@ -3417,8 +3353,8 @@ struct XOHCL
//
result =
//
ArraySize(lowSwings) == tries &&
ArraySize(highSwings) == tries
ArraySize(lowSwingBars) == tries &&
ArraySize(highSwingBars) == tries
//
;
}
@@ -3427,10 +3363,8 @@ struct XOHCL
if (!result)
{
//
Clean(lowSwings);
Clean(lowSwingTimes);
Clean(highSwings);
Clean(highSwingTimes);
Clean(lowSwingBars);
Clean(highSwingBars);
}
//