works on poi detector ...
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
|
||||
//
|
||||
bool DetectPivot(
|
||||
int barIndex,
|
||||
XOHCL &zBar,
|
||||
XOHCL &cBar,
|
||||
XOHCL &pBar,
|
||||
XOHCL &p2Bar,
|
||||
XCAEAConditions &conditions //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Validate Args ...
|
||||
result =
|
||||
//
|
||||
barIndex >= 0 &&
|
||||
zBar.IsValid() &&
|
||||
cBar.IsValid() &&
|
||||
pBar.IsValid() &&
|
||||
p2Bar.IsValid() &&
|
||||
//
|
||||
;
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Define Requirements ...
|
||||
|
||||
//
|
||||
int zIDX = 0;
|
||||
int cIDX = zIDX + 1;
|
||||
int pIDX = cIDX + 1;
|
||||
int p2IDX = pIDX + 1;
|
||||
|
||||
//
|
||||
XCAPviot pivot;
|
||||
datetime cTime = zBar.time;
|
||||
string symbol = zBar.symbol;
|
||||
string period = zBar.period;
|
||||
|
||||
//
|
||||
// Reading Conditional Values ...
|
||||
|
||||
//
|
||||
// Prepare Conditinal Conditions ...
|
||||
|
||||
//
|
||||
bool hasStartCondition = false;
|
||||
bool hasContinuationCondition = false;
|
||||
bool hasEndCondition = false;
|
||||
|
||||
//
|
||||
// ReInstance Pivot ...
|
||||
if (hasStartConditions)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
//
|
||||
// Calculate and Fill Pivot Requirements ...
|
||||
if (hasContinuationCondition)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
//
|
||||
// End up Pivot and Store it ...
|
||||
if (hasEndCondition)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
//
|
||||
pivot.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
Reference in New Issue
Block a user