last ...
This commit is contained in:
@@ -2671,6 +2671,78 @@ class XCMarketPatternDetector : public XCBase
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Count Same Bars ...
|
||||||
|
*
|
||||||
|
* @param bar: XOHCL, Specified Bar ...
|
||||||
|
* @param sameBars: XOHCL, collection reference to holds same Bars ...
|
||||||
|
* @param dir: ENUM_X_DIRECTION, refrence to Founded Bars Direction holding ...
|
||||||
|
* @param forDir: ENUM_X_DIRECTION, Specified Looking Bar ...
|
||||||
|
*
|
||||||
|
* @return ( int )
|
||||||
|
*/
|
||||||
|
int CountSameBars(
|
||||||
|
XOHCL &bar,
|
||||||
|
XOHCL &sameBars[],
|
||||||
|
ENUM_X_DIRECTION &dir,
|
||||||
|
ENUM_X_DIRECTION forDir //
|
||||||
|
)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
int result = 0;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Prepare ...
|
||||||
|
XClean(sameBars);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Validate ...
|
||||||
|
bool has = bar.IsValid();
|
||||||
|
if (!has)
|
||||||
|
{
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
XOHCL tmpBar;
|
||||||
|
ENUM_X_DIRECTION tmpDir = forDir;
|
||||||
|
int idx = bar.Index();
|
||||||
|
while (has)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
idx++;
|
||||||
|
tmpBar.Clean();
|
||||||
|
has = bar.BarAt(idx, tmpBar);
|
||||||
|
if (has && !HasDirection(tmpDir))
|
||||||
|
{
|
||||||
|
tmpDir = tmpBar.GetDirection();
|
||||||
|
}
|
||||||
|
has = has &&
|
||||||
|
tmpBar.GetDirection() == tmpDir;
|
||||||
|
if (!has)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
AddIfNotExists(tmpBar, sameBars);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
result = ArraySize(sameBars);
|
||||||
|
if (IsValidSize(result))
|
||||||
|
{
|
||||||
|
dir = tmpDir;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Cleanup ...
|
||||||
|
tmpBar.Clean();
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Trending ...
|
// Trending ...
|
||||||
|
|
||||||
@@ -4414,7 +4486,8 @@ class XCMarketPatternDetector : public XCBase
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Validate Zones Range ...
|
// Validate Zones Range ...
|
||||||
if (zonesRangeValidationFactor > 0) {
|
if (zonesRangeValidationFactor > 0)
|
||||||
|
{
|
||||||
//
|
//
|
||||||
double points = GetPoints(bar.symbol);
|
double points = GetPoints(bar.symbol);
|
||||||
double minAllowedRange = points * zonesRangeValidationFactor;
|
double minAllowedRange = points * zonesRangeValidationFactor;
|
||||||
|
|||||||
@@ -1063,10 +1063,10 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
|
|||||||
//
|
//
|
||||||
// Validator Flags ...
|
// Validator Flags ...
|
||||||
bool validateByZones = false;
|
bool validateByZones = false;
|
||||||
bool validateHasLiquidity = true;
|
bool validateHasLiquidity = false;
|
||||||
bool validateByXFIMARejected = true;
|
bool validateByXFIMARejected = false;
|
||||||
bool validateByXFIMAMACrossed = true;
|
bool validateByXFIMAMACrossed = false;
|
||||||
bool validateByCyclesMATresnding = true;
|
bool validateByCyclesMATresnding = false;
|
||||||
bool validateByHasDirectionalZones = false;
|
bool validateByHasDirectionalZones = false;
|
||||||
bool validateByHasInDirectionalZones = false;
|
bool validateByHasInDirectionalZones = false;
|
||||||
bool validateByInDirectionalZonesPlacement = false;
|
bool validateByInDirectionalZonesPlacement = false;
|
||||||
@@ -1151,8 +1151,11 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
|
|||||||
//
|
//
|
||||||
// Detect Pin Bar ...
|
// Detect Pin Bar ...
|
||||||
bool isPBarIsPinBar = poiDetector.IsPinnedBar(
|
bool isPBarIsPinBar = poiDetector.IsPinnedBar(
|
||||||
p2Bar,
|
pBar,
|
||||||
dir //
|
dir,
|
||||||
|
3,
|
||||||
|
4,
|
||||||
|
true //
|
||||||
);
|
);
|
||||||
bool isPBarIsPinBarBullish = isPBarIsPinBar && IsXBullish(dir);
|
bool isPBarIsPinBarBullish = isPBarIsPinBar && IsXBullish(dir);
|
||||||
bool isPBarIsPinBarBearish = isPBarIsPinBar && IsXBearish(dir);
|
bool isPBarIsPinBarBearish = isPBarIsPinBar && IsXBearish(dir);
|
||||||
@@ -1161,7 +1164,10 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
|
|||||||
// Detect Signal Key Bar ...
|
// Detect Signal Key Bar ...
|
||||||
bool isPBarSignalKeyBar = poiDetector.IsSignalKeyBarPattern(
|
bool isPBarSignalKeyBar = poiDetector.IsSignalKeyBarPattern(
|
||||||
pBar,
|
pBar,
|
||||||
dir //
|
dir,
|
||||||
|
3,
|
||||||
|
4,
|
||||||
|
true //
|
||||||
);
|
);
|
||||||
bool isPBarSignalKeyBarBullish = isPBarSignalKeyBar && IsXBullish(dir);
|
bool isPBarSignalKeyBarBullish = isPBarSignalKeyBar && IsXBullish(dir);
|
||||||
bool isPBarSignalKeyBarBearish = isPBarSignalKeyBar && IsXBearish(dir);
|
bool isPBarSignalKeyBarBearish = isPBarSignalKeyBar && IsXBearish(dir);
|
||||||
|
|||||||
Reference in New Issue
Block a user