last works ...
This commit is contained in:
@@ -931,6 +931,883 @@ if (has)
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
|
||||
//
|
||||
bool GeneratePVBox(
|
||||
XBoxZone &box,
|
||||
int barIndex = 0 //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
if (barIndex < 0)
|
||||
{
|
||||
barIndex = 0;
|
||||
}
|
||||
|
||||
//
|
||||
box.Clean();
|
||||
box.symbol = GetSymbol();
|
||||
box.period = GetPeriod();
|
||||
|
||||
//
|
||||
int index = barIndex;
|
||||
|
||||
//
|
||||
// Peak ...
|
||||
datetime peaksSameFrom = NULL;
|
||||
double peak = mX121Helper.xpvHelper.GetPeak(index);
|
||||
double prevPeak = mX121Helper.xpvHelper.GetPeak(index + 1);
|
||||
bool startsByPeak = peak == prevPeak;
|
||||
|
||||
//
|
||||
// Vale ...
|
||||
datetime valesSameFrom = NULL;
|
||||
double vale = mX121Helper.xpvHelper.GetVale(index);
|
||||
double prevVale = mX121Helper.xpvHelper.GetVale(index + 1);
|
||||
bool startsByVale =
|
||||
!startsByPeak &&
|
||||
vale == prevVale;
|
||||
|
||||
//
|
||||
bool canBreak = false;
|
||||
while (!canBreak)
|
||||
{
|
||||
//
|
||||
index++;
|
||||
|
||||
//
|
||||
datetime cTime = iTime(
|
||||
box.symbol,
|
||||
box.period,
|
||||
index //
|
||||
);
|
||||
|
||||
//
|
||||
// Peak ...
|
||||
double iPeak = mX121Helper.xpvHelper.GetPeak(index);
|
||||
|
||||
//
|
||||
// Vale ...
|
||||
double iVale = mX121Helper.xpvHelper.GetVale(index);
|
||||
|
||||
//
|
||||
// Start By Peak or Value ...
|
||||
bool isSame = false;
|
||||
if (startsByPeak)
|
||||
{
|
||||
//
|
||||
isSame = iPeak == peak;
|
||||
bool canSetVale = vale == 0
|
||||
? true
|
||||
: iVale > vale;
|
||||
if (canSetVale)
|
||||
{
|
||||
vale = iVale;
|
||||
}
|
||||
}
|
||||
else if (startsByVale)
|
||||
{
|
||||
//
|
||||
isSame = iVale == vale;
|
||||
bool canSetPeak = peak == 0
|
||||
? true
|
||||
: iPeak < peak;
|
||||
if (canSetPeak)
|
||||
{
|
||||
peak = iPeak;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
if (isSame)
|
||||
{
|
||||
//
|
||||
box.from = cTime;
|
||||
box.upper = peak;
|
||||
box.lower = vale;
|
||||
}
|
||||
else if (IsValid(box.from))
|
||||
{
|
||||
//
|
||||
// Complete Box ...
|
||||
box.to = iTime(
|
||||
box.symbol,
|
||||
box.period,
|
||||
barIndex //
|
||||
);
|
||||
|
||||
//
|
||||
box.type = "XPVBox";
|
||||
box.dir = startsByPeak
|
||||
? X_DIRECTION_BEARISH
|
||||
: startsByVale
|
||||
? X_DIRECTION_BULLISH
|
||||
: X_DIRECTION_NONE;
|
||||
}
|
||||
|
||||
//
|
||||
canBreak = !isSame;
|
||||
}
|
||||
|
||||
//
|
||||
result = box.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
box.Clean();
|
||||
}
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
void DetectPVPivots(
|
||||
int barIndex = 0,
|
||||
int validation = 50,
|
||||
int loopback = 100 //
|
||||
)
|
||||
{
|
||||
//
|
||||
if (barIndex < 0)
|
||||
{
|
||||
barIndex = 0;
|
||||
}
|
||||
|
||||
//
|
||||
loopback = NormalizeInt(loopback, 10);
|
||||
validation = NormalizeInt(validation, 5);
|
||||
|
||||
//
|
||||
int iPeakVerified = 0;
|
||||
int iValeVerified = 0;
|
||||
datetime iPeakTo = GetBarTime(
|
||||
GetSymbol(),
|
||||
GetPeriod(),
|
||||
barIndex //
|
||||
);
|
||||
datetime iValeTo = GetBarTime(
|
||||
GetSymbol(),
|
||||
GetPeriod(),
|
||||
barIndex //
|
||||
);
|
||||
double iPeak = mX121Helper.xpvHelper.GetPeak(barIndex);
|
||||
double iVale = mX121Helper.xpvHelper.GetVale(barIndex);
|
||||
double iPeakGolden = mX121Helper.xpvHelper.GetPeakGoldenZone(barIndex);
|
||||
double iValeGolden = mX121Helper.xpvHelper.GetValeGoldenZone(barIndex);
|
||||
for (int i = barIndex + 1; i < barIndex + 1 + loopback; i++)
|
||||
{
|
||||
//
|
||||
double iiPeak = mX121Helper.xpvHelper.GetPeak(i);
|
||||
double iiVale = mX121Helper.xpvHelper.GetVale(i);
|
||||
double iiPeakGolden = mX121Helper.xpvHelper.GetPeakGoldenZone(i);
|
||||
double iiValeGolden = mX121Helper.xpvHelper.GetValeGoldenZone(i);
|
||||
|
||||
//
|
||||
if (iiPeak == iPeak)
|
||||
{
|
||||
//
|
||||
iPeakVerified++;
|
||||
iPeakGolden = iPeakGolden < iiPeakGolden
|
||||
? iiPeakGolden
|
||||
: iPeakGolden;
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
if (iPeakVerified > 0 &&
|
||||
iPeakVerified < validation)
|
||||
{
|
||||
//
|
||||
// Reset ...
|
||||
iPeak = iiPeak;
|
||||
iPeakVerified = 0;
|
||||
iPeakGolden = iiPeakGolden;
|
||||
iPeakTo = GetBarTime(
|
||||
GetSymbol(),
|
||||
GetPeriod(),
|
||||
i //
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
if (iiVale == iVale)
|
||||
{
|
||||
//
|
||||
iValeVerified++;
|
||||
iValeGolden = iValeGolden > iiValeGolden
|
||||
? iiValeGolden
|
||||
: iValeGolden;
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
if (iValeVerified > 0 &&
|
||||
iValeVerified < validation)
|
||||
{
|
||||
//
|
||||
// Reset ...
|
||||
iVale = iiVale;
|
||||
iValeVerified = 0;
|
||||
iValeGolden = iiValeGolden;
|
||||
iValeTo = GetBarTime(
|
||||
GetSymbol(),
|
||||
GetPeriod(),
|
||||
i //
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
if (iPeakVerified >= validation &&
|
||||
iValeVerified >= validation)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Checking PV Pivots ...
|
||||
|
||||
//
|
||||
if (iPeakVerified >= validation)
|
||||
{
|
||||
//
|
||||
XPVPivot iPivot;
|
||||
|
||||
//
|
||||
iPivot.to = iPeakTo;
|
||||
iPivot.value = iPeak;
|
||||
iPivot.type = X_PV_PEAK;
|
||||
iPivot.golden = iPeakGolden;
|
||||
iPivot.symbol = GetSymbol();
|
||||
iPivot.period = GetPeriod();
|
||||
iPivot.from = ((datetime)iPeakTo - (PeriodSeconds(GetPeriod()) * iPeakVerified));
|
||||
|
||||
//
|
||||
if (iPivot.IsValid())
|
||||
{
|
||||
//
|
||||
AddRef(
|
||||
iPivot,
|
||||
mPVPivots //
|
||||
);
|
||||
|
||||
//
|
||||
XBoxZone iBox;
|
||||
XCBoxObject *iObj;
|
||||
bool iHas = iPivot.AsBox(iBox);
|
||||
if (iHas)
|
||||
{
|
||||
//
|
||||
iHas = mPOIDrawer.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
);
|
||||
if (iHas)
|
||||
{
|
||||
Print("Peak Pivot ...");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
iPivot.Clean();
|
||||
}
|
||||
|
||||
//
|
||||
if (iValeVerified >= validation)
|
||||
{
|
||||
//
|
||||
XPVPivot iPivot;
|
||||
|
||||
//
|
||||
iPivot.to = iValeTo;
|
||||
iPivot.value = iVale;
|
||||
iPivot.type = X_PV_VALE;
|
||||
iPivot.symbol = GetSymbol();
|
||||
iPivot.period = GetPeriod();
|
||||
iPivot.golden = iValeGolden;
|
||||
iPivot.from = ((datetime)iValeTo - (PeriodSeconds(GetPeriod()) * iValeVerified));
|
||||
|
||||
//
|
||||
if (iPivot.IsValid())
|
||||
{
|
||||
//
|
||||
AddRef(
|
||||
iPivot,
|
||||
mPVPivots //
|
||||
);
|
||||
|
||||
//
|
||||
XBoxZone iBox;
|
||||
XCBoxObject *iObj;
|
||||
bool iHas = iPivot.AsBox(iBox);
|
||||
if (iHas)
|
||||
{
|
||||
//
|
||||
iHas = mPOIDrawer.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
);
|
||||
if (iHas)
|
||||
{
|
||||
Print("Vale Pivot ...");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
iPivot.Clean();
|
||||
}
|
||||
|
||||
//
|
||||
}
|
||||
|
||||
//
|
||||
DetectPVPivots(barIndex);
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
//
|
||||
// Detect Support and Resistances ...
|
||||
XBoxZone tmpBoxes[];
|
||||
XBoxZone selectedSupRes[];
|
||||
count = provider.triggerState.SupportResistancesAsBox(tmpBoxes);
|
||||
has = IsValidSize(count);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox = tmpBoxes[i];
|
||||
|
||||
//
|
||||
// Validate Box ...
|
||||
bool isDirPassed = iBox.dir == selectedBox.dir;
|
||||
bool isPlacePassed = IsBoxInsideOr(iBox, selectedBox, true);
|
||||
has = isDirPassed &&
|
||||
isPlacePassed;
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
AddRef(
|
||||
iBox,
|
||||
selectedSupRes //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
iBox.Clean();
|
||||
}
|
||||
|
||||
//
|
||||
Clean(tmpBoxes);
|
||||
}
|
||||
has = HasChild(selectedSupRes);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
count = ArraySize(selectedSupRes);
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
selectedSupRes[i].to = TimeCurrent();
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = drawer.DrawBox(
|
||||
selectedSupRes[i],
|
||||
iObj //
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
//
|
||||
// double strSupport = 0;
|
||||
// datetime strIn = NULL;
|
||||
// datetime strOut = NULL;
|
||||
// bool isStrInBox = false;
|
||||
// double strResistance = 0;
|
||||
// bool isStrOutBox = false;
|
||||
// Checking STR Variables ...
|
||||
// CheckBoxStr(
|
||||
// cHelper,
|
||||
// selectedBox,
|
||||
// isStrInBox,
|
||||
// strIn,
|
||||
// isStrOutBox,
|
||||
// strOut,
|
||||
// strSupport,
|
||||
// strResistance //
|
||||
// );
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
|
||||
//
|
||||
bool IsFVGBoxValid(
|
||||
XBoxZone &box,
|
||||
ENUM_X_CYCLES cycle,
|
||||
X121SMCStrategySignalProviderData &provider //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result = box.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Fil Selected Data ...
|
||||
XPOIState cState;
|
||||
X121Conditions cXConditions;
|
||||
XPOIStateEvents cStateEvents;
|
||||
XC121SMCCycleHelper *cHelper;
|
||||
X121SMCCycleConditions cConditions;
|
||||
result = provider.SelectCycle(
|
||||
cycle,
|
||||
cState,
|
||||
cStateEvents,
|
||||
cXConditions,
|
||||
cHelper,
|
||||
cConditions //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
//
|
||||
cState.Clean();
|
||||
ZeroMemory(cHelper);
|
||||
cConditions.Clean();
|
||||
cXConditions.Clean();
|
||||
cStateEvents.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool isBoxBullish = box.IsBullish();
|
||||
|
||||
//
|
||||
int count = 0;
|
||||
bool has = false;
|
||||
|
||||
//
|
||||
XBoxZone tmpBoxes[];
|
||||
count = cState.FairValueGapsAsBox(tmpBoxes);
|
||||
has = IsValidSize(count);
|
||||
|
||||
//
|
||||
// Check Must Contains Inner Cycle FVG ...
|
||||
XBoxZone selectedBox;
|
||||
bool hasSelectedBox = false;
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox = tmpBoxes[i];
|
||||
|
||||
//
|
||||
// Regular Validation of Boxes ...
|
||||
bool isValid = IsBoxValid(
|
||||
iBox,
|
||||
0,
|
||||
iBox.period //
|
||||
);
|
||||
bool isTypePassed = iBox.dir == box.dir;
|
||||
bool isFromPssed = iBox.from >= box.from;
|
||||
bool isPlacePassed =
|
||||
IsBoxInsideOr(
|
||||
iBox,
|
||||
box //
|
||||
) &&
|
||||
(isBoxBullish
|
||||
? iBox.lower >= box.lower
|
||||
: iBox.upper <= box.upper);
|
||||
has =
|
||||
isValid &&
|
||||
isFromPssed &&
|
||||
isTypePassed &&
|
||||
isPlacePassed;
|
||||
if (!has)
|
||||
{
|
||||
//
|
||||
iBox.Clean();
|
||||
continue;
|
||||
}
|
||||
|
||||
//
|
||||
has =
|
||||
!hasSelectedBox
|
||||
? true
|
||||
: isBoxBullish
|
||||
? selectedBox.upper > iBox.upper
|
||||
: selectedBox.lower < iBox.lower;
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
selectedBox = iBox;
|
||||
hasSelectedBox = selectedBox.IsValid();
|
||||
}
|
||||
|
||||
//
|
||||
iBox.Clean();
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
result = hasSelectedBox;
|
||||
|
||||
//
|
||||
// IGNORE Box Validations ...
|
||||
// if (result)
|
||||
// {
|
||||
// // //
|
||||
// // // From Index ...
|
||||
// // int fromIndex = GetBarIndex(
|
||||
// // selectedBox.symbol,
|
||||
// // selectedBox.period,
|
||||
// // selectedBox.from //
|
||||
// // ) +
|
||||
// // 1;
|
||||
// // result = IsValidIndex(fromIndex);
|
||||
|
||||
// // //
|
||||
// // // To Index ...
|
||||
// // int toIndex = GetBarIndex(
|
||||
// // selectedBox.symbol,
|
||||
// // selectedBox.period,
|
||||
// // selectedBox.to //
|
||||
// // );
|
||||
// // if (toIndex < 1)
|
||||
// // {
|
||||
// // toIndex = 1;
|
||||
// // }
|
||||
// // result = IsValidIndex(toIndex);
|
||||
|
||||
// // //
|
||||
// // // Now we Have Retrieve X121Conditions between from and to Indexes ...
|
||||
// // // for Check States ...
|
||||
|
||||
// // //
|
||||
// // bool hasNewValeUnderLast = false;
|
||||
// // bool isStrSwitchedToBullish = false;
|
||||
// // bool isSarSwitchedToBullish = false;
|
||||
// // bool hasValueGoldenZoneBreak = false;
|
||||
// // bool isSMHKSwitchedToBullish = false;
|
||||
// // bool isVWapSwitchedToBullishState = false;
|
||||
// // bool isX3MaSwitchedToBullishState = false;
|
||||
// // bool isVWapSwitchedToBullishOrdered = false;
|
||||
// // bool isX3MaSwitchedToBullishOrdered = false;
|
||||
|
||||
// // //
|
||||
// // bool hasNewPeakOverLast = false;
|
||||
// // bool isStrSwitchedToBearish = false;
|
||||
// // bool isSarSwitchedToBearish = false;
|
||||
// // bool hasPeakGoldenZoneBreak = false;
|
||||
// // bool isSMHKSwitchedToBearish = false;
|
||||
// // bool isVWapSwitchedToBearishState = false;
|
||||
// // bool isX3MaSwitchedToBearishState = false;
|
||||
// // bool isVWapSwitchedToBearishOrdered = false;
|
||||
// // bool isX3MaSwitchedToBearishOrdered = false;
|
||||
|
||||
// // //
|
||||
// // for (int i = fromIndex; i >= toIndex; i--)
|
||||
// // {
|
||||
// // //
|
||||
// // XOHCL iBar;
|
||||
// // has = iBar.Init(
|
||||
// // cState.symbol,
|
||||
// // cState.period,
|
||||
// // i //
|
||||
// // );
|
||||
// // X121Conditions iConditions;
|
||||
// // has = has &&
|
||||
// // cHelper.mX121Helper.GetConditions(
|
||||
// // iConditions,
|
||||
// // i //
|
||||
// // );
|
||||
// // if (!has)
|
||||
// // {
|
||||
// // continue;
|
||||
// // }
|
||||
|
||||
// // //
|
||||
// // // Bullish ...
|
||||
|
||||
// // //
|
||||
// // if (!hasNewValeUnderLast)
|
||||
// // {
|
||||
// // hasNewValeUnderLast = iConditions.isNewValeUnderLast;
|
||||
// // }
|
||||
|
||||
// // //
|
||||
// // if (!isStrSwitchedToBullish)
|
||||
// // {
|
||||
// // isStrSwitchedToBullish = iConditions.isStrSwitchedToBullish;
|
||||
// // }
|
||||
|
||||
// // //
|
||||
// // if (!isSarSwitchedToBullish)
|
||||
// // {
|
||||
// // isSarSwitchedToBullish = iConditions.isSarSwitchedToBullish;
|
||||
// // }
|
||||
|
||||
// // //
|
||||
// // if (!hasValueGoldenZoneBreak)
|
||||
// // {
|
||||
// // //
|
||||
// // hasValueGoldenZoneBreak =
|
||||
// // iBar.IsBullish() &&
|
||||
// // iBar.GetUp() > iConditions.valesGoldenBuffer[1] &&
|
||||
// // iBar.GetDown() < iConditions.valesGoldenBuffer[1];
|
||||
// // }
|
||||
|
||||
// // //
|
||||
// // if (!isSMHKSwitchedToBullish)
|
||||
// // {
|
||||
// // isSMHKSwitchedToBullish = iConditions.isSMHKSwitchedToBullish;
|
||||
// // }
|
||||
|
||||
// // //
|
||||
// // if (!isVWapSwitchedToBullishState)
|
||||
// // {
|
||||
// // isVWapSwitchedToBullishState = iConditions.isVWapSwitchedToBullishState;
|
||||
// // }
|
||||
|
||||
// // //
|
||||
// // if (!isX3MaSwitchedToBullishState)
|
||||
// // {
|
||||
// // isX3MaSwitchedToBullishState = iConditions.isX3MaSwitchedToBullishState;
|
||||
// // }
|
||||
|
||||
// // //
|
||||
// // if (!isVWapSwitchedToBullishOrdered)
|
||||
// // {
|
||||
// // isVWapSwitchedToBullishOrdered = iConditions.isVWapSwitchedToBullishOrdered;
|
||||
// // }
|
||||
|
||||
// // //
|
||||
// // if (!isX3MaSwitchedToBullishOrdered)
|
||||
// // {
|
||||
// // isX3MaSwitchedToBullishOrdered = iConditions.isX3MaSwitchedToBullishOrdered;
|
||||
// // }
|
||||
|
||||
// // //
|
||||
// // // Bearish ...
|
||||
|
||||
// // //
|
||||
// // if (!hasNewPeakOverLast)
|
||||
// // {
|
||||
// // hasNewPeakOverLast = iConditions.isNewPeakOverLast;
|
||||
// // }
|
||||
|
||||
// // //
|
||||
// // if (!isStrSwitchedToBearish)
|
||||
// // {
|
||||
// // isStrSwitchedToBearish = iConditions.isStrSwitchedToBearish;
|
||||
// // }
|
||||
|
||||
// // //
|
||||
// // if (!isSarSwitchedToBearish)
|
||||
// // {
|
||||
// // isSarSwitchedToBearish = iConditions.isSarSwitchedToBearish;
|
||||
// // }
|
||||
|
||||
// // //
|
||||
// // if (!hasPeakGoldenZoneBreak)
|
||||
// // {
|
||||
// // //
|
||||
// // hasPeakGoldenZoneBreak =
|
||||
// // iBar.IsBearish() &&
|
||||
// // iBar.GetUp() > iConditions.peaksGoldenBuffer[1] &&
|
||||
// // iBar.GetDown() < iConditions.peaksGoldenBuffer[1];
|
||||
// // }
|
||||
|
||||
// // //
|
||||
// // if (!isSMHKSwitchedToBearish)
|
||||
// // {
|
||||
// // isSMHKSwitchedToBearish = iConditions.isSMHKSwitchedToBearish;
|
||||
// // }
|
||||
|
||||
// // //
|
||||
// // if (!isVWapSwitchedToBearishState)
|
||||
// // {
|
||||
// // isVWapSwitchedToBearishState = iConditions.isVWapSwitchedToBearishState;
|
||||
// // }
|
||||
|
||||
// // //
|
||||
// // if (!isX3MaSwitchedToBearishState)
|
||||
// // {
|
||||
// // isX3MaSwitchedToBearishState = iConditions.isX3MaSwitchedToBearishState;
|
||||
// // }
|
||||
|
||||
// // //
|
||||
// // if (!isVWapSwitchedToBearishOrdered)
|
||||
// // {
|
||||
// // isVWapSwitchedToBearishOrdered = iConditions.isVWapSwitchedToBearishOrdered;
|
||||
// // }
|
||||
|
||||
// // //
|
||||
// // if (!isX3MaSwitchedToBearishOrdered)
|
||||
// // {
|
||||
// // isX3MaSwitchedToBearishOrdered = iConditions.isX3MaSwitchedToBearishOrdered;
|
||||
// // }
|
||||
|
||||
// // //
|
||||
// // iConditions.Clean();
|
||||
// // }
|
||||
|
||||
// // //
|
||||
// // // Bullish Conditions Summary ...
|
||||
|
||||
// // //
|
||||
// // bool hasBullishOrConditions =
|
||||
// // hasNewValeUnderLast ||
|
||||
// // isStrSwitchedToBullish ||
|
||||
// // isSarSwitchedToBullish ||
|
||||
// // hasValueGoldenZoneBreak ||
|
||||
// // isSMHKSwitchedToBullish ||
|
||||
// // isVWapSwitchedToBullishState ||
|
||||
// // isX3MaSwitchedToBullishState ||
|
||||
// // isVWapSwitchedToBullishOrdered ||
|
||||
// // isX3MaSwitchedToBullishOrdered;
|
||||
|
||||
// // //
|
||||
// // bool hasBullishAndConditions =
|
||||
// // hasNewValeUnderLast &&
|
||||
// // hasValueGoldenZoneBreak &&
|
||||
// // (isStrSwitchedToBullish ||
|
||||
// // isSarSwitchedToBullish ||
|
||||
// // isSMHKSwitchedToBullish ||
|
||||
// // isVWapSwitchedToBullishState ||
|
||||
// // isX3MaSwitchedToBullishState ||
|
||||
// // isVWapSwitchedToBullishOrdered ||
|
||||
// // isX3MaSwitchedToBullishOrdered);
|
||||
|
||||
// // //
|
||||
// // // Bearish Conditions Summary ...
|
||||
|
||||
// // //
|
||||
// // bool hasBearishOrConditions =
|
||||
// // hasNewPeakOverLast ||
|
||||
// // isStrSwitchedToBearish ||
|
||||
// // isSarSwitchedToBearish ||
|
||||
// // hasPeakGoldenZoneBreak ||
|
||||
// // isSMHKSwitchedToBearish ||
|
||||
// // isVWapSwitchedToBearishState ||
|
||||
// // isX3MaSwitchedToBearishState ||
|
||||
// // isVWapSwitchedToBearishOrdered ||
|
||||
// // isX3MaSwitchedToBearishOrdered;
|
||||
|
||||
// // //
|
||||
// // bool hasBearishAndConditions =
|
||||
// // hasNewPeakOverLast &&
|
||||
// // hasPeakGoldenZoneBreak &&
|
||||
// // (isStrSwitchedToBearish ||
|
||||
// // isSarSwitchedToBearish ||
|
||||
// // isSMHKSwitchedToBearish ||
|
||||
// // isVWapSwitchedToBearishState ||
|
||||
// // isX3MaSwitchedToBearishState ||
|
||||
// // isVWapSwitchedToBearishOrdered ||
|
||||
// // isX3MaSwitchedToBearishOrdered);
|
||||
|
||||
// //
|
||||
// bool isBullish =
|
||||
// isBoxBullish
|
||||
// // &&
|
||||
// // !hasBearishOrConditions &&
|
||||
// // hasBullishOrConditions
|
||||
// ;
|
||||
|
||||
// //
|
||||
// bool isBearish =
|
||||
// !isBoxBullish
|
||||
// // &&
|
||||
// // !hasBullishOrConditions &&
|
||||
// // hasBearishOrConditions
|
||||
// ;
|
||||
|
||||
// //
|
||||
// result = isBullish ||
|
||||
// isBearish;
|
||||
|
||||
// //
|
||||
// // if (result)
|
||||
// // {
|
||||
// // //
|
||||
// // XCBoxObject *iBoxObj;
|
||||
// // XCBoxObject *iInBoxObj;
|
||||
|
||||
// // //
|
||||
// // has = provider
|
||||
// // .verificationCycleHelper
|
||||
// // .mPOIDrawer
|
||||
// // .DrawBox(
|
||||
// // box,
|
||||
// // iBoxObj //
|
||||
// // );
|
||||
// // if (has)
|
||||
// // {
|
||||
// // //
|
||||
// // iBoxObj.BoxWidth(2);
|
||||
// // iBoxObj.BoxStyle(STYLE_SOLID);
|
||||
// // }
|
||||
|
||||
// // //
|
||||
// // has = provider
|
||||
// // .verificationCycleHelper
|
||||
// // .mPOIDrawer
|
||||
// // .DrawBox(
|
||||
// // selectedBox,
|
||||
// // iInBoxObj //
|
||||
// // );
|
||||
// // if (has)
|
||||
// // {
|
||||
// // //
|
||||
// // iInBoxObj.BoxWidth(2);
|
||||
// // iInBoxObj.BoxStyle(STYLE_DASH);
|
||||
// // }
|
||||
|
||||
// // //
|
||||
// // Print("Inside Selected Box ...");
|
||||
// // }
|
||||
// }
|
||||
|
||||
//
|
||||
// Cleanup Resources ...
|
||||
|
||||
//
|
||||
cState.Clean();
|
||||
Clean(tmpBoxes);
|
||||
selectedBox.Clean();
|
||||
ZeroMemory(cHelper);
|
||||
cConditions.Clean();
|
||||
cXConditions.Clean();
|
||||
cStateEvents.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user