last ...
This commit is contained in:
@@ -659,19 +659,20 @@ string mTriggerBarConditions;
|
|||||||
// POI(s) ...
|
// POI(s) ...
|
||||||
|
|
||||||
//
|
//
|
||||||
XBoxZone tmpBoxes[];
|
bool mDrawLiquidities = false;
|
||||||
|
bool mDetectLiquidities = true;
|
||||||
|
|
||||||
//
|
//
|
||||||
bool mDrawLiquidities = true;
|
bool mDrawRangeBreakes = true;
|
||||||
bool mDetectLiquidities = true;
|
bool mDetectRangeBreakes = true;
|
||||||
|
|
||||||
//
|
//
|
||||||
XBoxZone mBullishLiquidities[];
|
XBoxZone mBullishLiquidities[];
|
||||||
XBoxZone mBearishLiquidities[];
|
XBoxZone mBearishLiquidities[];
|
||||||
|
|
||||||
// //
|
//
|
||||||
// XBoxZone mBullishLiquidities[];
|
XBoxZone mBullishRangeBreakes[];
|
||||||
// XBoxZone mBearishLiquidities[];
|
XBoxZone mBearishRangeBreakes[];
|
||||||
|
|
||||||
//
|
//
|
||||||
// Counters ...
|
// Counters ...
|
||||||
@@ -4603,6 +4604,133 @@ void DetectPOIs(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Range Breakes ...
|
||||||
|
int mRangeBreakesMinLength = 5;
|
||||||
|
if (mDetectRangeBreakes)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
XBoxZone iRB;
|
||||||
|
|
||||||
|
//
|
||||||
|
iRB.type = "XRNGB";
|
||||||
|
iRB.at = iPBar.time;
|
||||||
|
iRB.to = iPBar.time;
|
||||||
|
iRB.symbol = _Symbol;
|
||||||
|
iRB.period = _Period;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Bullish ...
|
||||||
|
bool isBullishPeakPOI =
|
||||||
|
(isSamePeakOverLast
|
||||||
|
// &&
|
||||||
|
// mSamePeakCount >= mRangeBreakesMinLength
|
||||||
|
);
|
||||||
|
bool isBullishValePOI =
|
||||||
|
(isSameValeOverLast
|
||||||
|
// &&
|
||||||
|
// mSameValeCount >= mRangeBreakesMinLength
|
||||||
|
);
|
||||||
|
mHas =
|
||||||
|
isBullishPeakPOI ||
|
||||||
|
isBullishValePOI;
|
||||||
|
if (mHas)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
Print("Bullish PV: ", mSamePeakCount, ",", mSameValeCount);
|
||||||
|
|
||||||
|
//
|
||||||
|
if (isBullishPeakPOI)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
iRB.lower = mSamePeakGoldenMax;
|
||||||
|
iRB.upper = peakBuffer[barIndex + 1];
|
||||||
|
|
||||||
|
//
|
||||||
|
iRB.from = iPBar.time - (mSamePeakCount * PeriodSeconds(_Period));
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
if (isBullishValePOI)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
iRB.upper = mSameValeGoldenMin;
|
||||||
|
iRB.lower = valeBuffer[barIndex + 1];
|
||||||
|
|
||||||
|
//
|
||||||
|
iRB.from = iPBar.time - (mSameValeCount * PeriodSeconds(_Period));
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
iRB.dir = X_DIRECTION_BULLISH;
|
||||||
|
|
||||||
|
//
|
||||||
|
if (iRB.IsValid())
|
||||||
|
{
|
||||||
|
//
|
||||||
|
AddIfNotExists(
|
||||||
|
iRB,
|
||||||
|
mBullishRangeBreakes //
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Bearish ...
|
||||||
|
bool isBearishPeakPOI =
|
||||||
|
(isSamePeakUnderLast &&
|
||||||
|
mSamePeakCount >= mRangeBreakesMinLength);
|
||||||
|
bool isBearishValePOI =
|
||||||
|
(isSameValeUnderLast &&
|
||||||
|
mSameValeCount >= mRangeBreakesMinLength);
|
||||||
|
mHas =
|
||||||
|
isBearishPeakPOI ||
|
||||||
|
isBearishValePOI;
|
||||||
|
if (mHas)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
Print("Bearish PV ...");
|
||||||
|
|
||||||
|
//
|
||||||
|
if (isBearishPeakPOI)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
iRB.lower = mSamePeakGoldenMax;
|
||||||
|
iRB.upper = peakBuffer[barIndex + 1];
|
||||||
|
|
||||||
|
//
|
||||||
|
iRB.from = iPBar.time - (mSamePeakCount * PeriodSeconds(_Period));
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
if (isBearishValePOI)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
iRB.upper = mSameValeGoldenMin;
|
||||||
|
iRB.lower = valeBuffer[barIndex + 1];
|
||||||
|
|
||||||
|
//
|
||||||
|
iRB.from = iPBar.time - (mSameValeCount * PeriodSeconds(_Period));
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
iRB.dir = X_DIRECTION_BEARISH;
|
||||||
|
|
||||||
|
//
|
||||||
|
if (iRB.IsValid())
|
||||||
|
{
|
||||||
|
//
|
||||||
|
AddIfNotExists(
|
||||||
|
iRB,
|
||||||
|
mBearishRangeBreakes //
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
iRB.Clean();
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Cleanup Resources ...
|
// Cleanup Resources ...
|
||||||
|
|
||||||
@@ -4692,6 +4820,13 @@ void DrawPOIs(
|
|||||||
const long &tickVolume[] //
|
const long &tickVolume[] //
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
//
|
||||||
|
datetime to = GetBarTime(
|
||||||
|
_Symbol,
|
||||||
|
_Period,
|
||||||
|
barIndex //
|
||||||
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Liquidities ...
|
// Liquidities ...
|
||||||
if (mDrawLiquidities)
|
if (mDrawLiquidities)
|
||||||
@@ -4707,6 +4842,7 @@ void DrawPOIs(
|
|||||||
{
|
{
|
||||||
//
|
//
|
||||||
XBoxZone iBox = mBullishLiquidities[i];
|
XBoxZone iBox = mBullishLiquidities[i];
|
||||||
|
iBox.to = to;
|
||||||
|
|
||||||
//
|
//
|
||||||
XCBoxObject *iBObj;
|
XCBoxObject *iBObj;
|
||||||
@@ -4735,6 +4871,70 @@ void DrawPOIs(
|
|||||||
{
|
{
|
||||||
//
|
//
|
||||||
XBoxZone iBox = mBearishLiquidities[i];
|
XBoxZone iBox = mBearishLiquidities[i];
|
||||||
|
iBox.to = to;
|
||||||
|
|
||||||
|
//
|
||||||
|
XCBoxObject *iBObj;
|
||||||
|
mHas = mDrawer.DrawBox(
|
||||||
|
iBox,
|
||||||
|
iBObj //
|
||||||
|
);
|
||||||
|
if (mHas)
|
||||||
|
{
|
||||||
|
mObjects.Add(iBObj);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
iBox.Clean();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Range Breakes ...
|
||||||
|
if (mDrawRangeBreakes)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// Bullish ...
|
||||||
|
mCount = ArraySize(mBullishRangeBreakes);
|
||||||
|
mHas = IsValidSize(mCount);
|
||||||
|
if (mHas)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
for (int i = 0; i < mCount; i++)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
XBoxZone iBox = mBullishRangeBreakes[i];
|
||||||
|
iBox.to = to;
|
||||||
|
|
||||||
|
//
|
||||||
|
XCBoxObject *iBObj;
|
||||||
|
mHas = mDrawer.DrawBox(
|
||||||
|
iBox,
|
||||||
|
iBObj //
|
||||||
|
);
|
||||||
|
if (mHas)
|
||||||
|
{
|
||||||
|
mObjects.Add(iBObj);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
iBox.Clean();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Bearish ...
|
||||||
|
mCount = ArraySize(mBearishRangeBreakes);
|
||||||
|
mHas = IsValidSize(mCount);
|
||||||
|
if (mHas)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
for (int i = 0; i < mCount; i++)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
XBoxZone iBox = mBearishRangeBreakes[i];
|
||||||
|
iBox.to = to;
|
||||||
|
|
||||||
//
|
//
|
||||||
XCBoxObject *iBObj;
|
XCBoxObject *iBObj;
|
||||||
|
|||||||
@@ -1213,11 +1213,6 @@ void ValidateBoxes(
|
|||||||
//
|
//
|
||||||
// Select Indexed Box ...
|
// Select Indexed Box ...
|
||||||
XBoxZone iBox = tmp[0];
|
XBoxZone iBox = tmp[0];
|
||||||
datetime to = GetBarTime(
|
|
||||||
iBox.symbol,
|
|
||||||
iBox.period,
|
|
||||||
barIndex //
|
|
||||||
);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Remove Indexed Box ...
|
// Remove Indexed Box ...
|
||||||
@@ -1236,9 +1231,6 @@ void ValidateBoxes(
|
|||||||
);
|
);
|
||||||
if (has)
|
if (has)
|
||||||
{
|
{
|
||||||
//
|
|
||||||
iBox.to = to;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
AddRef(
|
AddRef(
|
||||||
iBox,
|
iBox,
|
||||||
|
|||||||
Reference in New Issue
Block a user