cleanup x121 helper, apply all cleanup and buffers and conditions on helpers and try to complete x121 new helper ...
This commit is contained in:
+1328
-3181
File diff suppressed because it is too large
Load Diff
@@ -316,7 +316,100 @@ struct X121X3MAConditions
|
||||
bearishScore = 0;
|
||||
|
||||
//
|
||||
// TODO: Implement if Required ...
|
||||
double score = 1;
|
||||
double minScore = 0.5;
|
||||
double highScore = 1.5;
|
||||
|
||||
//
|
||||
// X3MA ...
|
||||
|
||||
//
|
||||
if (isX3MaBullishState)
|
||||
{
|
||||
bullishScore += score;
|
||||
}
|
||||
if (isX3MaBullishOrdered)
|
||||
{
|
||||
bullishScore += score;
|
||||
}
|
||||
if (isX3MaSwitchedToBullishState)
|
||||
{
|
||||
bullishScore += highScore;
|
||||
}
|
||||
if (isX3MaSwitchedToBullishOrdered)
|
||||
{
|
||||
bullishScore += highScore;
|
||||
}
|
||||
if (!isX3MaBullishState &&
|
||||
!isX3MaSwitchedToBullishState)
|
||||
{
|
||||
//
|
||||
if (isX3MaFastBullish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isX3MaSlowBullish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
}
|
||||
if (!isX3MaBullishOrdered &&
|
||||
!isX3MaSwitchedToBullishOrdered)
|
||||
{
|
||||
//
|
||||
if (isX3MaFastOverMid)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isX3MaMidOverSlow)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
if (isX3MaBearishState)
|
||||
{
|
||||
bearishScore += score;
|
||||
}
|
||||
if (isX3MaBearishOrdered)
|
||||
{
|
||||
bearishScore += score;
|
||||
}
|
||||
if (isX3MaSwitchedToBearishState)
|
||||
{
|
||||
bearishScore += highScore;
|
||||
}
|
||||
if (isX3MaSwitchedToBearishOrdered)
|
||||
{
|
||||
bearishScore += highScore;
|
||||
}
|
||||
if (!isX3MaBearishState &&
|
||||
!isX3MaSwitchedToBearishState)
|
||||
{
|
||||
//
|
||||
if (isX3MaFastBearish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isX3MaSlowBearish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
}
|
||||
if (!isX3MaBearishOrdered &&
|
||||
!isX3MaSwitchedToBearishOrdered)
|
||||
{
|
||||
//
|
||||
if (isX3MaFastUnderMid)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isX3MaMidUnderSlow)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -370,6 +463,9 @@ struct X121X3MAConditions
|
||||
//
|
||||
string conditionsStr =
|
||||
//
|
||||
"-----------------------" + separator +
|
||||
"X3MA: " + separator +
|
||||
"-----------------------" + separator +
|
||||
ToString("isX3MaFastBullish", isX3MaFastBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isX3MaFastBearish", isX3MaFastBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isX3MaFastNeutural", isX3MaFastNeutural, ignoreFalseConditions, separator) +
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -202,14 +202,6 @@ struct X121XCHEConditions
|
||||
bool isCheSwitchedToBullish;
|
||||
bool isCheSwitchedToBearish;
|
||||
|
||||
//
|
||||
bool isClosedOverCheMin;
|
||||
bool isClosedOverCheMax;
|
||||
|
||||
//
|
||||
bool isClosedUnderCheMin;
|
||||
bool isClosedUnderCheMax;
|
||||
|
||||
//
|
||||
// Constructor ...
|
||||
X121XCHEConditions()
|
||||
@@ -281,14 +273,6 @@ struct X121XCHEConditions
|
||||
isCheSwitchedToBullish = false;
|
||||
isCheSwitchedToBearish = false;
|
||||
|
||||
//
|
||||
isClosedOverCheMin = false;
|
||||
isClosedOverCheMax = false;
|
||||
|
||||
//
|
||||
isClosedUnderCheMin = false;
|
||||
isClosedUnderCheMax = false;
|
||||
|
||||
//
|
||||
ZeroMemory(this);
|
||||
}
|
||||
@@ -309,7 +293,56 @@ struct X121XCHEConditions
|
||||
bearishScore = 0;
|
||||
|
||||
//
|
||||
// TODO: Implement if Required ...
|
||||
double score = 1;
|
||||
double minScore = 0.5;
|
||||
double highScore = 1.5;
|
||||
|
||||
//
|
||||
// XCHE ...
|
||||
|
||||
//
|
||||
if (isCheBullish)
|
||||
{
|
||||
bullishScore += score;
|
||||
}
|
||||
if (isCheSwitchedToBullish)
|
||||
{
|
||||
bullishScore += highScore;
|
||||
}
|
||||
if (isChe1Bullish &&
|
||||
!isCheBullish &&
|
||||
!isCheSwitchedToBullish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isChe1SwitchedToBullish &&
|
||||
!isCheBullish &&
|
||||
!isCheSwitchedToBullish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
|
||||
//
|
||||
if (isCheBearish)
|
||||
{
|
||||
bearishScore += score;
|
||||
}
|
||||
if (isCheSwitchedToBearish)
|
||||
{
|
||||
bearishScore += highScore;
|
||||
}
|
||||
if (isChe1Bearish &&
|
||||
!isCheBearish &&
|
||||
!isCheSwitchedToBearish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isChe1SwitchedToBearish &&
|
||||
!isCheBearish &&
|
||||
!isCheSwitchedToBearish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -363,6 +396,9 @@ struct X121XCHEConditions
|
||||
//
|
||||
string conditionsStr =
|
||||
//
|
||||
"-----------------------" + separator +
|
||||
"XCHE: " + separator +
|
||||
"-----------------------" + separator +
|
||||
ToString("isChe1Bullish", isChe1Bullish, ignoreFalseConditions, separator) +
|
||||
ToString("isChe1Bearish", isChe1Bearish, ignoreFalseConditions, separator) +
|
||||
ToString("isChe1SwitchedToBullish", isChe1SwitchedToBullish, ignoreFalseConditions, separator) +
|
||||
@@ -375,10 +411,6 @@ struct X121XCHEConditions
|
||||
ToString("isCheBearish", isCheBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isCheSwitchedToBullish", isCheSwitchedToBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isCheSwitchedToBearish", isCheSwitchedToBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isClosedOverCheMin", isClosedOverCheMin, ignoreFalseConditions, separator) +
|
||||
ToString("isClosedOverCheMax", isClosedOverCheMax, ignoreFalseConditions, separator) +
|
||||
ToString("isClosedUnderCheMin", isClosedUnderCheMin, ignoreFalseConditions, separator) +
|
||||
ToString("isClosedUnderCheMax", isClosedUnderCheMax, ignoreFalseConditions, separator) +
|
||||
//
|
||||
""
|
||||
//
|
||||
@@ -979,42 +1011,6 @@ class XCX121XCHEHelper : public XCBaseHelper
|
||||
int pIndex = cIndex + 1;
|
||||
int ppIndex = pIndex + 1;
|
||||
|
||||
//
|
||||
XOHCL zBar;
|
||||
result = zBar.Init(
|
||||
mSymbol,
|
||||
mPeriod,
|
||||
zIndex //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL cBar;
|
||||
result = cBar.Init(
|
||||
mSymbol,
|
||||
mPeriod,
|
||||
cIndex //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL pBar;
|
||||
result = pBar.Init(
|
||||
mSymbol,
|
||||
mPeriod,
|
||||
pIndex //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Buffers ...
|
||||
|
||||
@@ -1178,12 +1174,6 @@ class XCX121XCHEHelper : public XCBaseHelper
|
||||
double cheMin = GetMin(ches);
|
||||
double cheMax = GetMax(ches);
|
||||
|
||||
//
|
||||
bool isClosedOverCheMin = cBar.close > cheMin;
|
||||
bool isClosedOverCheMax = cBar.close > cheMax;
|
||||
bool isClosedUnderCheMin = cBar.close < cheMin;
|
||||
bool isClosedUnderCheMax = cBar.close < cheMax;
|
||||
|
||||
//
|
||||
conditions.isChe1Bullish = isChe1Bullish;
|
||||
conditions.isChe1Bearish = isChe1Bearish;
|
||||
@@ -1197,19 +1187,10 @@ class XCX121XCHEHelper : public XCBaseHelper
|
||||
conditions.isCheBearish = isCheBearish;
|
||||
conditions.isCheSwitchedToBullish = isCheSwitchedToBullish;
|
||||
conditions.isCheSwitchedToBearish = isCheSwitchedToBearish;
|
||||
conditions.isClosedOverCheMin = isClosedOverCheMin;
|
||||
conditions.isClosedOverCheMax = isClosedOverCheMax;
|
||||
conditions.isClosedUnderCheMin = isClosedUnderCheMin;
|
||||
conditions.isClosedUnderCheMax = isClosedUnderCheMax;
|
||||
|
||||
//
|
||||
Cleanup();
|
||||
|
||||
//
|
||||
zBar.Clean();
|
||||
cBar.Clean();
|
||||
pBar.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -245,7 +245,44 @@ struct X121XDELTAConditions
|
||||
bearishScore = 0;
|
||||
|
||||
//
|
||||
// TODO: Implement if Required ...
|
||||
double score = 1;
|
||||
double minScore = 0.5;
|
||||
double highScore = 1.5;
|
||||
|
||||
//
|
||||
if (isDeltaOverMa)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isDeltaBullish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isDeltaCrossedOverMa)
|
||||
{
|
||||
bullishScore += score;
|
||||
}
|
||||
if (isDeltaSwitchedToBullish)
|
||||
{
|
||||
bullishScore += score;
|
||||
}
|
||||
|
||||
if (isDeltaBearish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isDeltaUnderMa)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isDeltaCrossedUnderMa)
|
||||
{
|
||||
bearishScore += score;
|
||||
}
|
||||
if (isDeltaSwitchedToBearish)
|
||||
{
|
||||
bearishScore += score;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -299,6 +336,17 @@ struct X121XDELTAConditions
|
||||
//
|
||||
string conditionsStr =
|
||||
//
|
||||
"-----------------------" + separator +
|
||||
"XDELTA: " + separator +
|
||||
"-----------------------" + separator +
|
||||
ToString("isDeltaBullish", isDeltaBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isDeltaBearish", isDeltaBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isDeltaSwitchedToBullish", isDeltaSwitchedToBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isDeltaSwitchedToBearish", isDeltaSwitchedToBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isDeltaOverMa", isDeltaOverMa, ignoreFalseConditions, separator) +
|
||||
ToString("isDeltaUnderMa", isDeltaUnderMa, ignoreFalseConditions, separator) +
|
||||
ToString("isDeltaCrossedOverMa", isDeltaCrossedOverMa, ignoreFalseConditions, separator) +
|
||||
ToString("isDeltaCrossedUnderMa", isDeltaCrossedUnderMa, ignoreFalseConditions, separator) +
|
||||
//
|
||||
""
|
||||
//
|
||||
@@ -607,6 +655,12 @@ class XCX121XDELTAHelper : public XCBaseHelper
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
void Free() override
|
||||
{
|
||||
Cleanup(10);
|
||||
}
|
||||
|
||||
//
|
||||
bool GetConditions(
|
||||
X121XDELTAConditions &conditions, //
|
||||
@@ -637,42 +691,6 @@ class XCX121XDELTAHelper : public XCBaseHelper
|
||||
int pIndex = cIndex + 1;
|
||||
int ppIndex = pIndex + 1;
|
||||
|
||||
//
|
||||
XOHCL zBar;
|
||||
result = zBar.Init(
|
||||
mSymbol,
|
||||
mPeriod,
|
||||
zIndex //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL cBar;
|
||||
result = cBar.Init(
|
||||
mSymbol,
|
||||
mPeriod,
|
||||
cIndex //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL pBar;
|
||||
result = pBar.Init(
|
||||
mSymbol,
|
||||
mPeriod,
|
||||
pIndex //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Buffers ...
|
||||
|
||||
@@ -744,11 +762,6 @@ class XCX121XDELTAHelper : public XCBaseHelper
|
||||
//
|
||||
Cleanup();
|
||||
|
||||
//
|
||||
zBar.Clean();
|
||||
cBar.Clean();
|
||||
pBar.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -934,42 +934,6 @@ class XCX121XDONHelper : public XCBaseHelper
|
||||
int pIndex = cIndex + 1;
|
||||
int ppIndex = pIndex + 1;
|
||||
|
||||
//
|
||||
XOHCL zBar;
|
||||
result = zBar.Init(
|
||||
mSymbol,
|
||||
mPeriod,
|
||||
zIndex //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL cBar;
|
||||
result = cBar.Init(
|
||||
mSymbol,
|
||||
mPeriod,
|
||||
cIndex //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL pBar;
|
||||
result = pBar.Init(
|
||||
mSymbol,
|
||||
mPeriod,
|
||||
pIndex //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Buffers ...
|
||||
|
||||
@@ -1039,11 +1003,6 @@ class XCX121XDONHelper : public XCBaseHelper
|
||||
//
|
||||
Cleanup();
|
||||
|
||||
//
|
||||
zBar.Clean();
|
||||
cBar.Clean();
|
||||
pBar.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ struct X121XHKInputs
|
||||
//
|
||||
result =
|
||||
//
|
||||
true
|
||||
xhkSmoothingLength > 0
|
||||
//
|
||||
;
|
||||
|
||||
@@ -268,7 +268,69 @@ struct X121XHKConditions
|
||||
bearishScore = 0;
|
||||
|
||||
//
|
||||
// TODO: Implement if Required ...
|
||||
double score = 1;
|
||||
double minScore = 0.5;
|
||||
double highScore = 1.5;
|
||||
|
||||
//
|
||||
if (isSMHKBullish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isRawHKBullish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isClosedOverSMHK)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isClosedOverRawHK)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isRawHKClosedOverSMHK)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isSMHKSwitchedToBullish)
|
||||
{
|
||||
bullishScore += highScore;
|
||||
}
|
||||
if (isRawHKSwitchedToBullish)
|
||||
{
|
||||
bullishScore += highScore;
|
||||
}
|
||||
|
||||
//
|
||||
if (isSMHKBearish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isRawHKBearish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isClosedUnderSMHK)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isClosedUnderRawHK)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isRawHKClosedUnderSMHK)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isSMHKSwitchedToBearish)
|
||||
{
|
||||
bearishScore += highScore;
|
||||
}
|
||||
if (isRawHKSwitchedToBullish)
|
||||
{
|
||||
bearishScore += highScore;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -322,6 +384,9 @@ struct X121XHKConditions
|
||||
//
|
||||
string conditionsStr =
|
||||
//
|
||||
"-----------------------" + separator +
|
||||
"XHK: " + separator +
|
||||
"-----------------------" + separator +
|
||||
ToString("isSMHKBullish", isSMHKBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isRawHKBullish", isRawHKBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isSMHKSwitchedToBullish", isSMHKSwitchedToBullish, ignoreFalseConditions, separator) +
|
||||
|
||||
@@ -287,7 +287,45 @@ struct X121XICHConditions
|
||||
bearishScore = 0;
|
||||
|
||||
//
|
||||
// TODO: Implement if Required ...
|
||||
double score = 1;
|
||||
double minScore = 0.5;
|
||||
double highScore = 1.5;
|
||||
|
||||
//
|
||||
if (isSenkouSpanAOverB)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isTenkanSenOverKijunSen)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isSenkouSpanACrossedOverB)
|
||||
{
|
||||
bullishScore += highScore;
|
||||
}
|
||||
if (isTenkanSenCrossedOverKijunSen)
|
||||
{
|
||||
bullishScore += highScore;
|
||||
}
|
||||
|
||||
//
|
||||
if (isSenkouSpanAUnderB)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isTenkanSenUnderKijunSen)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isSenkouSpanACrossedUnderB)
|
||||
{
|
||||
bearishScore += highScore;
|
||||
}
|
||||
if (isTenkanSenCrossedUnderKijunSen)
|
||||
{
|
||||
bearishScore += highScore;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -341,6 +379,9 @@ struct X121XICHConditions
|
||||
//
|
||||
string conditionsStr =
|
||||
//
|
||||
"-----------------------" + separator +
|
||||
"XICH: " + separator +
|
||||
"-----------------------" + separator +
|
||||
ToString("isTenkanSenOverKijunSen", isTenkanSenOverKijunSen, ignoreFalseConditions, separator) +
|
||||
ToString("isTenkanSenUnderKijunSen", isTenkanSenUnderKijunSen, ignoreFalseConditions, separator) +
|
||||
ToString("isTenkanSenCrossedOverKijunSen", isTenkanSenCrossedOverKijunSen, ignoreFalseConditions, separator) +
|
||||
|
||||
@@ -583,6 +583,12 @@ class XCX121XMASHelper : public XCBaseHelper
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
void Free() override
|
||||
{
|
||||
Cleanup(10);
|
||||
}
|
||||
|
||||
//
|
||||
bool GetConditions(
|
||||
X121XMASConditions &conditions, //
|
||||
|
||||
@@ -204,7 +204,7 @@ struct X121XPVInputs
|
||||
// Boundary Detection ...
|
||||
hhMode = MODE_HIGH;
|
||||
llMode = MODE_LOW;
|
||||
goldenZoneLevel = X_FIBO_LEVEL_382;
|
||||
goldenZoneLevel = X_FIBO_LEVEL_236;
|
||||
|
||||
//
|
||||
sarStep = 0.02;
|
||||
@@ -441,7 +441,29 @@ struct X121XPVConditions
|
||||
bearishScore = 0;
|
||||
|
||||
//
|
||||
// TODO: Implement if Required ...
|
||||
double score = 1;
|
||||
double minScore = 0.5;
|
||||
double highScore = 1.5;
|
||||
|
||||
//
|
||||
if (isSarBullish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isSarSwitchedToBullish)
|
||||
{
|
||||
bullishScore += score;
|
||||
}
|
||||
|
||||
//
|
||||
if (isSarBearish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isSarSwitchedToBearish)
|
||||
{
|
||||
bearishScore += score;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -495,6 +517,9 @@ struct X121XPVConditions
|
||||
//
|
||||
string conditionsStr =
|
||||
//
|
||||
"-----------------------" + separator +
|
||||
"XPV: " + separator +
|
||||
"-----------------------" + separator +
|
||||
ToString("isSarBullish", isSarBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isSarBearish", isSarBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isSarSwitchedToBullish", isSarSwitchedToBullish, ignoreFalseConditions, separator) +
|
||||
|
||||
@@ -238,7 +238,29 @@ struct X121XSTRConditions
|
||||
bearishScore = 0;
|
||||
|
||||
//
|
||||
// TODO: Implement if Required ...
|
||||
double score = 1;
|
||||
double minScore = 0.5;
|
||||
double highScore = 1.5;
|
||||
|
||||
//
|
||||
if (isStrBullish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isStrSwitchedToBullish)
|
||||
{
|
||||
bullishScore += score;
|
||||
}
|
||||
|
||||
//
|
||||
if (isStrBearish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isStrSwitchedToBearish)
|
||||
{
|
||||
bearishScore += score;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -292,6 +314,9 @@ struct X121XSTRConditions
|
||||
//
|
||||
string conditionsStr =
|
||||
//
|
||||
"-----------------------" + separator +
|
||||
"XSTR: " + separator +
|
||||
"-----------------------" + separator +
|
||||
ToString("isStrBullish", isStrBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isStrBearish", isStrBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isStrSwitchedToBullish", isStrSwitchedToBullish, ignoreFalseConditions, separator) +
|
||||
@@ -952,14 +977,14 @@ class XCX121XSTRHelper : public XCBaseHelper
|
||||
conditions.isStrBearish = isStrBearish;
|
||||
conditions.isStrSwitchedToBullish = isStrSwitchedToBullish;
|
||||
conditions.isStrSwitchedToBearish = isStrSwitchedToBearish;
|
||||
|
||||
|
||||
//
|
||||
Cleanup();
|
||||
|
||||
//
|
||||
zBar.Clean();
|
||||
cBar.Clean();
|
||||
pBar.Clean();
|
||||
pBar.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
|
||||
@@ -275,7 +275,29 @@ struct X121XTRENDConditions
|
||||
bearishScore = 0;
|
||||
|
||||
//
|
||||
// TODO: Implement if Required ...
|
||||
double score = 1;
|
||||
double minScore = 0.5;
|
||||
double highScore = 1.5;
|
||||
|
||||
//
|
||||
if (isTrendBullish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isTrendSwitchedToBullish)
|
||||
{
|
||||
bullishScore += score;
|
||||
}
|
||||
|
||||
//
|
||||
if (isTrendBearish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isTrendSwitchedToBearish)
|
||||
{
|
||||
bearishScore += score;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -329,6 +351,9 @@ struct X121XTRENDConditions
|
||||
//
|
||||
string conditionsStr =
|
||||
//
|
||||
"-----------------------" + separator +
|
||||
"XTREND: " + separator +
|
||||
"-----------------------" + separator +
|
||||
ToString("isTrendBullish", isTrendBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isTrendBearish", isTrendBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isTrendSwitchedToBullish", isTrendSwitchedToBullish, ignoreFalseConditions, separator) +
|
||||
|
||||
@@ -303,7 +303,97 @@ struct X121XVOLUMEConditions
|
||||
bearishScore = 0;
|
||||
|
||||
//
|
||||
// TODO: Implement if Required ...
|
||||
double score = 1;
|
||||
double minScore = 0.5;
|
||||
double highScore = 1.5;
|
||||
|
||||
//
|
||||
if (isBullishVolumeOverMa)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isBearishVolumeUnderMa)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isBullishVolumeIncreased)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isBearishVolumeDecreased)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isBullishVolumeMaOverBearishVolumeMa)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
|
||||
//
|
||||
if (isVolumeSwitchedToBullish)
|
||||
{
|
||||
bullishScore += score;
|
||||
}
|
||||
if (isBullishVolumeCrossedOverMa)
|
||||
{
|
||||
bullishScore += score;
|
||||
}
|
||||
if (isBearishVolumeCrossedUnderMa)
|
||||
{
|
||||
bullishScore += score;
|
||||
}
|
||||
if (isBullishVolumeSwitchedToIncreased)
|
||||
{
|
||||
bullishScore += score;
|
||||
}
|
||||
if (isBearishVolumeSwitchedToDecreased)
|
||||
{
|
||||
bullishScore += score;
|
||||
}
|
||||
|
||||
//
|
||||
if (isBearishVolumeOverMa)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isBullishVolumeUnderMa)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isBullishVolumeDecreased)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isBearishVolumeIncreased)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isBullishVolumeMaUnderBearishVolumeMa)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
|
||||
//
|
||||
if (isVolumeSwitchedToBearish)
|
||||
{
|
||||
bearishScore += score;
|
||||
}
|
||||
if (isBearishVolumeCrossedOverMa)
|
||||
{
|
||||
bearishScore += score;
|
||||
}
|
||||
if (isBullishVolumeCrossedUnderMa)
|
||||
{
|
||||
bearishScore += score;
|
||||
}
|
||||
if (isBullishVolumeSwitchedToDecreased)
|
||||
{
|
||||
bearishScore += score;
|
||||
}
|
||||
if (isBearishVolumeSwitchedToIncreased)
|
||||
{
|
||||
bearishScore += score;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -357,6 +447,29 @@ struct X121XVOLUMEConditions
|
||||
//
|
||||
string conditionsStr =
|
||||
//
|
||||
"-----------------------" + separator +
|
||||
"XVOLUME: " + separator +
|
||||
"-----------------------" + separator +
|
||||
ToString("isBullishVolumeOverMa", isBullishVolumeOverMa, ignoreFalseConditions, separator) +
|
||||
ToString("isBullishVolumeCrossedOverMa", isBullishVolumeCrossedOverMa, ignoreFalseConditions, separator) +
|
||||
ToString("isBullishVolumeUnderMa", isBullishVolumeUnderMa, ignoreFalseConditions, separator) +
|
||||
ToString("isBullishVolumeCrossedUnderMa", isBullishVolumeCrossedUnderMa, ignoreFalseConditions, separator) +
|
||||
ToString("isBullishVolumeIncreased", isBullishVolumeIncreased, ignoreFalseConditions, separator) +
|
||||
ToString("isBullishVolumeSwitchedToIncreased", isBullishVolumeSwitchedToIncreased, ignoreFalseConditions, separator) +
|
||||
ToString("isBullishVolumeDecreased", isBullishVolumeDecreased, ignoreFalseConditions, separator) +
|
||||
ToString("isBullishVolumeSwitchedToDecreased", isBullishVolumeSwitchedToDecreased, ignoreFalseConditions, separator) +
|
||||
ToString("isBearishVolumeOverMa", isBearishVolumeOverMa, ignoreFalseConditions, separator) +
|
||||
ToString("isBearishVolumeCrossedOverMa", isBearishVolumeCrossedOverMa, ignoreFalseConditions, separator) +
|
||||
ToString("isBearishVolumeUnderMa", isBearishVolumeUnderMa, ignoreFalseConditions, separator) +
|
||||
ToString("isBearishVolumeCrossedUnderMa", isBearishVolumeCrossedUnderMa, ignoreFalseConditions, separator) +
|
||||
ToString("isBearishVolumeIncreased", isBearishVolumeIncreased, ignoreFalseConditions, separator) +
|
||||
ToString("isBearishVolumeSwitchedToIncreased", isBearishVolumeSwitchedToIncreased, ignoreFalseConditions, separator) +
|
||||
ToString("isBearishVolumeDecreased", isBearishVolumeDecreased, ignoreFalseConditions, separator) +
|
||||
ToString("isBearishVolumeSwitchedToDecreased", isBearishVolumeSwitchedToDecreased, ignoreFalseConditions, separator) +
|
||||
ToString("isVolumeSwitchedToBullish", isVolumeSwitchedToBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isVolumeSwitchedToBearish", isVolumeSwitchedToBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isBullishVolumeMaOverBearishVolumeMa", isBullishVolumeMaOverBearishVolumeMa, ignoreFalseConditions, separator) +
|
||||
ToString("isBullishVolumeMaUnderBearishVolumeMa", isBullishVolumeMaUnderBearishVolumeMa, ignoreFalseConditions, separator) +
|
||||
//
|
||||
""
|
||||
//
|
||||
|
||||
@@ -329,9 +329,98 @@ struct X121XVWAPConditions
|
||||
//
|
||||
bullishScore = 0;
|
||||
bearishScore = 0;
|
||||
//
|
||||
double score = 1;
|
||||
double minScore = 0.5;
|
||||
double highScore = 1.5;
|
||||
|
||||
//
|
||||
// TODO: Implement if Required ...
|
||||
if (isVWapBullishState)
|
||||
{
|
||||
bullishScore += score;
|
||||
}
|
||||
if (isVWapBullishOrdered)
|
||||
{
|
||||
bullishScore += score;
|
||||
}
|
||||
if (isVWapSwitchedToBullishState)
|
||||
{
|
||||
bullishScore += highScore;
|
||||
}
|
||||
if (isVWapSwitchedToBullishOrdered)
|
||||
{
|
||||
bullishScore += highScore;
|
||||
}
|
||||
if (!isVWapBullishState &&
|
||||
!isVWapSwitchedToBullishState)
|
||||
{
|
||||
//
|
||||
if (isVWapFastBullish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isVWapSlowBullish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
}
|
||||
if (!isVWapBullishOrdered &&
|
||||
!isVWapSwitchedToBullishOrdered)
|
||||
{
|
||||
//
|
||||
if (isVWapFastOverMid)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isVWapMidOverSlow)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
if (isVWapBearishState)
|
||||
{
|
||||
bearishScore += score;
|
||||
}
|
||||
if (isVWapBearishOrdered)
|
||||
{
|
||||
bearishScore += score;
|
||||
}
|
||||
if (isVWapSwitchedToBearishState)
|
||||
{
|
||||
bearishScore += highScore;
|
||||
}
|
||||
if (isVWapSwitchedToBearishOrdered)
|
||||
{
|
||||
bearishScore += highScore;
|
||||
}
|
||||
if (!isVWapBearishState &&
|
||||
!isVWapSwitchedToBearishState)
|
||||
{
|
||||
//
|
||||
if (isVWapFastBearish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isVWapSlowBearish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
}
|
||||
if (!isVWapBearishOrdered &&
|
||||
!isVWapSwitchedToBearishOrdered)
|
||||
{
|
||||
//
|
||||
if (isVWapFastUnderMid)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isVWapMidUnderSlow)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -385,6 +474,9 @@ struct X121XVWAPConditions
|
||||
//
|
||||
string conditionsStr =
|
||||
//
|
||||
"-----------------------" + separator +
|
||||
"XVWAP: " + separator +
|
||||
"-----------------------" + separator +
|
||||
ToString("isVWapFastBullish", isVWapFastBullish, ignoreFalseConditions, separator) +
|
||||
ToString("isVWapFastBearish", isVWapFastBearish, ignoreFalseConditions, separator) +
|
||||
ToString("isVWapFastNeutural", isVWapFastNeutural, ignoreFalseConditions, separator) +
|
||||
|
||||
Reference in New Issue
Block a user