This commit is contained in:
2024-12-31 20:35:20 +03:30
parent bd93f81ce1
commit f1c9610896
4 changed files with 82 additions and 71 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ input int eaMaxAllowedLongs = 5; // Max Allowed Long
input int eaMaxAllowedShorts = 5; // Max Allowed Short Signals
input bool eaUseMaxAllowedSignalsPerSymbol = true; // Use Max Allowed Signal Types Per Symbol
input double eaLastPositionProfitForAcceptNextInPoint = 30; // Last Position Profit In Points for Accept new Signal
input int eaDelaysBetweenTwoSignalsInBar = 10; // Delay between two Signals in Bars
input int eaDelaysBetweenTwoSignalsInBar = 100; // Delay between two Signals in Bars
input double eaMaxAllowedSpread = 25; // Max Allowed Spread for Signalling
input int eaMinRequiredVerificationForSpreadPass = 20; // Minimum Spread Verification for Signalling
@@ -25,8 +25,8 @@
//
#include "../../Classes/x-saherelm.x-alert.class.mq5"
#include "../../Classes/x-saherelm.x-bar.analyser.class.mq5"
#include "../../Classes/x-saherelm.x-trade.class.mq5"
#include "../../Classes/x-saherelm.x-poi.drawer.class.mq5"
#include "../../Classes/x-saherelm.x-trade.class.mq5"
//
// Definitions ...
@@ -3555,6 +3555,9 @@ class XC121SMCTradeHandler : public XCBaseAlert
);
}
//
ResetProtections();
//
string message = "Hedge (" + ToString(count) + ") Positions By: " +
ToString(profitSummary) + " Successfully ...";
@@ -4071,6 +4074,14 @@ class XC121SMCTradeHandler : public XCBaseAlert
return result;
}
//
void ResetProtections()
{
//
ResumePausedSymbols();
Clean(mLastExecutedSignals);
}
//
// End of XC121SMCTradeHandler Class ...
};
@@ -1806,7 +1806,7 @@ bool DetectX121SMCXTWPVSiganlTrigger(
//
conditions.sl = sl;
conditions.target = target;
conditions.target = 0; // target;
conditions.triggerTime = cTime;
conditions.type = isBullish
? X_POSITION_TYPE_LONG
+68 -68
View File
@@ -497,77 +497,77 @@ class XCX121SMCStrategy : public XCX121SMCBaseStrategy
//
// Handle Required Drawings ...
// bool hasPivot = mXTWPVConditions.HasPivot();
// bool hasPriceInsideZone = mXTWPVConditions.HasPriceInsideZones();
// bool hasConsolidationZone = mXTWPVConditions.HasConsolidationZone();
// bool canDraw = hasPivot ||
// hasPriceInsideZone ||
// hasConsolidationZone;
// if (canDraw)
// {
// //
// ClearDraws();
bool hasPivot = mXTWPVConditions.HasPivot();
bool hasPriceInsideZone = mXTWPVConditions.HasPriceInsideZones();
bool hasConsolidationZone = mXTWPVConditions.HasConsolidationZone();
bool canDraw = hasPivot ||
hasPriceInsideZone ||
hasConsolidationZone;
if (canDraw)
{
//
ClearDraws();
// //
// // Draw Consolidation Zone ...
// if (hasConsolidationZone)
// {
// //
// XCConsolidationZoneObject *iObj;
// bool isCreated = mPOIDrawer.CreateConsolidationZone(
// mXTWPVConditions.consolidationZone,
// iObj //
// );
// if (isCreated)
// {
// AddObjectIfNotExists(iObj);
// }
// }
//
// Draw Consolidation Zone ...
if (hasConsolidationZone)
{
//
XCConsolidationZoneObject *iObj;
bool isCreated = mPOIDrawer.CreateConsolidationZone(
mXTWPVConditions.consolidationZone,
iObj //
);
if (isCreated)
{
AddObjectIfNotExists(iObj);
}
}
// //
// // Draw Pivot Zone ...
// if (hasPivot)
// {
// //
// XCBaseObject *drawnObjects[];
// int drawnObjectsCount = DrawXTWPVPivotZone(
// mXTWPVConditions,
// mPOIDrawer,
// drawnObjects,
// false, // Draw State ...
// false, // Draw Ticks Zone ...
// true, // Ignore SwingHighs ...
// true, // Ignore SwingLows ...
// true, // Ignore SupportZones ...
// true, // Ignore ResistanceZones ...
// true, // Ignore SupplyZones ...
// true, // Ignore DemandZones ...
// true, // Ignore BullishOrderBlocks ...
// true, // Ignore BearishOrderBlocks ...
// true, // Ignore BullishFairValueGaps ...
// true, // Ignore BearishFairValueGaps ...
// true, // Ignore BullishRejectionBars ...
// true, // Ignore BearishRejectionBars ...
// true, // Ignore BullishMomentumBars ...
// true // Ignore BearishMomentumBars ...
// );
// AddObjectsIfNotExists(drawnObjects);
// }
//
// Draw Pivot Zone ...
if (hasPivot)
{
//
XCBaseObject *drawnObjects[];
int drawnObjectsCount = DrawXTWPVPivotZone(
mXTWPVConditions,
mPOIDrawer,
drawnObjects,
false, // Draw State ...
false, // Draw Ticks Zone ...
true, // Ignore SwingHighs ...
true, // Ignore SwingLows ...
true, // Ignore SupportZones ...
true, // Ignore ResistanceZones ...
true, // Ignore SupplyZones ...
true, // Ignore DemandZones ...
true, // Ignore BullishOrderBlocks ...
true, // Ignore BearishOrderBlocks ...
true, // Ignore BullishFairValueGaps ...
true, // Ignore BearishFairValueGaps ...
true, // Ignore BullishRejectionBars ...
true, // Ignore BearishRejectionBars ...
true, // Ignore BullishMomentumBars ...
true // Ignore BearishMomentumBars ...
);
AddObjectsIfNotExists(drawnObjects);
}
// //
// // Draw Price Inside Zones ...
// if (hasPriceInsideZone)
// {
// //
// XCBaseObject *drawnObjects[];
// int drawnObjectsCount = DrawTWPVPriceInsideZones(
// mXTWPVConditions,
// mPOIDrawer,
// drawnObjects //
// );
// AddObjectsIfNotExists(drawnObjects);
// }
// }
//
// Draw Price Inside Zones ...
if (hasPriceInsideZone)
{
//
XCBaseObject *drawnObjects[];
int drawnObjectsCount = DrawTWPVPriceInsideZones(
mXTWPVConditions,
mPOIDrawer,
drawnObjects //
);
AddObjectsIfNotExists(drawnObjects);
}
}
//
result = isSetuped;