2476 lines
43 KiB
Plaintext
2476 lines
43 KiB
Plaintext
////////////////////////////////////////////////////////
|
|
//
|
|
// SaherElm IT Center MQL5 X12 Conditions Parser Library
|
|
// -----------------------------------------------------
|
|
// Name: X121ConditionsParser
|
|
// Description: provides Market Conditions
|
|
// Parsing Requirements ...
|
|
//
|
|
//
|
|
// Maintainer:
|
|
// ------------
|
|
// Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com)
|
|
//
|
|
//////////////////////////////////////////////////////
|
|
//
|
|
// Global Properties ...
|
|
#property library
|
|
#property copyright "Copyright 2023, SaherElm IT Center"
|
|
#property link "https://www.saherelm.ir"
|
|
#property version "1.00"
|
|
#property strict
|
|
|
|
//
|
|
#include "../Libraries/x-saherelm.common.lib.mq5"
|
|
#include "../Libraries/x-saherelm.models.lib.mq5"
|
|
#include "../Classes/x-saherelm.x121.provider.class.mq5"
|
|
|
|
//
|
|
// START Functions ...
|
|
//
|
|
|
|
//
|
|
// PARSE STATES ...
|
|
//
|
|
|
|
//
|
|
// SSLC ...
|
|
//
|
|
|
|
//
|
|
bool IsSSLCBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
conditions.xmanInfo.sslcUps[index] > conditions.xmanInfo.sslcDowns[index]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsSSLCSwitchedToBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsSSLCBullish(conditions, index) &&
|
|
!IsSSLCBullish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsSSLCBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
conditions.xmanInfo.sslcUps[index] < conditions.xmanInfo.sslcDowns[index]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsSSLCSwitchedToBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsSSLCBearish(conditions, index) &&
|
|
!IsSSLCBearish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// HULL ...
|
|
//
|
|
|
|
//
|
|
bool IsHullBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsHullUpBullish(conditions, index) &&
|
|
IsHullDownBullish(conditions, index)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsHullSwitchedBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsHullBullish(conditions, index) &&
|
|
!IsHullBullish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsHullBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsHullUpBearish(conditions, index) &&
|
|
IsHullDownBearish(conditions, index)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsHullSwitchedBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsHullBearish(conditions, index) &&
|
|
!IsHullBearish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// UP ...
|
|
|
|
//
|
|
// BULLISH ...
|
|
|
|
//
|
|
bool IsHullUpBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
conditions.xmanInfo.hullUps[index] > conditions.xmanInfo.hullUps[index + 1]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsHullUpSwitchedToBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsHullUpBullish(conditions, index) &&
|
|
!IsHullUpBullish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// BEARISH ...
|
|
|
|
//
|
|
bool IsHullUpBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
conditions.xmanInfo.hullUps[index] < conditions.xmanInfo.hullUps[index + 1]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsHullUpSwitchedToBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsHullUpBearish(conditions, index) &&
|
|
!IsHullUpBearish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// DOWN ...
|
|
|
|
//
|
|
// BULLISH ...
|
|
|
|
//
|
|
bool IsHullDownBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
conditions.xmanInfo.hullDowns[index] > conditions.xmanInfo.hullDowns[index + 1]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsHullDownSwitchedToBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsHullDownBullish(conditions, index) &&
|
|
!IsHullDownBullish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// BEARISH ...
|
|
|
|
//
|
|
bool IsHullDownBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
conditions.xmanInfo.hullDowns[index] < conditions.xmanInfo.hullDowns[index + 1]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsHullDownSwitchedToBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsHullDownBearish(conditions, index) &&
|
|
!IsHullDownBearish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// TREND ...
|
|
//
|
|
|
|
//
|
|
// Check Trend Bullish ...
|
|
bool IsTrendBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
conditions.candles[index].low > conditions.xmanInfo.trends[index]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// Check Trend Switched To Bullish ...
|
|
bool IsTrendSwitchedToBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsTrendBullish(conditions, index) &&
|
|
!IsTrendBullish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// Check Trend Bearish ...
|
|
bool IsTrendBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
conditions.candles[index].high < conditions.xmanInfo.trends[index]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// Check Trend Switched To Bearish ...
|
|
bool IsTrendSwitchedToBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsTrendBearish(conditions, index) &&
|
|
!IsTrendBearish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// RIBBON ...
|
|
//
|
|
|
|
//
|
|
double GetRibbonMax(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
double result = 0;
|
|
|
|
//
|
|
result = MathMax(conditions.xmanInfo.ribbon1s[index], conditions.xmanInfo.ribbon2s[index]);
|
|
result = MathMax(result, conditions.xmanInfo.ribbon3s[index]);
|
|
result = MathMax(result, conditions.xmanInfo.ribbon4s[index]);
|
|
result = MathMax(result, conditions.xmanInfo.ribbon5s[index]);
|
|
result = MathMax(result, conditions.xmanInfo.ribbon6s[index]);
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
double GetRibbonMin(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
double result = 0;
|
|
|
|
//
|
|
result = MathMin(conditions.xmanInfo.ribbon1s[index], conditions.xmanInfo.ribbon2s[index]);
|
|
result = MathMin(result, conditions.xmanInfo.ribbon3s[index]);
|
|
result = MathMin(result, conditions.xmanInfo.ribbon4s[index]);
|
|
result = MathMin(result, conditions.xmanInfo.ribbon5s[index]);
|
|
result = MathMin(result, conditions.xmanInfo.ribbon6s[index]);
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// Check Ribbon States ...
|
|
// Working With Price and Ribbon Values ...
|
|
bool IsRibbonBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
conditions.candles[index].low > conditions.xmanInfo.ribbon1s[index] &&
|
|
conditions.candles[index].low > conditions.xmanInfo.ribbon2s[index] &&
|
|
conditions.candles[index].low > conditions.xmanInfo.ribbon3s[index] &&
|
|
conditions.candles[index].low > conditions.xmanInfo.ribbon4s[index] &&
|
|
conditions.candles[index].low > conditions.xmanInfo.ribbon5s[index] &&
|
|
conditions.candles[index].low > conditions.xmanInfo.ribbon6s[index]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// Check Ribbons Sequntial Statements ...
|
|
// Working with Price and Ribbon Values and also Ribbon Orders
|
|
bool IsRibbonOrderBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsRibbonBullish(conditions, index)
|
|
//
|
|
&&
|
|
//
|
|
GetRibbonMax(conditions, index) == conditions.xmanInfo.ribbon1s[index]
|
|
//
|
|
&&
|
|
//
|
|
GetRibbonMin(conditions, index) == conditions.xmanInfo.ribbon6s[index]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsRibbonSwitchedToBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsRibbonBullish(conditions, index) &&
|
|
!IsRibbonBullish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// Check Ribbons Sequntial Statements ...
|
|
bool IsRibbonOrderSwitchedToBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsRibbonOrderBullish(conditions, index) &&
|
|
!IsRibbonOrderBullish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// Check Ribbon States ...
|
|
// Working With Price and Ribbon Values ...
|
|
bool IsRibbonBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
conditions.candles[index].high < conditions.xmanInfo.ribbon1s[index] &&
|
|
conditions.candles[index].high < conditions.xmanInfo.ribbon2s[index] &&
|
|
conditions.candles[index].high < conditions.xmanInfo.ribbon3s[index] &&
|
|
conditions.candles[index].high < conditions.xmanInfo.ribbon4s[index] &&
|
|
conditions.candles[index].high < conditions.xmanInfo.ribbon5s[index] &&
|
|
conditions.candles[index].high < conditions.xmanInfo.ribbon6s[index]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// Check Ribbons Sequntial Statements ...
|
|
// Working with Price and Ribbon Values and also Ribbon Orders
|
|
bool IsRibbonOrderBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsRibbonBearish(conditions, index)
|
|
//
|
|
&&
|
|
//
|
|
GetRibbonMax(conditions, index) == conditions.xmanInfo.ribbon1s[index]
|
|
//
|
|
&&
|
|
//
|
|
GetRibbonMin(conditions, index) == conditions.xmanInfo.ribbon6s[index]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsRibbonSwitchedToBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsRibbonBearish(conditions, index) &&
|
|
!IsRibbonBearish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// Check Ribbons Sequntial Statements ...
|
|
bool IsRibbonOrderSwitchedToBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsRibbonOrderBearish(conditions, index) &&
|
|
!IsRibbonOrderBearish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// PEAKS and VALES and Levels ...
|
|
//
|
|
|
|
//
|
|
// Check New Peaks Happens ...
|
|
bool IsNewPeak(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
conditions.xmanInfo.peaks[index] != EMPTY_VALUE &&
|
|
conditions.xmanInfo.peaks[index] != conditions.xmanInfo.peaks[index + 1]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// Check New Peaks Happens Over Last ...
|
|
bool IsNewPeakOverLast(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsNewPeak(conditions, index) &&
|
|
conditions.xmanInfo.peaks[index] > conditions.xmanInfo.peaks[index + 1]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// Check New Peaks Happens Under Last ...
|
|
bool IsNewPeakUnderLast(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsNewPeak(conditions, index) &&
|
|
conditions.xmanInfo.peaks[index] < conditions.xmanInfo.peaks[index + 1]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// Check New Vales Happens ...
|
|
bool IsNewVale(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
conditions.xmanInfo.vales[index] != EMPTY_VALUE &&
|
|
conditions.xmanInfo.vales[index] != conditions.xmanInfo.vales[index + 1]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// Check New Vales Happens Over Last ...
|
|
bool IsNewValeOverLast(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsNewVale(conditions, index) &&
|
|
conditions.xmanInfo.vales[index] > conditions.xmanInfo.vales[index + 1]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// Check New Vales Happens Under Last ...
|
|
bool IsNewValeUnderLast(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsNewVale(conditions, index) &&
|
|
conditions.xmanInfo.vales[index] < conditions.xmanInfo.vales[index + 1]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// Market Cycles ...
|
|
|
|
//
|
|
// ALL Cycles ...
|
|
|
|
//
|
|
bool IsCyclesBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsSCBullish(conditions, index) &&
|
|
IsMCBullish(conditions, index) &&
|
|
IsLCBullish(conditions, index) &&
|
|
IsHCBullish(conditions, index)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsCyclesSwitchedToBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsCyclesBullish(conditions, index) &&
|
|
!IsCyclesBullish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsCyclesBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsSCBearish(conditions, index) &&
|
|
IsMCBearish(conditions, index) &&
|
|
IsLCBearish(conditions, index) &&
|
|
IsHCBearish(conditions, index)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsCyclesSwitchedToBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsCyclesBearish(conditions, index) &&
|
|
!IsCyclesBearish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsCyclesLowBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsSCLowBullish(conditions, index) &&
|
|
IsMCLowBullish(conditions, index) &&
|
|
IsLCLowBullish(conditions, index) &&
|
|
IsHCLowBullish(conditions, index)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsCyclesLowSwitchedToBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsCyclesLowBullish(conditions, index) &&
|
|
!IsCyclesLowBullish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsCyclesLowBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsSCLowBearish(conditions, index) &&
|
|
IsMCLowBearish(conditions, index) &&
|
|
IsLCLowBearish(conditions, index) &&
|
|
IsHCLowBearish(conditions, index)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsCyclesLowSwitchedToBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsCyclesLowBearish(conditions, index) &&
|
|
!IsCyclesLowBearish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsCyclesHighBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsSCHighBullish(conditions, index) &&
|
|
IsMCHighBullish(conditions, index) &&
|
|
IsLCHighBullish(conditions, index) &&
|
|
IsHCHighBullish(conditions, index)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsCyclesHighSwitchedToBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsCyclesHighBullish(conditions, index) &&
|
|
!IsCyclesHighBullish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsCyclesHighBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsSCHighBearish(conditions, index) &&
|
|
IsMCHighBearish(conditions, index) &&
|
|
IsLCHighBearish(conditions, index) &&
|
|
IsHCHighBearish(conditions, index)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsCyclesHighSwitchedToBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsCyclesHighBearish(conditions, index) &&
|
|
!IsCyclesHighBearish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// INHIND Cycles ...
|
|
|
|
//
|
|
bool IsInHindCyclesBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsSCBullish(conditions, index) &&
|
|
IsMCBullish(conditions, index) &&
|
|
IsLCBullish(conditions, index)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsInHindCyclesSwitchedToBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsInHindCyclesBullish(conditions, index) &&
|
|
!IsInHindCyclesBullish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsInHindCyclesBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsSCBearish(conditions, index) &&
|
|
IsMCBearish(conditions, index) &&
|
|
IsLCBearish(conditions, index)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsInHindCyclesSwitchedToBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsInHindCyclesBearish(conditions, index) &&
|
|
!IsInHindCyclesBearish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsInHindCyclesLowBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsSCLowBullish(conditions, index) &&
|
|
IsMCLowBullish(conditions, index) &&
|
|
IsLCLowBullish(conditions, index)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsInHindCyclesLowSwitchedToBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsInHindCyclesLowBullish(conditions, index) &&
|
|
!IsInHindCyclesLowBullish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsInHindCyclesHighBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsSCHighBullish(conditions, index) &&
|
|
IsMCHighBullish(conditions, index) &&
|
|
IsLCHighBullish(conditions, index)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsInHindCyclesHighSwitchedToBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsInHindCyclesHighBullish(conditions, index) &&
|
|
!IsInHindCyclesHighBullish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// INLONG Cycles ...
|
|
|
|
//
|
|
bool IsInLongCyclesBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsSCBullish(conditions, index) &&
|
|
IsMCBullish(conditions, index)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsInLongCyclesSwitchedToBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsInLongCyclesBullish(conditions, index) &&
|
|
!IsInLongCyclesBullish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsInLongCyclesBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsSCBearish(conditions, index) &&
|
|
IsMCBearish(conditions, index)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsInLongCyclesSwitchedToBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsInLongCyclesBearish(conditions, index) &&
|
|
!IsInLongCyclesBearish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// SHORT ...
|
|
|
|
//
|
|
bool IsSCBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsSCHighBullish(conditions, index) &&
|
|
IsSCLowBullish(conditions, index)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsSCSwitchedToBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsSCBullish(conditions, index) &&
|
|
!IsSCBullish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsSCBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsSCHighBearish(conditions, index) &&
|
|
IsSCLowBearish(conditions, index)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsSCSwitchedToBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsSCBearish(conditions, index) &&
|
|
!IsSCBearish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// SHORT HIGH ...
|
|
|
|
//
|
|
bool IsSCHighBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
conditions.xmanInfo.sHHs[index] > conditions.xmanInfo.sHHs[index + 1]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsSCHighSwitchedBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsSCHighBullish(conditions, index) &&
|
|
!IsSCHighBullish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsSCHighBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
conditions.xmanInfo.sHHs[index] < conditions.xmanInfo.sHHs[index + 1]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsSCHighSwitchedToBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsSCHighBearish(conditions, index) &&
|
|
!IsSCHighBearish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// SHORT LOW ...
|
|
|
|
//
|
|
bool IsSCLowBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
conditions.xmanInfo.sLLs[index] > conditions.xmanInfo.sLLs[index + 1]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsSCLowSwitchedBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsSCLowBullish(conditions, index) &&
|
|
!IsSCLowBullish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsSCLowBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
conditions.xmanInfo.sLLs[index] < conditions.xmanInfo.sLLs[index + 1]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsSCLowSwitchedToBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsSCLowBearish(conditions, index) &&
|
|
!IsSCLowBearish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// MEDIUM ...
|
|
|
|
//
|
|
bool IsMCBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsMCHighBullish(conditions, index) &&
|
|
IsMCLowBullish(conditions, index)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsMCSwitchedToBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsMCBullish(conditions, index) &&
|
|
!IsMCBullish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsMCBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsMCHighBearish(conditions, index) &&
|
|
IsMCLowBearish(conditions, index)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsMCSwitchedToBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsMCBearish(conditions, index) &&
|
|
!IsMCBearish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// MEDIUM HIGH ...
|
|
|
|
//
|
|
bool IsMCHighBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
conditions.xmanInfo.mHHs[index] > conditions.xmanInfo.mHHs[index + 1]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsMCHighSwitchedBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsMCHighBullish(conditions, index) &&
|
|
!IsMCHighBullish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsMCHighBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
conditions.xmanInfo.mHHs[index] < conditions.xmanInfo.mHHs[index + 1]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsMCHighSwitchedToBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsMCHighBearish(conditions, index) &&
|
|
!IsMCHighBearish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// MEDIUM LOW ...
|
|
|
|
//
|
|
bool IsMCLowBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
conditions.xmanInfo.mLLs[index] > conditions.xmanInfo.mLLs[index + 1]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsMCLowSwitchedBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsMCLowBullish(conditions, index) &&
|
|
!IsMCLowBullish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsMCLowBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
conditions.xmanInfo.mLLs[index] < conditions.xmanInfo.mLLs[index + 1]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsMCLowSwitchedToBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsMCLowBearish(conditions, index) &&
|
|
!IsMCLowBearish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// LONG ...
|
|
|
|
//
|
|
bool IsLCBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsLCHighBullish(conditions, index) &&
|
|
IsLCLowBullish(conditions, index)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsLCSwitchedToBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsLCBullish(conditions, index) &&
|
|
!IsLCBullish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsLCBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsLCHighBearish(conditions, index) &&
|
|
IsLCLowBearish(conditions, index)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsLCSwitchedToBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsLCBearish(conditions, index) &&
|
|
!IsLCBearish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// LONG HIGH ...
|
|
|
|
//
|
|
bool IsLCHighBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
conditions.xmanInfo.lHHs[index] > conditions.xmanInfo.lHHs[index + 1]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsLCHighSwitchedBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsLCHighBullish(conditions, index) &&
|
|
!IsLCHighBullish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsLCHighBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
conditions.xmanInfo.lHHs[index] < conditions.xmanInfo.lHHs[index + 1]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsLCHighSwitchedToBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsLCHighBearish(conditions, index) &&
|
|
!IsLCHighBearish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// LONG LOW ...
|
|
|
|
//
|
|
bool IsLCLowBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
conditions.xmanInfo.lLLs[index] > conditions.xmanInfo.lLLs[index + 1]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsLCLowSwitchedBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsLCLowBullish(conditions, index) &&
|
|
!IsLCLowBullish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsLCLowBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
conditions.xmanInfo.lLLs[index] < conditions.xmanInfo.lLLs[index + 1]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsLCLowSwitchedToBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsLCLowBearish(conditions, index) &&
|
|
!IsLCLowBearish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// HIND ...
|
|
|
|
//
|
|
bool IsHCBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsHCHighBullish(conditions, index) &&
|
|
IsHCLowBullish(conditions, index)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsHCSwitchedToBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsHCBullish(conditions, index) &&
|
|
!IsHCBullish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsHCBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsHCHighBearish(conditions, index) &&
|
|
IsHCLowBearish(conditions, index)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsHCSwitchedToBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsHCBearish(conditions, index) &&
|
|
!IsHCBearish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// HIND HIGH ...
|
|
|
|
//
|
|
bool IsHCHighBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
conditions.xmanInfo.hHHs[index] > conditions.xmanInfo.hHHs[index + 1]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsHCHighSwitchedBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsHCHighBullish(conditions, index) &&
|
|
!IsHCHighBullish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsHCHighBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
conditions.xmanInfo.hHHs[index] < conditions.xmanInfo.hHHs[index + 1]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsHCHighSwitchedToBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsHCHighBearish(conditions, index) &&
|
|
!IsHCHighBearish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// HIND LOW ...
|
|
|
|
//
|
|
bool IsHCLowBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
conditions.xmanInfo.hLLs[index] > conditions.xmanInfo.hLLs[index + 1]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsHCLowSwitchedBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsHCLowBullish(conditions, index) &&
|
|
!IsHCLowBullish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsHCLowBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
conditions.xmanInfo.hLLs[index] < conditions.xmanInfo.hLLs[index + 1]
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsHCLowSwitchedToBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsHCLowBearish(conditions, index) &&
|
|
!IsHCLowBearish(conditions, index + 1)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// END Functions ...
|
|
//
|
|
|
|
//
|
|
// START Combination ....
|
|
//
|
|
|
|
//
|
|
bool IsMarketBullish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
IsHullBullish(conditions, index) &&
|
|
IsSSLCBullish(conditions, index) &&
|
|
IsTrendBullish(conditions, index) &&
|
|
IsRibbonOrderBullish(conditions, index)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
bool IsMarketBearish(
|
|
X121MarketConditions &conditions, // Specified Conditions
|
|
int index = 0 // Array Index
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
false
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// END Combination ....
|
|
//
|