last works on XFima Strategy 2 Signalling ...

This commit is contained in:
2025-10-14 02:13:26 +03:30
parent ba2231664a
commit 2271df30c7
8 changed files with 922 additions and 204 deletions
+110 -13
View File
@@ -539,12 +539,18 @@ struct XPivotAnalysis
//
// Calculating Slope and Intercept ...
CalculateSlopeAndIntercept(
peakSlope,
peakIntercept,
xData,
yData //
);
has = ArraySize(xData) >= 2 &&
ArraySize(yData) >= 2;
if (has)
{
//
CalculateSlopeAndIntercept(
peakSlope,
peakIntercept,
xData,
yData //
);
}
}
//
@@ -570,12 +576,18 @@ struct XPivotAnalysis
//
// Calculating Slope and Intercept ...
CalculateSlopeAndIntercept(
valeSlope,
valeIntercept,
xData,
yData //
);
has = ArraySize(xData) >= 2 &&
ArraySize(yData) >= 2;
if (has)
{
//
CalculateSlopeAndIntercept(
valeSlope,
valeIntercept,
xData,
yData //
);
}
}
//
@@ -1482,7 +1494,13 @@ struct XPatternAnalysis
//
// Pattern Actions ...
//
/**
* Count Directional Patterns ...
*
* @param forDir: ENUM_X_DIRECTION, Specified Direction ...
*
* @return ( int )
*/
int Count(
ENUM_X_DIRECTION forDir = X_DIRECTION_NONE //
)
@@ -2826,6 +2844,21 @@ struct XPatternAnalysisDrawConfig
//
// Props ...
//
// Quarters ...
bool drawQuarterZones; // Draw Quarters ...
bool drawQuarterMajors; // Draw Quarter Majors ...
bool drawQuarterMinors; // Draw Quarter Minors ...
bool drawQuarter; // Draw Quarter Trend Line ...
//
int quarterWidth;
color quarterColor;
ENUM_LINE_STYLE quarterStyle;
//
// Patterns ...
//
ENUM_X_BAR_PATTERN allowedDraws[]; // Allowed Draw Patterns
ENUM_X_BAR_PATTERN allowedDrawZones[]; // Allowed Draw Pattern Zones
@@ -2833,6 +2866,8 @@ struct XPatternAnalysisDrawConfig
//
XPOIDrawConfig drawConfig;
XPOIDrawConfig quarterMajorsDrawConfig;
XPOIDrawConfig quarterMinorsDrawConfig;
//
// Constructor ...
@@ -2857,6 +2892,10 @@ struct XPatternAnalysisDrawConfig
XClean(allowedDraws);
XClean(allowedDrawZones);
XClean(allowedDrawPivots);
//
quarterMajorsDrawConfig.Clean();
quarterMinorsDrawConfig.Clean();
}
/**
@@ -2867,10 +2906,19 @@ struct XPatternAnalysisDrawConfig
//
// Drawing Configs ...
drawConfig.Default();
quarterMajorsDrawConfig.Default();
quarterMinorsDrawConfig.Default();
ConfigureQuarterDraws();
//
Full();
//
drawQuarter = true;
drawQuarterZones = true;
drawQuarterMajors = true;
drawQuarterMinors = true;
//
// Remove Unused From Zones ...
Remove(X_BAR_PATTERN_PINNED, allowedDrawZones);
@@ -2895,6 +2943,12 @@ struct XPatternAnalysisDrawConfig
XClean(allowedDraws);
XClean(allowedDrawZones);
XClean(allowedDrawPivots);
//
drawQuarter = false;
drawQuarterZones = false;
drawQuarterMajors = false;
drawQuarterMinors = false;
}
/**
@@ -2902,6 +2956,12 @@ struct XPatternAnalysisDrawConfig
*/
void Full()
{
//
drawQuarter = true;
drawQuarterZones = true;
drawQuarterMajors = true;
drawQuarterMinors = true;
//
GetAllBarPatters(allowedDraws);
GetAllBarPatters(allowedDrawZones);
@@ -2974,6 +3034,43 @@ struct XPatternAnalysisDrawConfig
//
return result;
}
//
// Drawer Configs ...
/**
* PreConfigure Default Drawer Configs of Quarters ...
*/
void ConfigureQuarterDraws()
{
//
// Quarter ...
quarterWidth = 2;
quarterStyle = STYLE_DOT;
quarterColor = clrYellow;
//
// Majors ...
//
quarterMajorsDrawConfig.Default();
quarterMajorsDrawConfig = drawConfig;
//
quarterMajorsDrawConfig.zonesWidth = 3;
quarterMajorsDrawConfig.bearishColor = clrRed;
quarterMajorsDrawConfig.bullishColor = clrLime;
//
// Minors ...
//
quarterMinorsDrawConfig.Default();
quarterMinorsDrawConfig = drawConfig;
//
quarterMinorsDrawConfig.zonesStyle = STYLE_DASH;
}
};
//
+4
View File
@@ -719,9 +719,11 @@ struct XTarget
//
// Props ...
bool doRF; // Do RF on Target
bool doRFOnEntry; // Do RF on Entry
double actingDistance; // Acting Distances
double target; // Target Price for Actions
double volumeMultiplier; // Volume Multiplier for Partial Close
double tpValue; // TP Value Changed ...
//
// Constructor ...
@@ -739,8 +741,10 @@ struct XTarget
{
//
target = 0;
tpValue = 0;
doRF = false;
actingDistance = 0;
doRFOnEntry = false;
volumeMultiplier = 0;
}