Last Works ...

This commit is contained in:
2024-11-15 15:30:54 +03:30
parent d5ead24335
commit e0b2164515
2 changed files with 247 additions and 39 deletions
@@ -1418,6 +1418,42 @@ class XCX121SMCBaseStrategy : public XCBaseAlert
}
}
/**
* Add Specified Object to Drawn Objects if not Exists ...
*/
void AddObjectIfNotExists(XCBaseObject *object)
{
//
string name = object.ObjName();
//
bool canAdd = true;
int count = mDrawnObjects.Total();
if (IsValidSize(count))
{
//
for (int i = 0; i < count; i++)
{
//
string iName = ((XCBaseObject *)mDrawnObjects.At(i)).ObjName();
//
if (name == iName)
{
//
canAdd = false;
break;
}
}
}
//
if (canAdd)
{
mDrawnObjects.Add(object);
}
}
//
// Private ...
private:
@@ -1491,6 +1527,9 @@ class XCX121SMCBaseStrategy : public XCBaseAlert
//
// Initialize POIs ...
//
int poiRequired = 10;
//
// 1D Period ...
// POI Detector ...
@@ -1499,6 +1538,9 @@ class XCX121SMCBaseStrategy : public XCBaseAlert
PERIOD_D1 //
);
//
m1DPOI.MaxNumberOfRequiredPOIs(poiRequired);
//
m1DPOI.Init();
@@ -1510,6 +1552,9 @@ class XCX121SMCBaseStrategy : public XCBaseAlert
PERIOD_H4 //
);
//
m4HPOI.MaxNumberOfRequiredPOIs(poiRequired);
//
m4HPOI.Init();
@@ -1521,6 +1566,9 @@ class XCX121SMCBaseStrategy : public XCBaseAlert
PERIOD_H2 //
);
//
m2HPOI.MaxNumberOfRequiredPOIs(poiRequired);
//
m2HPOI.Init();
@@ -1532,6 +1580,9 @@ class XCX121SMCBaseStrategy : public XCBaseAlert
PERIOD_H1 //
);
//
m1HPOI.MaxNumberOfRequiredPOIs(poiRequired);
//
m1HPOI.Init();
@@ -1543,6 +1594,9 @@ class XCX121SMCBaseStrategy : public XCBaseAlert
PERIOD_M15 //
);
//
m15MPOI.MaxNumberOfRequiredPOIs(poiRequired);
//
m15MPOI.Init();
@@ -1554,6 +1608,9 @@ class XCX121SMCBaseStrategy : public XCBaseAlert
PERIOD_M5 //
);
//
m5MPOI.MaxNumberOfRequiredPOIs(poiRequired);
//
m5MPOI.Init();
@@ -1565,6 +1622,9 @@ class XCX121SMCBaseStrategy : public XCBaseAlert
PERIOD_M1 //
);
//
m1MPOI.MaxNumberOfRequiredPOIs(poiRequired);
//
m1MPOI.Init();
@@ -1682,42 +1742,6 @@ class XCX121SMCBaseStrategy : public XCBaseAlert
}
}
/**
* Add Specified Object to Drawn Objects if not Exists ...
*/
void AddObjectIfNotExists(XCBaseObject *object)
{
//
string name = object.ObjName();
//
bool canAdd = true;
int count = mDrawnObjects.Total();
if (IsValidSize(count))
{
//
for (int i = 0; i < count; i++)
{
//
string iName = ((XCBaseObject *)mDrawnObjects.At(i)).ObjName();
//
if (name == iName)
{
//
canAdd = false;
break;
}
}
}
//
if (canAdd)
{
mDrawnObjects.Add(object);
}
}
//
};