Fix Spread Passing for Signalling and Conditions Processing ...

This commit is contained in:
2024-12-09 23:04:42 +03:30
parent 317e8b8ba3
commit 812e468151
7 changed files with 475 additions and 282 deletions
@@ -123,15 +123,6 @@ class XCX121SMCTestStrategy : public XCX121SMCBaseStrategy
double pip = GetPipPrice(symbol);
double pip2 = 2 * pip;
//
// Detect Conditions ...
result = DetectConditions(conditions);
if (!result)
{
conditions.Clean();
return result;
}
//
// Check Spread ...
bool isSpreadPassed = IsSpreadPass();
@@ -146,6 +137,15 @@ class XCX121SMCTestStrategy : public XCX121SMCBaseStrategy
return result;
}
//
// Detect Conditions ...
result = DetectConditions(conditions);
if (!result)
{
conditions.Clean();
return result;
}
//
// Combine all Signals Conditions ...
selectedSL = conditions.sl;
@@ -425,53 +425,53 @@ class XCX121SMCTestStrategy : public XCX121SMCBaseStrategy
}
conditions.visionConditions.state = mVisionState;
//
// Detect Valid Supply and Demand Zones ...
XCSupplyZone *supplyZone;
XCDemandZone *demandZone;
result = mTriggerCycleHelper
.DetectValisSupplyZone(
cBar,
supplyZone,
demandZone //
);
if (!result)
{
//
conditions.Clean();
return result;
}
// //
// // Detect Valid Supply and Demand Zones ...
// XCSupplyZone *supplyZone;
// XCDemandZone *demandZone;
// result = mTriggerCycleHelper
// .DetectValisSupplyZone(
// cBar,
// supplyZone,
// demandZone //
// );
// if (!result)
// {
// //
// conditions.Clean();
// return result;
// }
//
supplyZone.To(cTime);
XCSupplyZoneObject *iSupplyZoneObj;
result = mPOIDrawer.CreateSupplyZone(
supplyZone,
iSupplyZoneObj //
);
if (!result)
{
//
conditions.Clean();
return result;
}
// //
// supplyZone.To(cTime);
// XCSupplyZoneObject *iSupplyZoneObj;
// result = mPOIDrawer.CreateSupplyZone(
// supplyZone,
// iSupplyZoneObj //
// );
// if (!result)
// {
// //
// conditions.Clean();
// return result;
// }
//
demandZone.To(cTime);
XCDemandZoneObject *iDemandZoneObj;
result = mPOIDrawer.CreateDemandZone(
demandZone,
iDemandZoneObj //
);
if (!result)
{
//
conditions.Clean();
return result;
}
// //
// demandZone.To(cTime);
// XCDemandZoneObject *iDemandZoneObj;
// result = mPOIDrawer.CreateDemandZone(
// demandZone,
// iDemandZoneObj //
// );
// if (!result)
// {
// //
// conditions.Clean();
// return result;
// }
//
Print("Supply and Demand Zone Created ...");
// //
// Print("Supply and Demand Zone Created ...");
//
if (!result)