This commit is contained in:
2025-01-26 20:10:44 +03:30
parent fdbc2e9361
commit 974a516bec
10 changed files with 4144 additions and 161 deletions
+4 -1
View File
@@ -900,7 +900,10 @@ bool DetectX121SMCXSignalSetup(
forDir,
priceInsideOB.GetSymbol(),
priceInsideOB.GetPeriod(),
(XCZone *)priceInsideOB //
priceInsideOB.Upper(),
priceInsideOB.Lower(),
priceInsideOB.From(),
priceInsideOB.To() //
);
if (hasBreakerBar)
{
File diff suppressed because it is too large Load Diff
+203 -39
View File
@@ -23,8 +23,8 @@
// Imports ...
// #include "../../Libraries/x-trade.lib"
#include "../Classes/x-121.smc.market.cycle.helper.class.mq5"
#include "../Libraries/x-121.smc.lib.mq5"
#include "../Libraries/x-121.smc.guard.lib.mq5"
#include "../Libraries/x-121.smc.lib.mq5"
//
// Definitions ...
@@ -900,7 +900,10 @@ bool DetectX121SMCXOBPVSignalSetup(
forDir,
priceInsideOB.GetSymbol(),
priceInsideOB.GetPeriod(),
(XCZone *)priceInsideOB //
priceInsideOB.Upper(),
priceInsideOB.Lower(),
priceInsideOB.From(),
priceInsideOB.To() //
);
if (hasBreakerBar)
{
@@ -918,13 +921,204 @@ bool DetectX121SMCXOBPVSignalSetup(
hasOBState = obState.IsValid();
}
//
// DRAW ...
//
// //
// XCBaseObject *drawnObjects[];
// //
// if (hasBullishOrderBlocks)
// {
// //
// for (int i = 0; i < bullishOrderBlocksCount; i++)
// {
// //
// XCOrderBlock *iOb = conditions.bullishOBs[i];
// //
// XCBullishOrderBlockObject *iObObj;
// bool isCreated = visionCycleHelper
// .mPOIDrawer
// .CreateBullishOrderBlock(
// iOb,
// iObObj //
// );
// if (isCreated)
// {
// //
// Add(
// (XCBaseObject *)iObObj,
// drawnObjects //
// );
// }
// }
// }
// //
// if (hasBearishOrderBlocks)
// {
// //
// for (int i = 0; i < bearishOrderBlocksCount; i++)
// {
// //
// XCOrderBlock *iOb = conditions.bearishOBs[i];
// //
// XCBearishOrderBlockObject *iObObj;
// bool isCreated = visionCycleHelper
// .mPOIDrawer
// .CreateBearishOrderBlock(
// iOb,
// iObObj //
// );
// if (isCreated)
// {
// //
// Add(
// (XCBaseObject *)iObObj,
// drawnObjects //
// );
// }
// }
// }
// //
// if (hasPriceInsideOB)
// {
// //
// bool isBullish = priceInsideOB.IsBullish();
// //
// bool isCreated = false;
// XCBaseObject *priceInsideOBObj = NULL;
// if (isBullish)
// {
// //
// XCBullishOrderBlockObject *iObj;
// isCreated = visionCycleHelper
// .mPOIDrawer
// .CreateBullishOrderBlock(
// priceInsideOB,
// iObj //
// );
// if (isCreated)
// {
// //
// iObj.ZoneColor(clrYellow);
// //
// priceInsideOBObj = (XCBaseObject *)iObj;
// }
// }
// else
// {
// //
// XCBearishOrderBlockObject *iObj;
// isCreated = visionCycleHelper
// .mPOIDrawer
// .CreateBearishOrderBlock(
// priceInsideOB,
// iObj //
// );
// if (isCreated)
// {
// //
// iObj.ZoneColor(clrOrange);
// //
// priceInsideOBObj = (XCBaseObject *)iObj;
// }
// }
// //
// if (isCreated)
// {
// //
// Add(
// priceInsideOBObj,
// drawnObjects //
// );
// }
// }
//
// if (hasOldestBullishOB)
// {
// //
// XCBullishOrderBlockObject *iObj;
// bool isCreated = visionCycleHelper
// .mPOIDrawer
// .CreateBullishOrderBlock(
// oldestBullishOB,
// iObj //
// );
// if (isCreated)
// {
// }
// }
// //
// if (hasYoungestBullishOB)
// {
// //
// XCBullishOrderBlockObject *iObj;
// bool isCreated = visionCycleHelper
// .mPOIDrawer
// .CreateBullishOrderBlock(
// youngestBullishOB,
// iObj //
// );
// if (isCreated)
// {
// }
// }
// //
// if (hasOldestBearishOB)
// {
// //
// XCBearishOrderBlockObject *iObj;
// bool isCreated = visionCycleHelper
// .mPOIDrawer
// .CreateBearishOrderBlock(
// oldestBearishOB,
// iObj //
// );
// if (isCreated)
// {
// }
// }
// //
// if (hasYoungestBearishOB)
// {
// //
// XCBearishOrderBlockObject *iObj;
// bool isCreated = visionCycleHelper
// .mPOIDrawer
// .CreateBearishOrderBlock(
// youngestBearishOB,
// iObj //
// );
// if (isCreated)
// {
// }
// }
//
//
//
//
bool isSameCyclesPeak =
//
triggerXOBPVConditions.peaksBuffer[1] == decisionXOBPVConditions.peaksBuffer[1] &&
decisionXOBPVConditions.peaksBuffer[1] == analyseXOBPVConditions.peaksBuffer[1] &&
analyseXOBPVConditions.peaksBuffer[1] == verificationXOBPVConditions.peaksBuffer[1] &&
verificationXOBPVConditions.peaksBuffer[1] == consolidationXOBPVConditions.peaksBuffer[1]
analyseXOBPVConditions.peaksBuffer[1] == verificationXOBPVConditions.peaksBuffer[1]
// &&
// verificationXOBPVConditions.peaksBuffer[1] == consolidationXOBPVConditions.peaksBuffer[1]
//
;
@@ -933,14 +1127,15 @@ bool DetectX121SMCXOBPVSignalSetup(
//
triggerXOBPVConditions.valesBuffer[1] == decisionXOBPVConditions.valesBuffer[1] &&
decisionXOBPVConditions.valesBuffer[1] == analyseXOBPVConditions.valesBuffer[1] &&
analyseXOBPVConditions.valesBuffer[1] == verificationXOBPVConditions.valesBuffer[1] &&
verificationXOBPVConditions.valesBuffer[1] == consolidationXOBPVConditions.valesBuffer[1]
analyseXOBPVConditions.valesBuffer[1] == verificationXOBPVConditions.valesBuffer[1]
// &&
// verificationXOBPVConditions.valesBuffer[1] == consolidationXOBPVConditions.valesBuffer[1]
//
;
//
bool hasSameCyclesPV =
hasOBState &&
// hasOBState &&
hasPriceInsideOB &&
(isSameCyclesPeak ||
isSameCyclesVale);
@@ -1404,7 +1599,7 @@ bool DetectX121SMCXOBPVGuards(
true, // TrailStop Guard ...
true, // TrailTarget Guard ...
true // Hedge Guard ...
//
//
);
//
@@ -1491,34 +1686,3 @@ int AddX121SMCXOBPVConditionsIfNotExists(
}
//
// Draw Conditions ...
int DrawX121SMCXOBPVConditions(
X121SMCStrategyXOBPVSignalConditions &conditions,
XCBaseObject *&drawnObjects[],
XCPOIDrawer *drawer //
)
{
//
int result = 0;
//
Clean(drawnObjects);
//
if (drawer == NULL)
{
return result;
}
//
bool isSetuped = conditions.IsSetuped();
if (!isSetuped)
{
return result;
}
//
return result;
}
//