last ...
This commit is contained in:
@@ -85,6 +85,7 @@ class XCX121XKIPOIDetector : public XCMarketPatternDetector
|
||||
ENUM_TIMEFRAMES forPeriod = NULL,
|
||||
int loopback = 50,
|
||||
int minAllowedSameDirectionalBars = 4,
|
||||
double minFVGAllowedPoints = 30,
|
||||
int confluence = 1,
|
||||
int confluenceLoopback = 50 //
|
||||
)
|
||||
@@ -134,6 +135,11 @@ class XCX121XKIPOIDetector : public XCMarketPatternDetector
|
||||
confluenceLoopback = 0;
|
||||
}
|
||||
|
||||
//
|
||||
if (minFVGAllowedPoints < 0) {
|
||||
minFVGAllowedPoints = 0;
|
||||
}
|
||||
|
||||
//
|
||||
if (minAllowedSameDirectionalBars < 0)
|
||||
{
|
||||
@@ -148,11 +154,14 @@ class XCX121XKIPOIDetector : public XCMarketPatternDetector
|
||||
double upper = 0;
|
||||
double lower = 0;
|
||||
XBoxZone tmpZone;
|
||||
int tmpCount = 0;
|
||||
XBoxZone tmpFVGs[];
|
||||
string type = NULL;
|
||||
double tmpValue = 0;
|
||||
datetime from = NULL;
|
||||
int start = barIndex;
|
||||
int end = barIndex + loopback;
|
||||
ENUM_X_DIRECTION tmpDir = X_DIRECTION_NONE;
|
||||
datetime to = GetBarTime(forSymbol, forPeriod, barIndex);
|
||||
for (int i = start; i < end; i++)
|
||||
{
|
||||
@@ -163,6 +172,40 @@ class XCX121XKIPOIDetector : public XCMarketPatternDetector
|
||||
{
|
||||
//
|
||||
// Next Step is Detect Sequence Same Directional Bars ...
|
||||
has = HasSameBars(tmpBar, tmpDir, tmpCount, minAllowedSameDirectionalBars);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// Zone Bar ...
|
||||
XOHCL zoneBar;
|
||||
has = zoneBar.Init(tmpBar.symbol, tmpBar.period, i + tmpCount + 1);
|
||||
|
||||
//
|
||||
// Validate Zone Bar Direction ...
|
||||
has = has &&
|
||||
zoneBar.GetDirection() != tmpBar.GetDirection();
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// Validate FVG Exists ...
|
||||
CollectFVGs(tmpBar, tmpFVGs, 5, 0, zoneBar.Index() - tmpBar.Index());
|
||||
FilterZones(tmpBar, tmpFVGs, tmpBar.GetDirection(), X_PRICE_CLOSE, tmpBar.GetDirection());
|
||||
has = ArraySize(tmpFVGs) > 0;
|
||||
if (has && minFVGAllowedPoints > 0) {
|
||||
//
|
||||
// Validate FVG Gap
|
||||
}
|
||||
|
||||
//
|
||||
if (has)
|
||||
{
|
||||
DebugBreak();
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
zoneBar.Clean();
|
||||
}
|
||||
|
||||
//
|
||||
tmpBar.Clean();
|
||||
|
||||
Reference in New Issue
Block a user