Add support for Detect and Draw Market Structure ...

This commit is contained in:
2025-10-09 04:22:44 +03:30
parent 430d822d3e
commit fc318b5c19
8 changed files with 2199 additions and 2174 deletions
+1 -68
View File
@@ -1975,20 +1975,7 @@ class XCMarketPatternDetector : public XCBase
*
* @param bar: XOHCL, reference to Specified Bar ...
* @param analysis: XPatternAnalysis, reference to holds Analysis result ...
* @param pvValidationLength: int, Validation Length for Peak and Vale Detection ...
* @param peakPriceType: ENUM_X_PRICE, Specified Price for Peak (High) Detection ...
* @param valePriceType: ENUM_X_PRICE, Specified Price for Vale (Low) Detection ...
* @param momentumBarValidationLength: int, bar range for approve Momentum ...
* @param momentumBarApprovedMultiplier: double, a Multipler for approve Momentum ...
* @param trueGapApprovedStrength: double, Gap Validation Multiplier in Point ...
* @param pinBarShadowApprovedMultiplier: double, PinBar Shadow Size Approve Multiplier ...
* @param pinBarRangeMultiplier: doubble, PinBar Range Size Approve Multiplier in Point ...
* @param pinBarForceDirection: bool, PinBar Apply Force Bar Type ...
* @param flagPatternPullbackLength: int, Minimum Shoulders of FlagPattern's Swing Bar ...
* @param fvgForceType: bool, Force FVG to Have Same type Bars ...
* @param obForceTwoBar: bool, Force OB to has atleast two indirectional Bars ...
* @param supportAndResistanceValidationLength: int, Support and Resistance Validation Length ...
* @param supportAndResistanceLoopbackLength: int, Support and Resistance Detection Loopback ...
* @param config: XPatternAnalysisConfig, reference to Provides Detector Configs ...
*
* @return ( bool )
*/
@@ -1996,37 +1983,6 @@ class XCMarketPatternDetector : public XCBase
XOHCL &bar,
XPatternAnalysis &analysis,
XPatternAnalysisConfig &config //
// //
// // PV ...
// int pvValidationLength = 7,
// ENUM_X_PRICE peakPriceType = X_PRICE_HIGH,
// ENUM_X_PRICE valePriceType = X_PRICE_LOW,
// //
// // Momentum ...
// int momentumBarValidationLength = 3,
// double momentumBarApprovedMultiplier = 3,
// //
// // TrueGap ...
// double trueGapApprovedStrength = 1,
// //
// // Pin ...
// double pinBarShadowApprovedMultiplier = 3,
// double pinBarRangeMultiplier = 4,
// bool pinBarForceDirection = false,
// //
// // Flag ...
// int flagPatternPullbackLength = 3,
// //
// // FVG ...
// bool fvgForceType = false,
// //
// // OB ...
// bool obForceTwoBar = false,
// //
// // Support and Resistance ...
// int supportAndResistanceValidationLength = 21,
// int supportAndResistanceLoopbackLength = 50 //
//
)
{
//
@@ -2036,29 +1992,6 @@ class XCMarketPatternDetector : public XCBase
// Prepare ...
analysis.Clean();
// //
// // Normalize ...
// //
// config.pvValidationLength = NormalizeInt(config.pvValidationLength, 2);
// //
// config.momentumBarValidationLength = NormalizeInt(config.momentumBarValidationLength, 2);
// momentumBarApprovedMultiplier = NormalizeDouble(momentumBarApprovedMultiplier, 1);
// //
// trueGapApprovedStrength = NormalizeDouble(trueGapApprovedStrength, 1);
// //
// pinBarRangeMultiplier = NormalizeDouble(pinBarRangeMultiplier, 4);
// pinBarShadowApprovedMultiplier = NormalizeDouble(pinBarShadowApprovedMultiplier, 3);
// //
// flagPatternPullbackLength = NormalizeInt(flagPatternPullbackLength, 3);
// //
// supportAndResistanceLoopbackLength = NormalizeInt(supportAndResistanceLoopbackLength, 10);
// supportAndResistanceValidationLength = NormalizeInt(supportAndResistanceValidationLength, 10);
//
// Validate ...
result = bar.IsValid();
@@ -1463,6 +1463,9 @@ class XCPOIDrawer : public XCBase
return;
}
//
datetime cTime = TimeCurrent();
//
// Handle Draws ...
@@ -1475,6 +1478,7 @@ class XCPOIDrawer : public XCBase
//
// Draw Zone ...
_zone.to = cTime;
DrawZone(_zone, config);
}