This commit is contained in:
2025-04-01 02:02:38 +03:30
parent 756868e56b
commit 8fb7ee9e1b
3 changed files with 176 additions and 62 deletions
@@ -1095,7 +1095,7 @@ class XC121SMCCycleHelper : public XCBase
bool mShowBidLine = true; // show bid line
bool mShowAskLine = true; // show ask line
bool mShowGrid = false; // show grids on chart
bool mShowVolumes = true; // show volumes
bool mShowVolumes = false; // show volumes
bool mShowTradeLevels = true; // Displaying trade levels in the chart (levels of open positions, Stop Loss, Take Profit and pending orders)
bool mAutoScroll = true; // chart autoscroll
bool mQuickNavigation = true; // chart quick navigation state
+168 -54
View File
@@ -408,7 +408,7 @@ bool HasXPVConditions(
//
//
bool isSwingLow =
bool isPSwingLow =
//
(pBar.low < pPBar.low &&
pBar.low < cBar.low &&
@@ -417,14 +417,48 @@ bool HasXPVConditions(
;
//
bool isSwingHigh =
bool isCSwingLow =
//
pBar.high > pPBar.high &&
(pBar.low < pPBar.low &&
cBar.low < pBar.low &&
zBar.close > cBar.low)
//
;
//
bool isSwingLow =
//
isPSwingLow ||
isCSwingLow
//
;
//
bool isPSwingHigh =
//
pBar.high >= pPBar.high &&
pBar.high > cBar.high &&
zBar.open < cBar.high
//
;
//
bool isCSwingHigh =
//
(pBar.high >= pPBar.high &&
cBar.high > pBar.high &&
zBar.close < cBar.high)
//
;
//
bool isSwingHigh =
//
isPSwingHigh &&
isCSwingHigh
//
;
//
bool isBarsOverPeaksGoldenZone =
//
@@ -465,6 +499,14 @@ bool HasXPVConditions(
bool isRsiChangeUnderAtrLower =
rsiChangeP < atrLowerSMP;
//
bool isRsiChangeOverPeaksGoldenZone =
rsiChangeP > peaksGoldenP;
//
bool isRsiChangeUnderValesGoldenZone =
rsiChangeP < valesGoldenP;
//
bool isPriceChangeOverAtrUpper =
priceChangeP > atrUpperSMP;
@@ -473,6 +515,14 @@ bool HasXPVConditions(
bool isPriceChangeUnderAtrLower =
priceChangeP < atrLowerSMP;
//
bool isPriceChangeOverPeaksGoldenZone =
priceChangeP > peaksGoldenP;
//
bool isPriceChangeUnderValesGoldenZone =
priceChangeP < valesGoldenP;
//
// XPV Peaks or Vales ...
@@ -484,6 +534,18 @@ bool HasXPVConditions(
bool isPBarEqualsToPeak = pBar.high == peakP;
bool isPBarEqualsToVale = pBar.low == valeP;
//
bool isPPBarEqualsToPeak = pPBar.high == peakPP;
bool isPPBarEqualsToVale = pPBar.low == valePP;
//
bool isBarsEqualsToPeak = isCBarEqualsToPeak ||
isPBarEqualsToPeak ||
isPPBarEqualsToPeak;
bool isBarsEqualsToVale = isCBarEqualsToVale ||
isPBarEqualsToVale ||
isPPBarEqualsToVale;
//
// Detect VPatterns ...
@@ -505,6 +567,23 @@ bool HasXPVConditions(
//
;
//
bool isRsiChangeBullish =
//
(isRsiChangeUnderAtrLower &&
isRsiChangeBullishVPattern &&
isRsiChangeUnderValesGoldenZone)
//
;
bool isRsiChangeBearish =
//
(isRsiChangeOverAtrUpper &&
isRsiChangeBearishVPattern &&
isRsiChangeOverPeaksGoldenZone)
//
;
//
bool isPriceChangeBullishVPattern =
//
@@ -523,60 +602,99 @@ bool HasXPVConditions(
//
;
//
bool isPriceChangeBullish =
//
(isPriceChangeUnderAtrLower &&
isPriceChangeBullishVPattern &&
isPriceChangeUnderValesGoldenZone)
//
;
//
bool isPriceChangeBearish =
//
(isPriceChangeOverAtrUpper &&
isPriceChangeBearishVPattern &&
isPriceChangeOverPeaksGoldenZone)
//
;
//
// XVWAP ...
//
bool isVWapIsBullish =
//
(cXConditions.isVWapBullishOrdered &&
cXConditions.isVWapSwitchedToBullishState)
//
||
//
(cXConditions.isVWapBullishState &&
cXConditions.isVWapSwitchedToBullishOrdered)
//
;
//
bool isVWapIsBearish =
//
(cXConditions.isVWapBearishOrdered &&
cXConditions.isVWapSwitchedToBearishState)
//
||
//
(cXConditions.isVWapBearishState &&
cXConditions.isVWapSwitchedToBearishOrdered)
//
;
//
// Checking Bar States ...
//
bool isCBarHasBullishFibPressure =
//
cBar.HasFiboPressure(
X_DIRECTION_BULLISH,
X_FIBO_LEVEL_382 //
)
//
;
ENUM_X_DIRECTION cBarPosDir;
bool isCBarValidForPosition =
cHelper
.mBarAnalyser
.IsValidForPosition(
cBar,
cBarPosDir //
);
//
bool isPBarHasBullishFibPressure =
//
pBar.HasFiboPressure(
X_DIRECTION_BULLISH,
X_FIBO_LEVEL_382 //
)
//
;
//
bool isCBarHasBearishFibPressure =
//
cBar.HasFiboPressure(
X_DIRECTION_BEARISH,
X_FIBO_LEVEL_382 //
)
//
;
//
bool isPBarHasBearishFibPressure =
//
pBar.HasFiboPressure(
X_DIRECTION_BEARISH,
X_FIBO_LEVEL_382 //
)
//
;
ENUM_X_DIRECTION pBarPosDir;
bool isPBarValidForPosition =
cHelper
.mBarAnalyser
.IsValidForPosition(
pBar,
pBarPosDir //
);
//
bool isBarValidForBullish =
//
isCBarHasBullishFibPressure
(isCBarValidForPosition &&
IsBullish(cBarPosDir))
//
&&
//
(isPBarValidForPosition &&
IsBullish(pBarPosDir))
//
;
//
bool isBarValidForBearish =
//
isCBarHasBearishFibPressure
(isCBarValidForPosition &&
IsBearish(cBarPosDir))
//
&&
//
(isPBarValidForPosition &&
IsBearish(pBarPosDir))
//
;
@@ -587,32 +705,28 @@ bool HasXPVConditions(
isBullish =
//
// isSwingLow &&
isVWapIsBullish // &&
// isBarsEqualsToVale &&
// isRsiChangeBullish &&
// isBarsUnderAtrLower &&
// isBarValidForBullish &&
// isPriceChangeBullish &&
// isBarsUnderValesGoldenZone
//
// isCBarEqualsToVale &&
(isRsiChangeUnderAtrLower &&
isRsiChangeBullishVPattern) &&
(isPriceChangeUnderAtrLower &&
isPriceChangeBullishVPattern)
//
;
//
isBearish =
//
// isSwingHigh &&
//isSwingHigh &&
isVWapIsBearish // &&
//isBarsEqualsToPeak &&
// isBarsOverAtrUpper &&
// isRsiChangeBearish &&
// isBarValidForBearish &&
// isPriceChangeBearish &&
// isBarsOverPeaksGoldenZone
//
// isCBarEqualsToPeak &&
(isRsiChangeOverAtrUpper &&
isRsiChangeBearishVPattern) &&
(isPriceChangeOverAtrUpper &&
isPriceChangeBearishVPattern)
//
;
//
@@ -976,7 +976,7 @@ class XCX121SMCStrategy : public XCX121SMCBaseStrategy
//
// Presentations ...
x121Inputs.xccInputs.showCandles = showAll || false;
x121Inputs.xccInputs.showCandles = showAll || true;
//
// XPV ...
@@ -1011,7 +1011,7 @@ class XCX121SMCStrategy : public XCX121SMCBaseStrategy
//
// Presentations ...
x121Inputs.xhkInputs.drawRawXHKCandles = showAll || true;
x121Inputs.xhkInputs.drawRawXHKCandles = showAll || false;
x121Inputs.xhkInputs.drawSmoothedXHKCandles = showAll || false;
//
@@ -1036,8 +1036,8 @@ class XCX121SMCStrategy : public XCX121SMCBaseStrategy
// Presentations ...
x121Inputs.xatrInputs.showAtrUpper = showAll || false;
x121Inputs.xatrInputs.showAtrLower = showAll || false;
x121Inputs.xatrInputs.showRSIChange = showAll || true;
x121Inputs.xatrInputs.showPriceChange = showAll || true;
x121Inputs.xatrInputs.showRSIChange = showAll || false;
x121Inputs.xatrInputs.showPriceChange = showAll || false;
x121Inputs.xatrInputs.showSmoothedAtrUpper = showAll || true;
x121Inputs.xatrInputs.showSmoothedAtrLower = showAll || true;
x121Inputs.xatrInputs.showSmoothedRSIChange = showAll || true;
@@ -1088,9 +1088,9 @@ class XCX121SMCStrategy : public XCX121SMCBaseStrategy
//
// Presentations ...
x121Inputs.xvwapInputs.showVWapFast = showAll || false;
x121Inputs.xvwapInputs.showVWapSlow = showAll || false;
x121Inputs.xvwapInputs.showVWapMedium = showAll || false;
x121Inputs.xvwapInputs.showVWapFast = showAll || true;
x121Inputs.xvwapInputs.showVWapSlow = showAll || true;
x121Inputs.xvwapInputs.showVWapMedium = showAll || true;
//
//