This commit is contained in:
2025-09-29 02:40:14 +03:30
parent 0e2138a4a9
commit 57be148292
3 changed files with 207 additions and 83 deletions
@@ -631,11 +631,13 @@ class XCXFIMAStrategy2Signaller : public XCXFIMABaseSignaller
ENUM_X_DIRECTION iDir = X_DIRECTION_NONE;
//
XPivot pvPivots[];
string pvTrendName = "XXIFMA2PVTrend";
CChartObjectTrend *pvTrendLine = NULL;
ENUM_X_DIRECTION pvTrend = X_DIRECTION_NONE;
//
XPivot zgPivots[];
string zgTrendName = "XFIMA2ZGTrend";
CChartObjectTrend *zgTrendLine = NULL;
ENUM_X_DIRECTION zgTrend = X_DIRECTION_NONE;
@@ -870,12 +872,12 @@ class XCXFIMAStrategy2Signaller : public XCXFIMABaseSignaller
//
// Pivots ...
XPivot pivots[];
int pivotsCount = poiDetector.ExtractPVPivots(
count = poiDetector.ExtractPVPivots(
pivots,
barIndex,
50 //
);
has = IsValidSize(pivotsCount);
has = IsValidSize(count);
//
// Sort ...
@@ -1048,10 +1050,9 @@ class XCXFIMAStrategy2Signaller : public XCXFIMABaseSignaller
if (has)
{
//
CArrayObj *drawnPivots = new CArrayObj();
pivotsCount = poiDrawer.DrawPivots(
Copy(
pivots,
drawnPivots //
pvPivots //
);
}
@@ -1068,7 +1069,6 @@ class XCXFIMAStrategy2Signaller : public XCXFIMABaseSignaller
//
// Support ...
XBoxZone supportBox;
// XCBoxObject *iSupportObj;
has = structure.zigzagAnalysis.HasSupportBox(supportBox);
if (has)
{
@@ -1078,32 +1078,11 @@ class XCXFIMAStrategy2Signaller : public XCXFIMABaseSignaller
supportBox,
supports //
);
// has = poiDrawer.DrawBox(
// supportBox,
// iSupportObj,
// true, // Ignore At ...
// supportBox.type // Name ...
// );
// if (has)
// {
// //
// XPOIStyle iStyle;
// poiDrawer.GetBoxStyle(
// iStyle,
// supportBox.dir //
// );
// poiDrawer.ApplyBoxStyle(
// iSupportObj,
// iStyle //
// );
// iStyle.Clean();
// }
}
//
// Resistance ...
XBoxZone resistanceBox;
// XCBoxObject *iResistanceObj;
has = structure.zigzagAnalysis.HasResistanceBox(resistanceBox);
if (has)
{
@@ -1113,37 +1092,17 @@ class XCXFIMAStrategy2Signaller : public XCXFIMABaseSignaller
resistanceBox,
supports //
);
// has = poiDrawer.DrawBox(
// resistanceBox,
// iResistanceObj,
// true, // Ignore At ...
// resistanceBox.type // Name ...
// );
// if (has)
// {
// //
// XPOIStyle iStyle;
// poiDrawer.GetBoxStyle(
// iStyle,
// resistanceBox.dir //
// );
// poiDrawer.ApplyBoxStyle(
// iResistanceObj,
// iStyle //
// );
// iStyle.Clean();
// }
}
//
// Pivots ...
XPivot pivots[];
int pivotsCount = poiDetector.ExtractZigZagPivots(
count = poiDetector.ExtractZigZagPivots(
pivots,
barIndex,
10 //
);
has = IsValidSize(pivotsCount);
has = IsValidSize(count);
//
// Sort ...
@@ -1316,10 +1275,9 @@ class XCXFIMAStrategy2Signaller : public XCXFIMABaseSignaller
if (has)
{
//
CArrayObj *drawnPivots = new CArrayObj();
pivotsCount = fima2Signaller.poiDrawer.DrawPivots(
Copy(
pivots,
drawnPivots //
zgPivots //
);
}
@@ -1427,7 +1385,7 @@ class XCXFIMAStrategy2Signaller : public XCXFIMABaseSignaller
//
// Do all Draws Here ...
bool canDraw = true;
bool canDraw = false;
if (canDraw)
{
//
@@ -1547,6 +1505,33 @@ class XCXFIMAStrategy2Signaller : public XCXFIMABaseSignaller
//
// TrendLines ...
//
// Pivots ...
//
has = HasChild(pvPivots);
if (has)
{
//
CArrayObj *drawnPivots = new CArrayObj();
count = poiDrawer.DrawPivots(
pvPivots,
drawnPivots //
);
}
//
has = HasChild(zgPivots);
if (has)
{
//
CArrayObj *drawnPivots = new CArrayObj();
count = poiDrawer.DrawPivots(
zgPivots,
drawnPivots //
);
}
//
// Patterns Bar ...
has = HasDirection(iDir);
@@ -1582,6 +1567,12 @@ class XCXFIMAStrategy2Signaller : public XCXFIMABaseSignaller
{
//
// TODO: Provided SL ...
double _point = GetPoints(bar.symbol);
double slAddition = 5 * _point;
double slPrice =
isBullish
? iZone.lower - slAddition
: iZone.upper + slAddition;
//
// Prepare Founded Signal ...
@@ -1589,7 +1580,10 @@ class XCXFIMAStrategy2Signaller : public XCXFIMABaseSignaller
has = PrepareSignal(
signal,
iDir,
targets //
targets,
0, // Use Default R2R ...
slPrice, // Provided Price for SL ...
0 // Specified Risk in Point ....
);
if (has)
{
@@ -1606,6 +1600,8 @@ class XCXFIMAStrategy2Signaller : public XCXFIMABaseSignaller
signal.Clean();
structure.Clean();
fimaConditions.Clean();
SpecifiedClean(pvPivots);
SpecifiedClean(zgPivots);
SpecifiedClean(supports);
SpecifiedClean(resistances);
}