last ...
This commit is contained in:
@@ -1882,6 +1882,350 @@ class XCXFIMAHelperParser : XCBase
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check Price is Over HK Band Lower ...
|
||||
*
|
||||
* @param barIndex: int, Specified Bar Index ...
|
||||
* @param priceType: ENUM_X_PRICE, Specified Price Type ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool IsOverHKBandLower(
|
||||
int barIndex = 0,
|
||||
ENUM_X_PRICE priceType = X_PRICE_CLOSE //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize ...
|
||||
barIndex = NormalizeBarIndex(barIndex);
|
||||
|
||||
//
|
||||
// Validate ...
|
||||
result = IsValid() &&
|
||||
IsXValid(priceType);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL bar;
|
||||
result = bar.Init(symbol, period, barIndex);
|
||||
double price = bar.GetPrice(priceType);
|
||||
double value = helper.GetHKBandLower(barIndex);
|
||||
result =
|
||||
result &&
|
||||
price > value;
|
||||
|
||||
//
|
||||
// Cleanup ...
|
||||
bar.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check Price is Over HK Band Upper ...
|
||||
*
|
||||
* @param barIndex: int, Specified Bar Index ...
|
||||
* @param priceType: ENUM_X_PRICE, Specified Price Type ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool IsOverHKBandUpper(
|
||||
int barIndex = 0,
|
||||
ENUM_X_PRICE priceType = X_PRICE_CLOSE //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize ...
|
||||
barIndex = NormalizeBarIndex(barIndex);
|
||||
|
||||
//
|
||||
// Validate ...
|
||||
result = IsValid() &&
|
||||
IsXValid(priceType);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL bar;
|
||||
result = bar.Init(symbol, period, barIndex);
|
||||
double price = bar.GetPrice(priceType);
|
||||
double value = helper.GetHKBandUpper(barIndex);
|
||||
result =
|
||||
result &&
|
||||
price > value;
|
||||
|
||||
//
|
||||
// Cleanup ...
|
||||
bar.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check Price is Under HK Band Lower ...
|
||||
*
|
||||
* @param barIndex: int, Specified Bar Index ...
|
||||
* @param priceType: ENUM_X_PRICE, Specified Price Type ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool IsUnderHKBandLower(
|
||||
int barIndex = 0,
|
||||
ENUM_X_PRICE priceType = X_PRICE_CLOSE //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize ...
|
||||
barIndex = NormalizeBarIndex(barIndex);
|
||||
|
||||
//
|
||||
// Validate ...
|
||||
result = IsValid() &&
|
||||
IsXValid(priceType);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL bar;
|
||||
result = bar.Init(symbol, period, barIndex);
|
||||
double price = bar.GetPrice(priceType);
|
||||
double value = helper.GetHKBandLower(barIndex);
|
||||
result =
|
||||
result &&
|
||||
price < value;
|
||||
|
||||
//
|
||||
// Cleanup ...
|
||||
bar.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check Price is Under HK Band Upper ...
|
||||
*
|
||||
* @param barIndex: int, Specified Bar Index ...
|
||||
* @param priceType: ENUM_X_PRICE, Specified Price Type ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool IsUnderHKBandUpper(
|
||||
int barIndex = 0,
|
||||
ENUM_X_PRICE priceType = X_PRICE_CLOSE //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize ...
|
||||
barIndex = NormalizeBarIndex(barIndex);
|
||||
|
||||
//
|
||||
// Validate ...
|
||||
result = IsValid() &&
|
||||
IsXValid(priceType);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL bar;
|
||||
result = bar.Init(symbol, period, barIndex);
|
||||
double price = bar.GetPrice(priceType);
|
||||
double value = helper.GetHKBandUpper(barIndex);
|
||||
result =
|
||||
result &&
|
||||
price < value;
|
||||
|
||||
//
|
||||
// Cleanup ...
|
||||
bar.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check Price Crossed Over HK Band Lower ...
|
||||
*
|
||||
* @param barIndex: int, Specified Bar Index ...
|
||||
* @param priceType: ENUM_X_PRICE, Specified Price Type ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool IsCrossedOverHKBandLower(
|
||||
int barIndex = 0,
|
||||
ENUM_X_PRICE priceType = X_PRICE_CLOSE //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize ...
|
||||
barIndex = NormalizeBarIndex(barIndex);
|
||||
|
||||
//
|
||||
// Validate ...
|
||||
result = IsValid() &&
|
||||
IsXValid(priceType);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool isC = IsOverHKBandLower(barIndex, priceType);
|
||||
bool isP = IsOverHKBandLower(barIndex + 1, priceType);
|
||||
|
||||
//
|
||||
result = isC && !isP;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check Price Crossed Under HK Band Lower ...
|
||||
*
|
||||
* @param barIndex: int, Specified Bar Index ...
|
||||
* @param priceType: ENUM_X_PRICE, Specified Price Type ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool IsCrossedUnderHKBandLower(
|
||||
int barIndex = 0,
|
||||
ENUM_X_PRICE priceType = X_PRICE_CLOSE //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize ...
|
||||
barIndex = NormalizeBarIndex(barIndex);
|
||||
|
||||
//
|
||||
// Validate ...
|
||||
result = IsValid() &&
|
||||
IsXValid(priceType);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool isC = IsUnderHKBandLower(barIndex, priceType);
|
||||
bool isP = IsUnderHKBandLower(barIndex + 1, priceType);
|
||||
|
||||
//
|
||||
result = isC && !isP;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check Price Crossed Over HK Band Upper ...
|
||||
*
|
||||
* @param barIndex: int, Specified Bar Index ...
|
||||
* @param priceType: ENUM_X_PRICE, Specified Price Type ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool IsCrossedOverHKBandUpper(
|
||||
int barIndex = 0,
|
||||
ENUM_X_PRICE priceType = X_PRICE_CLOSE //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize ...
|
||||
barIndex = NormalizeBarIndex(barIndex);
|
||||
|
||||
//
|
||||
// Validate ...
|
||||
result = IsValid() &&
|
||||
IsXValid(priceType);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool isC = IsOverHKBandUpper(barIndex, priceType);
|
||||
bool isP = IsOverHKBandUpper(barIndex + 1, priceType);
|
||||
|
||||
//
|
||||
result = isC && !isP;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check Price Crossed Under HK Band Upper ...
|
||||
*
|
||||
* @param barIndex: int, Specified Bar Index ...
|
||||
* @param priceType: ENUM_X_PRICE, Specified Price Type ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool IsCrossedUnderHKBandUpper(
|
||||
int barIndex = 0,
|
||||
ENUM_X_PRICE priceType = X_PRICE_CLOSE //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize ...
|
||||
barIndex = NormalizeBarIndex(barIndex);
|
||||
|
||||
//
|
||||
// Validate ...
|
||||
result = IsValid() &&
|
||||
IsXValid(priceType);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool isC = IsUnderHKBandUpper(barIndex, priceType);
|
||||
bool isP = IsUnderHKBandUpper(barIndex + 1, priceType);
|
||||
|
||||
//
|
||||
result = isC && !isP;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Count Bullish HK(s) ...
|
||||
*
|
||||
@@ -2988,6 +3332,361 @@ class XCXFIMAHelperParser : XCBase
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// XATR ...
|
||||
|
||||
/**
|
||||
* Check Price is Over ATR Band Lower ...
|
||||
*
|
||||
* @param barIndex: int, Specified Bar Index ...
|
||||
* @param priceType: ENUM_X_PRICE, Specified Price Type ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool IsOverATRBandLower(
|
||||
int barIndex = 0,
|
||||
ENUM_X_PRICE priceType = X_PRICE_CLOSE //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize ...
|
||||
barIndex = NormalizeBarIndex(barIndex);
|
||||
|
||||
//
|
||||
// Validate ...
|
||||
result =
|
||||
IsValid() &&
|
||||
IsXValid(priceType);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL bar;
|
||||
result = bar.Init(symbol, period, barIndex);
|
||||
double price = bar.GetPrice(priceType);
|
||||
double value = helper.GetATRBandLower(barIndex);
|
||||
result =
|
||||
result &&
|
||||
NotEmptyZero(value) &&
|
||||
NotEmptyZero(price) &&
|
||||
price > value;
|
||||
|
||||
//
|
||||
// Cleanup ...
|
||||
bar.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check Price is Over ATR Band Upper ...
|
||||
*
|
||||
* @param barIndex: int, Specified Bar Index ...
|
||||
* @param priceType: ENUM_X_PRICE, Specified Price Type ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool IsOverATRBandUpper(
|
||||
int barIndex = 0,
|
||||
ENUM_X_PRICE priceType = X_PRICE_CLOSE //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize ...
|
||||
barIndex = NormalizeBarIndex(barIndex);
|
||||
|
||||
//
|
||||
// Validate ...
|
||||
result =
|
||||
IsValid() &&
|
||||
IsXValid(priceType);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL bar;
|
||||
result = bar.Init(symbol, period, barIndex);
|
||||
double price = bar.GetPrice(priceType);
|
||||
double value = helper.GetATRBandUpper(barIndex);
|
||||
result =
|
||||
result &&
|
||||
NotEmptyZero(value) &&
|
||||
NotEmptyZero(price) &&
|
||||
price > value;
|
||||
|
||||
//
|
||||
// Cleanup ...
|
||||
bar.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check Price is Under ATR Band Lower ...
|
||||
*
|
||||
* @param barIndex: int, Specified Bar Index ...
|
||||
* @param priceType: ENUM_X_PRICE, Specified Price Type ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool IsUnderATRBandLower(
|
||||
int barIndex = 0,
|
||||
ENUM_X_PRICE priceType = X_PRICE_CLOSE //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize ...
|
||||
barIndex = NormalizeBarIndex(barIndex);
|
||||
|
||||
//
|
||||
// Validate ...
|
||||
result =
|
||||
IsValid() &&
|
||||
IsXValid(priceType);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL bar;
|
||||
result = bar.Init(symbol, period, barIndex);
|
||||
double price = bar.GetPrice(priceType);
|
||||
double value = helper.GetATRBandLower(barIndex);
|
||||
result =
|
||||
result &&
|
||||
NotEmptyZero(value) &&
|
||||
NotEmptyZero(price) &&
|
||||
price < value;
|
||||
|
||||
//
|
||||
// Cleanup ...
|
||||
bar.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check Price is Under ATR Band Upper ...
|
||||
*
|
||||
* @param barIndex: int, Specified Bar Index ...
|
||||
* @param priceType: ENUM_X_PRICE, Specified Price Type ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool IsUnderATRBandUpper(
|
||||
int barIndex = 0,
|
||||
ENUM_X_PRICE priceType = X_PRICE_CLOSE //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize ...
|
||||
barIndex = NormalizeBarIndex(barIndex);
|
||||
|
||||
//
|
||||
// Validate ...
|
||||
result =
|
||||
IsValid() &&
|
||||
IsXValid(priceType);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL bar;
|
||||
result = bar.Init(symbol, period, barIndex);
|
||||
double price = bar.GetPrice(priceType);
|
||||
double value = helper.GetATRBandUpper(barIndex);
|
||||
result =
|
||||
result &&
|
||||
NotEmptyZero(value) &&
|
||||
NotEmptyZero(price) &&
|
||||
price < value;
|
||||
|
||||
//
|
||||
// Cleanup ...
|
||||
bar.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check Price is Crossed Over ATR Band Lower ...
|
||||
*
|
||||
* @param barIndex: int, Specified Bar Index ...
|
||||
* @param priceType: ENUM_X_PRICE, Specified Price Type ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool IsCrossedOverATRBandLower(
|
||||
int barIndex = 0,
|
||||
ENUM_X_PRICE priceType = X_PRICE_CLOSE //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize ...
|
||||
barIndex = NormalizeBarIndex(barIndex);
|
||||
|
||||
//
|
||||
result = IsValid() &&
|
||||
IsXValid(priceType);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool isC = IsOverATRBandLower(barIndex, priceType);
|
||||
bool isP = IsOverATRBandLower(barIndex + 1, priceType);
|
||||
|
||||
//
|
||||
result = isC && !isP;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check Price is Crossed Under ATR Band Lower ...
|
||||
*
|
||||
* @param barIndex: int, Specified Bar Index ...
|
||||
* @param priceType: ENUM_X_PRICE, Specified Price Type ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool IsCrossedUnderATRBandLower(
|
||||
int barIndex = 0,
|
||||
ENUM_X_PRICE priceType = X_PRICE_CLOSE //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize ...
|
||||
barIndex = NormalizeBarIndex(barIndex);
|
||||
|
||||
//
|
||||
result = IsValid() &&
|
||||
IsXValid(priceType);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool isC = IsUnderATRBandLower(barIndex, priceType);
|
||||
bool isP = IsUnderATRBandLower(barIndex + 1, priceType);
|
||||
|
||||
//
|
||||
result = isC && !isP;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check Price is Crossed Over ATR Band Upper ...
|
||||
*
|
||||
* @param barIndex: int, Specified Bar Index ...
|
||||
* @param priceType: ENUM_X_PRICE, Specified Price Type ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool IsCrossedOverATRBandUpper(
|
||||
int barIndex = 0,
|
||||
ENUM_X_PRICE priceType = X_PRICE_CLOSE //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize ...
|
||||
barIndex = NormalizeBarIndex(barIndex);
|
||||
|
||||
//
|
||||
result = IsValid() &&
|
||||
IsXValid(priceType);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool isC = IsOverATRBandUpper(barIndex, priceType);
|
||||
bool isP = IsOverATRBandUpper(barIndex + 1, priceType);
|
||||
|
||||
//
|
||||
result = isC && !isP;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check Price is Crossed Under ATR Band Upper ...
|
||||
*
|
||||
* @param barIndex: int, Specified Bar Index ...
|
||||
* @param priceType: ENUM_X_PRICE, Specified Price Type ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool IsCrossedUnderATRBandUpper(
|
||||
int barIndex = 0,
|
||||
ENUM_X_PRICE priceType = X_PRICE_CLOSE //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize ...
|
||||
barIndex = NormalizeBarIndex(barIndex);
|
||||
|
||||
//
|
||||
result = IsValid() &&
|
||||
IsXValid(priceType);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool isC = IsUnderATRBandUpper(barIndex, priceType);
|
||||
bool isP = IsUnderATRBandUpper(barIndex + 1, priceType);
|
||||
|
||||
//
|
||||
result = isC && !isP;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Cycles Tools ...
|
||||
|
||||
@@ -7469,7 +8168,7 @@ class XCXFIMAHelperParser : XCBase
|
||||
|
||||
/**
|
||||
* Retrieve Cycles MA(s) ...
|
||||
*
|
||||
*
|
||||
* @param scMA: double, reference to holds cycle value ...
|
||||
* @param mcMA: double, reference to holds cycle value ...
|
||||
* @param lcMA: double, reference to holds cycle value ...
|
||||
@@ -7512,7 +8211,7 @@ class XCXFIMAHelperParser : XCBase
|
||||
|
||||
/**
|
||||
* Retrieve Cycles MA State(s) ...
|
||||
*
|
||||
*
|
||||
* @param scMAState: double, reference to holds cycle value ...
|
||||
* @param mcMAState: double, reference to holds cycle value ...
|
||||
* @param lcMAState: double, reference to holds cycle value ...
|
||||
@@ -8507,6 +9206,115 @@ class XCXFIMAHelperParser : XCBase
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Other Tools ...
|
||||
|
||||
int CollectPivots(
|
||||
XPivot &pivots[],
|
||||
int barIndex = 0,
|
||||
int loopback = 500 //
|
||||
)
|
||||
{
|
||||
//
|
||||
int result = 0;
|
||||
|
||||
//
|
||||
// Prepare ...
|
||||
XClean(pivots);
|
||||
|
||||
//
|
||||
// Normalize ...
|
||||
loopback = NormalizeInt(loopback, 50);
|
||||
barIndex = NormalizeBarIndex(barIndex);
|
||||
|
||||
//
|
||||
// Validate ...
|
||||
bool has = IsValid();
|
||||
if (!has)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
has = false;
|
||||
XOHCL tmpBar;
|
||||
XPivot tmpPivot;
|
||||
double tmpValue;
|
||||
datetime tmpTime;
|
||||
bool isBullish = false;
|
||||
bool isBearish = false;
|
||||
string tmpSymbol = symbol;
|
||||
ENUM_TIMEFRAMES tmpPeriod = period;
|
||||
ENUM_X_DIRECTION tmpDir = X_DIRECTION_NONE;
|
||||
for (int i = barIndex; i < barIndex + loopback; i++)
|
||||
{
|
||||
//
|
||||
tmpBar.Clean();
|
||||
tmpPivot.Clean();
|
||||
|
||||
//
|
||||
has = tmpBar.Init(tmpSymbol, tmpPeriod, i);
|
||||
if (!has)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
//
|
||||
// XSAR ...
|
||||
isBullish = IsSARSwitchedToBullish(i);
|
||||
isBearish = IsSARSwitchedToBearish(i);
|
||||
has = isBullish || isBearish;
|
||||
if (has)
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// XMA Fast / Slow ...
|
||||
|
||||
//
|
||||
// States ...
|
||||
isBullish = IsMASlowSwitchedToBullish(i);
|
||||
isBearish = IsMASlowSwitchedToBearish(i);
|
||||
has = isBullish || isBearish;
|
||||
if (has)
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// Crossed Fast Slow ...
|
||||
isBullish = IsMAFastCrossedOverSlow(i);
|
||||
isBearish = IsMAFastCrossedUnderSlow(i);
|
||||
has = isBullish || isBearish;
|
||||
if (has)
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// Crossed Last ...
|
||||
isBullish = IsMASlowCrossedOverLast(i);
|
||||
isBearish = IsMASlowCrossedUnderLast(i);
|
||||
has = isBullish || isBearish;
|
||||
if (has)
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// XHK ...
|
||||
isBullish = IsHKSwitchedToBullish(i);
|
||||
isBearish = IsHKSwitchedToBearish(i);
|
||||
has = isBullish || isBearish;
|
||||
if (has)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
result = ArraySize(pivots);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Protected ...
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user