last ...
This commit is contained in:
@@ -39,7 +39,7 @@ input string eaLogSuffix = ""; // Log Suffix
|
||||
// Symbols ...
|
||||
input group "Symbols";
|
||||
input bool eaMultiSymbol = false; // Use Multi Symbol
|
||||
input string eaSymbols = "EURUSDb,GBPUSDb,USDJPYb,USDCHFb"; // Trading Symbols
|
||||
input string eaSymbols = "EURUSDb,GBPUSDb,USDCHFb,USDJPYb,XAUUSDb"; // Trading Symbols
|
||||
|
||||
//
|
||||
// Signalling ...
|
||||
|
||||
@@ -42,7 +42,7 @@ class XCX121SMCBaseStrategy : public XCBaseAlert
|
||||
public:
|
||||
//
|
||||
XCAccount mAccount;
|
||||
|
||||
|
||||
//
|
||||
// Constructor(s) ...
|
||||
XCX121SMCBaseStrategy(
|
||||
@@ -264,6 +264,9 @@ class XCX121SMCBaseStrategy : public XCBaseAlert
|
||||
*/
|
||||
virtual void HandleTick()
|
||||
{
|
||||
//
|
||||
DoUnwaitedTicksWork();
|
||||
|
||||
//
|
||||
// Check State ...
|
||||
if (IsDisabled())
|
||||
@@ -426,6 +429,13 @@ class XCX121SMCBaseStrategy : public XCBaseAlert
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update all Requirements without waiting ...
|
||||
*/
|
||||
virtual void DoUnwaitedTicksWork()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Detect SL Candidates based on Strategy and Conditions ...
|
||||
*
|
||||
|
||||
@@ -605,13 +605,26 @@ class XC121SMCCycleHelper : public XCBase
|
||||
conditions.time = TimeCurrent();
|
||||
|
||||
//
|
||||
// Consolidation Zones Implement here ...
|
||||
Update();
|
||||
|
||||
//
|
||||
result = conditions.IsValid();
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Tools ...
|
||||
void Update()
|
||||
{
|
||||
//
|
||||
int czLoopback = 5;
|
||||
int maxAllowed = 20;
|
||||
bool isActiveConsolidationZoneBreaked = false;
|
||||
bool hasActiveConsolidationZone = mActiveConsolidationZone.IsValid();
|
||||
|
||||
//
|
||||
if (hasActiveConsolidationZone)
|
||||
{
|
||||
//
|
||||
@@ -626,33 +639,12 @@ class XC121SMCCycleHelper : public XCBase
|
||||
mConsolidationZones //
|
||||
);
|
||||
|
||||
//
|
||||
Add(
|
||||
CONSOLIDATION_BREAKED_DETECTED,
|
||||
events //
|
||||
);
|
||||
|
||||
//
|
||||
CleanupArray(
|
||||
mConsolidationZones,
|
||||
maxAllowed //
|
||||
);
|
||||
|
||||
// //
|
||||
// if (GetPeriod() == PERIOD_M5)
|
||||
// {
|
||||
// //
|
||||
// XCConsolidationZoneObject *czObj;
|
||||
// bool isCreated = mPOIDrawer.CreateConsolidationZone(
|
||||
// mActiveConsolidationZone,
|
||||
// czObj //
|
||||
// );
|
||||
// if (isCreated)
|
||||
// {
|
||||
// mConsolidationObjects.Add(czObj);
|
||||
// }
|
||||
// }
|
||||
|
||||
//
|
||||
mActiveConsolidationZone.Clean();
|
||||
}
|
||||
@@ -691,7 +683,7 @@ class XC121SMCCycleHelper : public XCBase
|
||||
GetPeriod(),
|
||||
upper,
|
||||
lower,
|
||||
loopback //
|
||||
czLoopback //
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -699,17 +691,8 @@ class XC121SMCCycleHelper : public XCBase
|
||||
//
|
||||
mBar.Clean();
|
||||
}
|
||||
|
||||
//
|
||||
result = conditions.IsValid();
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Tools ...
|
||||
|
||||
//
|
||||
// Virtuals ...
|
||||
|
||||
|
||||
@@ -454,6 +454,7 @@ class XCX121SMCXSupDemOBSSignalDetector : public XCBase
|
||||
RemoveDraws();
|
||||
result = false;
|
||||
mConditions.Clean();
|
||||
RemoveWorkingZoneDraws();
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -500,6 +501,7 @@ class XCX121SMCXSupDemOBSSignalDetector : public XCBase
|
||||
RemoveDraws();
|
||||
result = false;
|
||||
mConditions.Clean();
|
||||
RemoveWorkingZoneDraws();
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -722,6 +724,7 @@ class XCX121SMCXSupDemOBSSignalDetector : public XCBase
|
||||
|
||||
//
|
||||
RemoveDraws();
|
||||
RemoveWorkingZoneDraws();
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -864,6 +867,7 @@ class XCX121SMCXSupDemOBSSignalDetector : public XCBase
|
||||
|
||||
//
|
||||
RemoveDraws();
|
||||
RemoveWorkingZoneDraws();
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -1036,6 +1040,7 @@ class XCX121SMCXSupDemOBSSignalDetector : public XCBase
|
||||
|
||||
//
|
||||
RemoveDraws();
|
||||
RemoveWorkingZoneDraws();
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -1145,6 +1150,7 @@ class XCX121SMCXSupDemOBSSignalDetector : public XCBase
|
||||
|
||||
//
|
||||
RemoveDraws();
|
||||
RemoveWorkingZoneDraws();
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -1564,10 +1570,6 @@ class XCX121SMCXSupDemOBSSignalDetector : public XCBase
|
||||
//
|
||||
RemoveDraws();
|
||||
RemoveWorkingZoneDraws();
|
||||
DrawWorkingZone(
|
||||
mConditions,
|
||||
visionCycleHelper.mPOIDrawer //
|
||||
);
|
||||
|
||||
//
|
||||
// Set Target Based On Supply or Demand Zone ...
|
||||
@@ -1585,54 +1587,6 @@ class XCX121SMCXSupDemOBSSignalDetector : public XCBase
|
||||
{
|
||||
target = mConditions.workingZone.quarter3;
|
||||
}
|
||||
|
||||
//
|
||||
if (hasInsideZone)
|
||||
{
|
||||
//
|
||||
if (hasInsideOB)
|
||||
{
|
||||
//
|
||||
DrawOrderBlock(
|
||||
insideOB,
|
||||
visionCycleHelper.mPOIDrawer //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
if (hasInsideFVG)
|
||||
{
|
||||
//
|
||||
DrawFairValueGap(
|
||||
insideFVG,
|
||||
visionCycleHelper.mPOIDrawer //
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
if (hasRejectedZone)
|
||||
{
|
||||
//
|
||||
if (hasRejectedOB)
|
||||
{
|
||||
//
|
||||
DrawOrderBlock(
|
||||
rejectedOB,
|
||||
visionCycleHelper.mPOIDrawer //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
if (hasRejectedFVG)
|
||||
{
|
||||
//
|
||||
DrawFairValueGap(
|
||||
rejectedFVG,
|
||||
visionCycleHelper.mPOIDrawer //
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1907,8 +1861,8 @@ class XCX121SMCXSupDemOBSSignalDetector : public XCBase
|
||||
XC121SMCCycleHelper *consolidationCycleHelper,
|
||||
XC121SMCCycleHelper *visionCycleHelper,
|
||||
//
|
||||
int maxAllowedSetupAge = 60 //
|
||||
//
|
||||
int maxAllowedSetupAge = 60
|
||||
//
|
||||
)
|
||||
{
|
||||
//
|
||||
|
||||
@@ -321,23 +321,6 @@ class XCX121SMCStrategy : public XCX121SMCBaseStrategy
|
||||
if (useXSupDemOBSSignal &&
|
||||
hasXSupDemOBSSignal)
|
||||
{
|
||||
|
||||
//
|
||||
// Re Draw Working Zone ...
|
||||
mXSupDemONSSignalDetector.RemoveWorkingZoneDraws();
|
||||
mXSupDemONSSignalDetector.DrawWorkingZone(
|
||||
mXSupDemOBSConditions,
|
||||
mVisionCycleHelper.mPOIDrawer //
|
||||
);
|
||||
|
||||
//
|
||||
// Re Draw Working Zone ...
|
||||
mXSupDemONSSignalDetector.RemoveDraws();
|
||||
mXSupDemONSSignalDetector.DrawConditions(
|
||||
mXSupDemOBSConditions,
|
||||
mVisionCycleHelper.mPOIDrawer //
|
||||
);
|
||||
|
||||
//
|
||||
// Configuring Amount Percent and ETC ...
|
||||
bool ignoreEAVolume = mXSupDemOBSConditions.reward > 0 &&
|
||||
@@ -478,6 +461,60 @@ class XCX121SMCStrategy : public XCX121SMCBaseStrategy
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update all Requirements without waiting ...
|
||||
*/
|
||||
void DoUnwaitedTicksWork() override
|
||||
{
|
||||
//
|
||||
// Update All Cycle Helpers ...
|
||||
int zIndex = 0;
|
||||
int loopback = 7;
|
||||
|
||||
//
|
||||
// Decision ...
|
||||
mDecisionCycleHelper.Update();
|
||||
|
||||
// //
|
||||
// // Analyse ...
|
||||
// ENUM_XPOI_EVENTS analysePoiEvents[];
|
||||
// ENUM_X_CYCLE_EVENTS analyseCycleEvents[];
|
||||
// X121SMCCycleConditions analyseConditions;
|
||||
// mAnalyseCycleHelper.GetConditions(
|
||||
// analyseCycleEvents,
|
||||
// analysePoiEvents,
|
||||
// analyseConditions,
|
||||
// zIndex,
|
||||
// loopback //
|
||||
// );
|
||||
|
||||
// //
|
||||
// // Consolidation ...
|
||||
// ENUM_XPOI_EVENTS consolidationPoiEvents[];
|
||||
// ENUM_X_CYCLE_EVENTS consolidationCycleEvents[];
|
||||
// X121SMCCycleConditions consolidationConditions;
|
||||
// mConsolidationCycleHelper.GetConditions(
|
||||
// consolidationCycleEvents,
|
||||
// consolidationPoiEvents,
|
||||
// consolidationConditions,
|
||||
// zIndex,
|
||||
// loopback //
|
||||
// );
|
||||
|
||||
// //
|
||||
// // Vision ...
|
||||
// ENUM_XPOI_EVENTS visionPoiEvents[];
|
||||
// ENUM_X_CYCLE_EVENTS visionCycleEvents[];
|
||||
// X121SMCCycleConditions visionConditions;
|
||||
// mVisionCycleHelper.GetConditions(
|
||||
// visionCycleEvents,
|
||||
// visionPoiEvents,
|
||||
// visionConditions,
|
||||
// zIndex,
|
||||
// loopback //
|
||||
// );
|
||||
}
|
||||
|
||||
/**
|
||||
* Customize Strategy Identifier ...
|
||||
*/
|
||||
@@ -882,63 +919,6 @@ class XCX121SMCStrategy : public XCX121SMCBaseStrategy
|
||||
//
|
||||
int requiredPOIS = MaxAllowedRequiredPOIs();
|
||||
|
||||
//
|
||||
// Trigger Cycle ...
|
||||
// mTriggerCycleHelper = new XC121SMCCycleHelper();
|
||||
// isInited = mTriggerCycleHelper.Init(
|
||||
// symbol,
|
||||
// PERIOD_M1,
|
||||
// x121Inputs,
|
||||
// requiredPOIS //
|
||||
// );
|
||||
// if (isInited)
|
||||
// {
|
||||
// //
|
||||
// // Configure POI Drawer ...
|
||||
// color bullishColor = clrYellowGreen;
|
||||
// color bearishColor = clrChocolate;
|
||||
|
||||
// //
|
||||
// // Bars ...
|
||||
// mTriggerCycleHelper.mPOIDrawer.BarBullishColor(bullishColor);
|
||||
// mTriggerCycleHelper.mPOIDrawer.BarBearishColor(bearishColor);
|
||||
|
||||
// //
|
||||
// // Swings ...
|
||||
// mTriggerCycleHelper.mPOIDrawer.SwingLowColor(bullishColor);
|
||||
// mTriggerCycleHelper.mPOIDrawer.SwingHighColor(bearishColor);
|
||||
|
||||
// //
|
||||
// // Momentum ...
|
||||
// mTriggerCycleHelper.mPOIDrawer.BullishMomentumBarColor(bullishColor);
|
||||
// mTriggerCycleHelper.mPOIDrawer.BearishMomentumBarColor(bearishColor);
|
||||
|
||||
// //
|
||||
// // Rejection ...
|
||||
// mTriggerCycleHelper.mPOIDrawer.BullishRejectionBarColor(bullishColor);
|
||||
// mTriggerCycleHelper.mPOIDrawer.BearishRejectionBarColor(bearishColor);
|
||||
|
||||
// //
|
||||
// // Support and Resistance ...
|
||||
// mTriggerCycleHelper.mPOIDrawer.SupportZoneColor(bullishColor);
|
||||
// mTriggerCycleHelper.mPOIDrawer.ResistanceZoneColor(bearishColor);
|
||||
|
||||
// //
|
||||
// // Demand and Supply ...
|
||||
// mTriggerCycleHelper.mPOIDrawer.DemandZoneColor(bullishColor);
|
||||
// mTriggerCycleHelper.mPOIDrawer.SupplyZoneColor(bearishColor);
|
||||
|
||||
// //
|
||||
// // Order Blocks ...
|
||||
// mTriggerCycleHelper.mPOIDrawer.BullishOrderBlockColor(bullishColor);
|
||||
// mTriggerCycleHelper.mPOIDrawer.BearishOrderBlockColor(bearishColor);
|
||||
|
||||
// //
|
||||
// // Fair Value Gaps ...
|
||||
// mTriggerCycleHelper.mPOIDrawer.BullishFVGColor(bullishColor);
|
||||
// mTriggerCycleHelper.mPOIDrawer.BearishFVGColor(bearishColor);
|
||||
// }
|
||||
|
||||
//
|
||||
// Decision Cycle ...
|
||||
mDecisionCycleHelper = new XC121SMCCycleHelper();
|
||||
@@ -1053,63 +1033,6 @@ class XCX121SMCStrategy : public XCX121SMCBaseStrategy
|
||||
mAnalyseCycleHelper.mPOIDrawer.BearishFVGColor(bearishColor);
|
||||
}
|
||||
|
||||
// //
|
||||
// // Verification Cycle ...
|
||||
// mVerificationCycleHelper = new XC121SMCCycleHelper();
|
||||
// isInited = mVerificationCycleHelper.Init(
|
||||
// symbol,
|
||||
// PERIOD_M30,
|
||||
// // x121Inputs,
|
||||
// requiredPOIS //
|
||||
// );
|
||||
// if (isInited)
|
||||
// {
|
||||
// //
|
||||
// // Configure POI Drawer ...
|
||||
// color bullishColor = clrOliveDrab;
|
||||
// color bearishColor = clrSteelBlue;
|
||||
|
||||
// //
|
||||
// // Bars ...
|
||||
// mVerificationCycleHelper.mPOIDrawer.BarBullishColor(bullishColor);
|
||||
// mVerificationCycleHelper.mPOIDrawer.BarBearishColor(bearishColor);
|
||||
|
||||
// //
|
||||
// // Swings ...
|
||||
// mVerificationCycleHelper.mPOIDrawer.SwingLowColor(bullishColor);
|
||||
// mVerificationCycleHelper.mPOIDrawer.SwingHighColor(bearishColor);
|
||||
|
||||
// //
|
||||
// // Momentum ...
|
||||
// mVerificationCycleHelper.mPOIDrawer.BullishMomentumBarColor(bullishColor);
|
||||
// mVerificationCycleHelper.mPOIDrawer.BearishMomentumBarColor(bearishColor);
|
||||
|
||||
// //
|
||||
// // Rejection ...
|
||||
// mVerificationCycleHelper.mPOIDrawer.BullishRejectionBarColor(bullishColor);
|
||||
// mVerificationCycleHelper.mPOIDrawer.BearishRejectionBarColor(bearishColor);
|
||||
|
||||
// //
|
||||
// // Support and Resistance ...
|
||||
// mVerificationCycleHelper.mPOIDrawer.SupportZoneColor(bullishColor);
|
||||
// mVerificationCycleHelper.mPOIDrawer.ResistanceZoneColor(bearishColor);
|
||||
|
||||
// //
|
||||
// // Demand and Supply ...
|
||||
// mVerificationCycleHelper.mPOIDrawer.DemandZoneColor(bullishColor);
|
||||
// mVerificationCycleHelper.mPOIDrawer.SupplyZoneColor(bearishColor);
|
||||
|
||||
// //
|
||||
// // Order Blocks ...
|
||||
// mVerificationCycleHelper.mPOIDrawer.BullishOrderBlockColor(bullishColor);
|
||||
// mVerificationCycleHelper.mPOIDrawer.BearishOrderBlockColor(bearishColor);
|
||||
|
||||
// //
|
||||
// // Fair Value Gaps ...
|
||||
// mVerificationCycleHelper.mPOIDrawer.BullishFVGColor(bullishColor);
|
||||
// mVerificationCycleHelper.mPOIDrawer.BearishFVGColor(bearishColor);
|
||||
// }
|
||||
|
||||
//
|
||||
// Consolidation Cycle ...
|
||||
mConsolidationCycleHelper = new XC121SMCCycleHelper();
|
||||
|
||||
Reference in New Issue
Block a user