add xche to supports list ...
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -521,7 +521,7 @@ class XCX121XPVHelper : public XCBaseHelper
|
||||
bool Init(
|
||||
string symbol, // Trading Symbol
|
||||
ENUM_TIMEFRAMES period, // Trading Period
|
||||
X121XPVInputs &inputs // Inputs
|
||||
X121XPVInputs &inputs // Inputs
|
||||
)
|
||||
{
|
||||
//
|
||||
@@ -811,6 +811,7 @@ class XCX121XPVHelper : public XCBaseHelper
|
||||
|
||||
//
|
||||
double GetHigherPeak(
|
||||
int &index, // Bar Index
|
||||
double peak, // Peak Source
|
||||
int barIndex = 0, // Bar Index
|
||||
int loopback = 576 // Max Allowed Loopback
|
||||
@@ -819,6 +820,9 @@ class XCX121XPVHelper : public XCBaseHelper
|
||||
//
|
||||
double result = 0;
|
||||
|
||||
//
|
||||
index = -1;
|
||||
|
||||
//
|
||||
if (barIndex < 0)
|
||||
{
|
||||
@@ -839,22 +843,23 @@ class XCX121XPVHelper : public XCBaseHelper
|
||||
|
||||
//
|
||||
double iValue = 0;
|
||||
int index = barIndex;
|
||||
int sIndex = barIndex;
|
||||
bool canContinue = true;
|
||||
while (canContinue)
|
||||
{
|
||||
//
|
||||
iValue = GetPeak(index);
|
||||
iValue = GetPeak(sIndex);
|
||||
if (iValue > peak)
|
||||
{
|
||||
//
|
||||
index = sIndex;
|
||||
result = iValue;
|
||||
break;
|
||||
}
|
||||
|
||||
//
|
||||
canContinue = index < barIndex + loopback;
|
||||
index++;
|
||||
canContinue = sIndex < barIndex + loopback;
|
||||
sIndex++;
|
||||
}
|
||||
|
||||
//
|
||||
@@ -863,6 +868,7 @@ class XCX121XPVHelper : public XCBaseHelper
|
||||
|
||||
//
|
||||
double GetLowerPeak(
|
||||
int &index, // Bar Index
|
||||
double peak, // Peak Source
|
||||
int barIndex = 0, // Bar Index
|
||||
int loopback = 576 // Max Allowed Loopback
|
||||
@@ -871,6 +877,9 @@ class XCX121XPVHelper : public XCBaseHelper
|
||||
//
|
||||
double result = 0;
|
||||
|
||||
//
|
||||
index = -1;
|
||||
|
||||
//
|
||||
if (barIndex < 0)
|
||||
{
|
||||
@@ -891,22 +900,23 @@ class XCX121XPVHelper : public XCBaseHelper
|
||||
|
||||
//
|
||||
double iValue = 0;
|
||||
int index = barIndex;
|
||||
int sIndex = barIndex;
|
||||
bool canContinue = true;
|
||||
while (canContinue)
|
||||
{
|
||||
//
|
||||
iValue = GetPeak(index);
|
||||
iValue = GetPeak(sIndex);
|
||||
if (iValue < peak)
|
||||
{
|
||||
//
|
||||
index = sIndex;
|
||||
result = iValue;
|
||||
break;
|
||||
}
|
||||
|
||||
//
|
||||
canContinue = index < barIndex + loopback;
|
||||
index++;
|
||||
canContinue = sIndex < barIndex + loopback;
|
||||
sIndex++;
|
||||
}
|
||||
|
||||
//
|
||||
@@ -915,6 +925,7 @@ class XCX121XPVHelper : public XCBaseHelper
|
||||
|
||||
//
|
||||
double GetHigherVale(
|
||||
int &index, // Bar Index
|
||||
double vale, // Vale Source
|
||||
int barIndex = 0, // Bar Index
|
||||
int loopback = 576 // Max Allowed Loopback
|
||||
@@ -923,6 +934,9 @@ class XCX121XPVHelper : public XCBaseHelper
|
||||
//
|
||||
double result = 0;
|
||||
|
||||
//
|
||||
index = -1;
|
||||
|
||||
//
|
||||
if (barIndex < 0)
|
||||
{
|
||||
@@ -943,22 +957,23 @@ class XCX121XPVHelper : public XCBaseHelper
|
||||
|
||||
//
|
||||
double iValue = 0;
|
||||
int index = barIndex;
|
||||
int sIndex = barIndex;
|
||||
bool canContinue = true;
|
||||
while (canContinue)
|
||||
{
|
||||
//
|
||||
iValue = GetVale(index);
|
||||
iValue = GetVale(sIndex);
|
||||
if (iValue > vale)
|
||||
{
|
||||
//
|
||||
index = sIndex;
|
||||
result = iValue;
|
||||
break;
|
||||
}
|
||||
|
||||
//
|
||||
canContinue = index < barIndex + loopback;
|
||||
index++;
|
||||
canContinue = sIndex < barIndex + loopback;
|
||||
sIndex++;
|
||||
}
|
||||
|
||||
//
|
||||
@@ -967,6 +982,7 @@ class XCX121XPVHelper : public XCBaseHelper
|
||||
|
||||
//
|
||||
double GetLowerVale(
|
||||
int &index, // Bar Index
|
||||
double vale, // Vale Source
|
||||
int barIndex = 0, // Bar Index
|
||||
int loopback = 576 // Max Allowed Loopback
|
||||
@@ -975,6 +991,9 @@ class XCX121XPVHelper : public XCBaseHelper
|
||||
//
|
||||
double result = 0;
|
||||
|
||||
//
|
||||
index = -1;
|
||||
|
||||
//
|
||||
if (barIndex < 0)
|
||||
{
|
||||
@@ -995,22 +1014,23 @@ class XCX121XPVHelper : public XCBaseHelper
|
||||
|
||||
//
|
||||
double iValue = 0;
|
||||
int index = barIndex;
|
||||
int sIndex = barIndex;
|
||||
bool canContinue = true;
|
||||
while (canContinue)
|
||||
{
|
||||
//
|
||||
iValue = GetVale(index);
|
||||
iValue = GetVale(sIndex);
|
||||
if (iValue < vale)
|
||||
{
|
||||
//
|
||||
index = sIndex;
|
||||
result = iValue;
|
||||
break;
|
||||
}
|
||||
|
||||
//
|
||||
canContinue = index < barIndex + loopback;
|
||||
index++;
|
||||
canContinue = sIndex < barIndex + loopback;
|
||||
sIndex++;
|
||||
}
|
||||
|
||||
//
|
||||
@@ -1778,8 +1798,8 @@ class XCX121XPVHelper : public XCBaseHelper
|
||||
//
|
||||
bool GetConditions(
|
||||
X121XPVConditions &conditions, //
|
||||
int barIndex = 0, //
|
||||
int loopback = 5 //
|
||||
int barIndex = 0, //
|
||||
int loopback = 5 //
|
||||
)
|
||||
{
|
||||
//
|
||||
@@ -1949,7 +1969,6 @@ class XCX121XPVHelper : public XCBaseHelper
|
||||
bool isSarBullish = conditions.sarBuffer[cIDX] < cBar.low;
|
||||
bool isSarBullishPrev = conditions.sarBuffer[pIDX] < pBar.low;
|
||||
|
||||
|
||||
//
|
||||
bool isSarBearish = conditions.sarBuffer[cIDX] > cBar.high;
|
||||
bool isSarBearishPrev = conditions.sarBuffer[pIDX] > pBar.high;
|
||||
@@ -2028,7 +2047,7 @@ class XCX121XPVHelper : public XCBaseHelper
|
||||
{
|
||||
totalBars = 1000;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Buffers ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user