last works ...
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
|
||||
//
|
||||
// Imports ...
|
||||
#include "../../Classes/x-saherelm.x-poi.drawer.class.mq5"
|
||||
#include "../../Helpers/x-saherelm.xom1.helper.mq5"
|
||||
#include "../Libraries/xom1ea.lib.mq5"
|
||||
|
||||
@@ -39,7 +40,8 @@ struct XOM1SignallerConfig
|
||||
|
||||
//
|
||||
// Constructor ...
|
||||
XOM1SignallerConfig() {
|
||||
XOM1SignallerConfig()
|
||||
{
|
||||
Clean();
|
||||
}
|
||||
|
||||
@@ -49,7 +51,8 @@ struct XOM1SignallerConfig
|
||||
/**
|
||||
* Cleanup ...
|
||||
*/
|
||||
void Clean() {
|
||||
void Clean()
|
||||
{
|
||||
ZeroMemory(this);
|
||||
}
|
||||
};
|
||||
@@ -73,6 +76,7 @@ class XCXOM1SignallerBase
|
||||
XOM1Inputs inputs; // Indicator Inputs ...
|
||||
ENUM_TIMEFRAMES period; // Period ...
|
||||
XOM1SignallerConfig config; // Configuration ...
|
||||
XCPOIDrawer drawer; // POI Drawer ...
|
||||
|
||||
//
|
||||
// Constructor ...
|
||||
@@ -133,6 +137,9 @@ class XCXOM1SignallerBase
|
||||
//
|
||||
inputs.Clean();
|
||||
|
||||
//
|
||||
mObjects.Clear();
|
||||
|
||||
//
|
||||
SpecifiedClean(zones);
|
||||
|
||||
@@ -201,6 +208,11 @@ class XCXOM1SignallerBase
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// Set Last Works ...
|
||||
mProcessedTicksCount++;
|
||||
mLastCheckedBarTime = cBarTime;
|
||||
|
||||
//
|
||||
// Initialize iBar ...
|
||||
has = iBar.Init(
|
||||
@@ -239,9 +251,9 @@ class XCXOM1SignallerBase
|
||||
|
||||
//
|
||||
int zIdx = 0;
|
||||
int cIdx = zIdx++;
|
||||
int pIdx = cIdx++;
|
||||
int p2Idx = pIdx++;
|
||||
int cIdx = zIdx + 1;
|
||||
int pIdx = cIdx + 1;
|
||||
int p2Idx = pIdx + 1;
|
||||
|
||||
//
|
||||
// Check New Peak or Vale Happens ...
|
||||
@@ -306,7 +318,8 @@ class XCXOM1SignallerBase
|
||||
iPrice,
|
||||
iDir,
|
||||
iReason,
|
||||
iConditions.bars[pIdx].time // From ...
|
||||
iConditions.bars[pIdx].time, // From ...
|
||||
iConditions.bars[cIdx].time // To
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
@@ -318,11 +331,6 @@ class XCXOM1SignallerBase
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// Set Last Works ...
|
||||
mProcessedTicksCount++;
|
||||
mLastCheckedBarTime = cBarTime;
|
||||
|
||||
//
|
||||
// Clean Resources ...
|
||||
iBar.Clean();
|
||||
@@ -342,6 +350,9 @@ class XCXOM1SignallerBase
|
||||
//
|
||||
// Props ...
|
||||
|
||||
//
|
||||
CArrayObj mObjects; // Drawn Objects ...
|
||||
|
||||
//
|
||||
XCXOM1Helper *mHelper; // Indicator Helper ...
|
||||
|
||||
@@ -375,9 +386,35 @@ class XCXOM1SignallerBase
|
||||
{
|
||||
//
|
||||
// Update Lifetime by Bar Index ...
|
||||
zones[i].UpdateByBarIndex(barIndex);
|
||||
// zones[i].UpdateByBarIndex(barIndex);
|
||||
|
||||
//
|
||||
// COnverts to Box ...
|
||||
XBoxZone iBox;
|
||||
has = zones[i].ToBox(iBox);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
XCBoxObject *iBoxObj;
|
||||
has = drawer.DrawBox(
|
||||
iBox,
|
||||
iBoxObj,
|
||||
true // Ignore At ...
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
mObjects.Add(iBoxObj);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
iBox.Clean();
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Check XOMZones Validations ...
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user