last ...
This commit is contained in:
@@ -172,174 +172,11 @@ class XCXCAEASignaller : XCBase
|
||||
);
|
||||
|
||||
//
|
||||
bool drawSWHPivots = true;
|
||||
bool drawSWLPivots = true;
|
||||
bool drawPeakPivots = false;
|
||||
bool drawValePivots = false;
|
||||
DrawPivots();
|
||||
|
||||
//
|
||||
// Draw Peak SWH Res Pivots ...
|
||||
if (drawPeakPivots)
|
||||
{
|
||||
//
|
||||
has = detector.HasPeakSWHResPivots();
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
count = detector.CountPeakSWHResPivots();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox;
|
||||
has = detector
|
||||
.peakSWHResPivots[i]
|
||||
.AsBox(iBox);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
iBox.to = cTime;
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = helper.poiDrawer.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
iBox.Clean();
|
||||
}
|
||||
|
||||
//
|
||||
Print("Draw Peak SWH Res Pivots ...");
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Draw Vale SWL Sup Pivots ...
|
||||
if (drawValePivots)
|
||||
{
|
||||
//
|
||||
has = detector.HasValeSWLSupPivots();
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
count = detector.CountValeSWLSupPivots();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox;
|
||||
has = detector
|
||||
.valeSWLSupPivots[i]
|
||||
.AsBox(iBox);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
iBox.to = cTime;
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = helper.poiDrawer.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
iBox.Clean();
|
||||
}
|
||||
|
||||
//
|
||||
Print("Draw Vale SWL Sup Pivots ...");
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Draw SWH Pvots ...
|
||||
if (drawSWHPivots)
|
||||
{
|
||||
//
|
||||
has = detector.HasSWHPivots();
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
count = detector.CountSWHPivots();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox;
|
||||
has = detector
|
||||
.swhPivots[i]
|
||||
.AsBox(iBox);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
iBox.to = cTime;
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = helper
|
||||
.poiDrawer
|
||||
.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Draw SWL Pvots ...
|
||||
if (drawSWLPivots)
|
||||
{
|
||||
//
|
||||
has = detector.HasSWLPivots();
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
count = detector.CountSWLPivots();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox;
|
||||
has = detector
|
||||
.swlPivots[i]
|
||||
.AsBox(iBox);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
iBox.to = cTime;
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = helper
|
||||
.poiDrawer
|
||||
.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
XCAEAConditions conditions;
|
||||
@@ -678,6 +515,419 @@ class XCXCAEASignaller : XCBase
|
||||
protected:
|
||||
//
|
||||
|
||||
//
|
||||
void DrawPivots()
|
||||
{
|
||||
//
|
||||
int count = 0;
|
||||
bool has = false;
|
||||
datetime cTime = TimeCurrent();
|
||||
|
||||
//
|
||||
bool drawSWHPivots = false;
|
||||
bool drawSWLPivots = false;
|
||||
bool drawPeakPivots = false;
|
||||
bool drawValePivots = false;
|
||||
bool drawKIBullishPivots = false;
|
||||
bool drawKIBearishPivots = false;
|
||||
bool drawTKIBullishPivots = false;
|
||||
bool drawTKIBearishPivots = false;
|
||||
bool drawTrendBullishPivots = true;
|
||||
bool drawTrendBearishPivots = true;
|
||||
|
||||
//
|
||||
// Draw Peak SWH Res Pivots ...
|
||||
if (drawPeakPivots)
|
||||
{
|
||||
//
|
||||
has = detector.HasPeakSWHResPivots();
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
count = detector.CountPeakSWHResPivots();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox;
|
||||
has = detector
|
||||
.peakSWHResPivots[i]
|
||||
.AsBox(iBox);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
iBox.to = cTime;
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = helper.poiDrawer.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
iBox.Clean();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Draw Vale SWL Sup Pivots ...
|
||||
if (drawValePivots)
|
||||
{
|
||||
//
|
||||
has = detector.HasValeSWLSupPivots();
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
count = detector.CountValeSWLSupPivots();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox;
|
||||
has = detector
|
||||
.valeSWLSupPivots[i]
|
||||
.AsBox(iBox);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
iBox.to = cTime;
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = helper.poiDrawer.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
iBox.Clean();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Draw SWH Pvots ...
|
||||
if (drawSWHPivots)
|
||||
{
|
||||
//
|
||||
has = detector.HasSWHPivots();
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
count = detector.CountSWHPivots();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox;
|
||||
has = detector
|
||||
.swhPivots[i]
|
||||
.AsBox(iBox);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
iBox.to = cTime;
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = helper
|
||||
.poiDrawer
|
||||
.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Draw SWL Pvots ...
|
||||
if (drawSWLPivots)
|
||||
{
|
||||
//
|
||||
has = detector.HasSWLPivots();
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
count = detector.CountSWLPivots();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox;
|
||||
has = detector
|
||||
.swlPivots[i]
|
||||
.AsBox(iBox);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
iBox.to = cTime;
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = helper
|
||||
.poiDrawer
|
||||
.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Draw KI Bullish Pivots ...
|
||||
if (drawKIBullishPivots)
|
||||
{
|
||||
//
|
||||
has = detector.HasKIBullishPivots();
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
count = detector.CountKIBullishPivots();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox;
|
||||
has = detector
|
||||
.kiBullishPivots[i]
|
||||
.AsBox(iBox);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
iBox.to = cTime;
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = helper
|
||||
.poiDrawer
|
||||
.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Draw KI Bearish Pivots ...
|
||||
if (drawKIBearishPivots)
|
||||
{
|
||||
//
|
||||
has = detector.HasKIBullishPivots();
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
count = detector.CountKIBearishPivots();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox;
|
||||
has = detector
|
||||
.kiBearishPivots[i]
|
||||
.AsBox(iBox);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
iBox.to = cTime;
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = helper
|
||||
.poiDrawer
|
||||
.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Draw TKI Bullish Pivots ...
|
||||
if (drawTKIBullishPivots)
|
||||
{
|
||||
//
|
||||
has = detector.HasTKIBullishPivots();
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
count = detector.CountTKIBullishPivots();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox;
|
||||
has = detector
|
||||
.tkiBullishPivots[i]
|
||||
.AsBox(iBox);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// iBox.to = cTime;
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = helper
|
||||
.poiDrawer
|
||||
.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Draw TKI Bearish Pivots ...
|
||||
if (drawTKIBearishPivots)
|
||||
{
|
||||
//
|
||||
has = detector.HasTKIBullishPivots();
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
count = detector.CountTKIBearishPivots();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox;
|
||||
has = detector
|
||||
.tkiBearishPivots[i]
|
||||
.AsBox(iBox);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// iBox.to = cTime;
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = helper
|
||||
.poiDrawer
|
||||
.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Draw Trend Bullish Pivots ...
|
||||
if (drawTrendBullishPivots)
|
||||
{
|
||||
//
|
||||
has = detector.HasTrendBullishPivots();
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
count = detector.CountTrendBullishPivots();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox;
|
||||
has = detector
|
||||
.trendBullishPivots[i]
|
||||
.AsBox(iBox);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// iBox.to = cTime;
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = helper
|
||||
.poiDrawer
|
||||
.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Draw Trend Bearish Pivots ...
|
||||
if (drawTrendBearishPivots)
|
||||
{
|
||||
//
|
||||
has = detector.HasTrendBullishPivots();
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
count = detector.CountTrendBearishPivots();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox;
|
||||
has = detector
|
||||
.trendBearishPivots[i]
|
||||
.AsBox(iBox);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// iBox.to = cTime;
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = helper
|
||||
.poiDrawer
|
||||
.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Private ...
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user