last ...
This commit is contained in:
@@ -450,22 +450,26 @@ class XC121SMCCycleHelper : public XCBase
|
||||
//
|
||||
int highestPeakIndex = -1;
|
||||
double highestPeakVale = 0;
|
||||
double highestPeak = mX121Helper
|
||||
.GetHighestPeak(
|
||||
barIndex,
|
||||
highestPeakIndex,
|
||||
highestPeakVale //
|
||||
);
|
||||
double highestPeak =
|
||||
mX121Helper
|
||||
.xpvHelper
|
||||
.GetHighestPeak(
|
||||
barIndex,
|
||||
highestPeakIndex,
|
||||
highestPeakVale //
|
||||
);
|
||||
|
||||
//
|
||||
int lowestValeIndex = -1;
|
||||
double lowestValePeak = 0;
|
||||
double lowestVale = mX121Helper
|
||||
.GetLowestVale(
|
||||
barIndex,
|
||||
lowestValeIndex,
|
||||
lowestValePeak //
|
||||
);
|
||||
double lowestVale =
|
||||
mX121Helper
|
||||
.xpvHelper
|
||||
.GetLowestVale(
|
||||
barIndex,
|
||||
lowestValeIndex,
|
||||
lowestValePeak //
|
||||
);
|
||||
|
||||
//
|
||||
result = IsValidIndex(highestPeakIndex) &&
|
||||
@@ -520,7 +524,11 @@ class XC121SMCCycleHelper : public XCBase
|
||||
}
|
||||
|
||||
//
|
||||
bool isBreake = iBar.IsBreakeUp(lowestValePeak);
|
||||
bool isBreake = IsBarBreak(
|
||||
lowestValePeak,
|
||||
X_DIRECTION_BULLISH,
|
||||
iBar //
|
||||
);
|
||||
if (isBreake)
|
||||
{
|
||||
//
|
||||
@@ -545,7 +553,11 @@ class XC121SMCCycleHelper : public XCBase
|
||||
}
|
||||
|
||||
//
|
||||
bool isBreake = iBar.IsBreakeDown(highestPeakVale);
|
||||
bool isBreake = IsBarBreak(
|
||||
highestPeakVale,
|
||||
X_DIRECTION_BEARISH,
|
||||
iBar //
|
||||
);
|
||||
if (isBreake)
|
||||
{
|
||||
//
|
||||
@@ -571,7 +583,7 @@ class XC121SMCCycleHelper : public XCBase
|
||||
for (int i = lowestValePeakBreakeUpIndex; i >= barIndex; i--)
|
||||
{
|
||||
//
|
||||
double iVale = mX121Helper.GetVale(i);
|
||||
double iVale = mX121Helper.xpvHelper.GetVale(i);
|
||||
|
||||
//
|
||||
bool isValid =
|
||||
@@ -581,7 +593,7 @@ class XC121SMCCycleHelper : public XCBase
|
||||
{
|
||||
//
|
||||
valeAboveLowestValePeakIndex = i;
|
||||
valeAboveLowestValePeakPeak = mX121Helper.GetPeak(i);
|
||||
valeAboveLowestValePeakPeak = mX121Helper.xpvHelper.GetPeak(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -595,7 +607,7 @@ class XC121SMCCycleHelper : public XCBase
|
||||
for (int i = highestPeakValeBreakeDownIndex; i >= barIndex; i--)
|
||||
{
|
||||
//
|
||||
double iPeak = mX121Helper.GetPeak(i);
|
||||
double iPeak = mX121Helper.xpvHelper.GetPeak(i);
|
||||
|
||||
//
|
||||
bool isValid =
|
||||
@@ -605,7 +617,7 @@ class XC121SMCCycleHelper : public XCBase
|
||||
{
|
||||
//
|
||||
peakBelowHighestPeakValeIndex = i;
|
||||
peakBelowHighestPeakValeVale = mX121Helper.GetVale(i);
|
||||
peakBelowHighestPeakValeVale = mX121Helper.xpvHelper.GetVale(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -651,8 +663,8 @@ class XC121SMCCycleHelper : public XCBase
|
||||
bool isInited = GetBar(iBar, i);
|
||||
|
||||
//
|
||||
double iPeak = mX121Helper.GetPeak(i);
|
||||
double iVale = mX121Helper.GetVale(i);
|
||||
double iPeak = mX121Helper.xpvHelper.GetPeak(i);
|
||||
double iVale = mX121Helper.xpvHelper.GetVale(i);
|
||||
|
||||
//
|
||||
bool hasPeakPriceInsideZone = CalculatePriceInsideZones(
|
||||
|
||||
@@ -3279,9 +3279,9 @@ class XC121SMCTradeHandler : public XCBaseAlert
|
||||
conditions,
|
||||
conditionsObjects,
|
||||
mDrawer,
|
||||
true,
|
||||
false,
|
||||
true, // Analyse Price Zones ...
|
||||
true, // Decision Zone ...
|
||||
false, // Decision Zone ...
|
||||
true // Only Box ...
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1096,6 +1096,18 @@ bool DetectX121SMCXTWPVSiganlTrigger(
|
||||
//
|
||||
// Trigger Conditions ...
|
||||
|
||||
//
|
||||
// Detect Bullish Conditions ...
|
||||
isBullish =
|
||||
isBullish &&
|
||||
cBar.IsBullish();
|
||||
|
||||
//
|
||||
// Detect Bearish Conditions ...
|
||||
isBearish =
|
||||
isBearish &&
|
||||
cBar.IsBearish();
|
||||
|
||||
//
|
||||
result = isBullish ||
|
||||
isBearish;
|
||||
@@ -1163,7 +1175,7 @@ bool DetectX121SMCXTWPVSiganlTrigger(
|
||||
if (isBullish)
|
||||
{
|
||||
//
|
||||
double lowerVale = triggerCycleHelper.mX121Helper.GetLowerVale(vale);
|
||||
double lowerVale = triggerCycleHelper.mX121Helper.xpvHelper.GetLowerVale(vale);
|
||||
if (lowerVale > 0)
|
||||
{
|
||||
//
|
||||
@@ -1176,7 +1188,7 @@ bool DetectX121SMCXTWPVSiganlTrigger(
|
||||
else if (isBearish)
|
||||
{
|
||||
//
|
||||
double higherPeak = triggerCycleHelper.mX121Helper.GetHigherPeak(peak);
|
||||
double higherPeak = triggerCycleHelper.mX121Helper.xpvHelper.GetHigherPeak(peak);
|
||||
if (higherPeak > 0)
|
||||
{
|
||||
//
|
||||
|
||||
@@ -614,34 +614,45 @@ class XCX121SMCStrategy : public XCX121SMCBaseStrategy
|
||||
x121Inputs.Default();
|
||||
|
||||
//
|
||||
x121Inputs.scMethod = scMethod;
|
||||
x121Inputs.scPeriod = scPeriod;
|
||||
x121Inputs.mcMethod = mcMethod;
|
||||
x121Inputs.mcPeriod = mcPeriod;
|
||||
x121Inputs.lcMethod = lcMethod;
|
||||
x121Inputs.lcPeriod = lcPeriod;
|
||||
x121Inputs.hcMethod = hcMethod;
|
||||
x121Inputs.hcPeriod = hcPeriod;
|
||||
bool isInited = false;
|
||||
|
||||
//
|
||||
x121Inputs.showSar = true;
|
||||
x121Inputs.showPeaks = true;
|
||||
x121Inputs.showVales = true;
|
||||
x121Inputs.showVWap = true;
|
||||
x121Inputs.showDonchain = true;
|
||||
// XPV ...
|
||||
|
||||
//
|
||||
x121Inputs.showOpen = false;
|
||||
x121Inputs.showHigh = false;
|
||||
x121Inputs.showClose = true;
|
||||
x121Inputs.showLow = false;
|
||||
x121Inputs.xpvInputs.scMethod = scMethod;
|
||||
x121Inputs.xpvInputs.scPeriod = scPeriod;
|
||||
x121Inputs.xpvInputs.mcMethod = mcMethod;
|
||||
x121Inputs.xpvInputs.mcPeriod = mcPeriod;
|
||||
x121Inputs.xpvInputs.lcMethod = lcMethod;
|
||||
x121Inputs.xpvInputs.lcPeriod = lcPeriod;
|
||||
x121Inputs.xpvInputs.hcMethod = hcMethod;
|
||||
x121Inputs.xpvInputs.hcPeriod = hcPeriod;
|
||||
|
||||
//
|
||||
// XATR ...
|
||||
x121Inputs.xatrInputs.showATRUpper = false;
|
||||
x121Inputs.xatrInputs.showATRLower = false;
|
||||
|
||||
//
|
||||
// XSTR ...
|
||||
|
||||
//
|
||||
// XDON ...
|
||||
x121Inputs.xdonInputs.showOpen = false;
|
||||
x121Inputs.xdonInputs.showClose = true;
|
||||
x121Inputs.xdonInputs.showLow = false;
|
||||
x121Inputs.xdonInputs.showHigh = false;
|
||||
|
||||
//
|
||||
// XVWAP ...
|
||||
x121Inputs.xvwapInputs.showVWapFast = true;
|
||||
x121Inputs.xvwapInputs.showVWapFast = true;
|
||||
x121Inputs.xvwapInputs.showVWapSlow = false;
|
||||
|
||||
//
|
||||
// Initialize Cycle Helpers ...
|
||||
|
||||
//
|
||||
bool isInited = false;
|
||||
|
||||
//
|
||||
mTriggerCycleHelper = new XC121SMCCycleHelper();
|
||||
isInited = mTriggerCycleHelper.Init(
|
||||
|
||||
Reference in New Issue
Block a user