last ...
This commit is contained in:
@@ -84,6 +84,7 @@ class XCX121XKIPOIDetector : public XCMarketPatternDetector
|
||||
string forSymbol = NULL,
|
||||
ENUM_TIMEFRAMES forPeriod = NULL,
|
||||
int loopback = 50,
|
||||
int minAllowedSameDirectionalBars = 4,
|
||||
int confluence = 1,
|
||||
int confluenceLoopback = 50 //
|
||||
)
|
||||
@@ -133,6 +134,41 @@ class XCX121XKIPOIDetector : public XCMarketPatternDetector
|
||||
confluenceLoopback = 0;
|
||||
}
|
||||
|
||||
//
|
||||
if (minAllowedSameDirectionalBars < 0)
|
||||
{
|
||||
minAllowedSameDirectionalBars = 2;
|
||||
}
|
||||
|
||||
//
|
||||
// Here We have to Detect Zones ...
|
||||
// Preparing Loops ...
|
||||
XOHCL tmpBar;
|
||||
bool has = false;
|
||||
double upper = 0;
|
||||
double lower = 0;
|
||||
XBoxZone tmpZone;
|
||||
string type = NULL;
|
||||
double tmpValue = 0;
|
||||
datetime from = NULL;
|
||||
int start = barIndex;
|
||||
int end = barIndex + loopback;
|
||||
datetime to = GetBarTime(forSymbol, forPeriod, barIndex);
|
||||
for (int i = start; i < end; i++)
|
||||
{
|
||||
//
|
||||
// Initialize Bar ...
|
||||
has = tmpBar.Init(forSymbol, forPeriod, i);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// Next Step is Detect Sequence Same Directional Bars ...
|
||||
|
||||
//
|
||||
tmpBar.Clean();
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
result = ArraySize(zones);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user