last ...
This commit is contained in:
@@ -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 ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user