last ...
This commit is contained in:
@@ -1660,12 +1660,14 @@ class XCPOIDrawer : public XSCBase
|
||||
* Create Support Zone Object ...
|
||||
*
|
||||
* @param bar: XOHCL instance ...
|
||||
* @param destTime: DateTime ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateSupportZone(
|
||||
XOHCL &bar,
|
||||
XCSupportZoneObject *&object //
|
||||
XCSupportZoneObject *&object,
|
||||
datetime destTime = NULL //
|
||||
)
|
||||
{
|
||||
//
|
||||
@@ -1689,7 +1691,10 @@ class XCPOIDrawer : public XSCBase
|
||||
string name = bar.GetTag(ToString(X_POI_SUPPORT_ZONE));
|
||||
|
||||
//
|
||||
datetime time2 = (datetime)((int)bar.time + (PeriodSeconds(bar.period) * 5));
|
||||
datetime time2 =
|
||||
IsValid(destTime)
|
||||
? destTime
|
||||
: (datetime)((int)bar.time + (PeriodSeconds(bar.period) * 5));
|
||||
|
||||
//
|
||||
bool fill = SupportZoneFill();
|
||||
|
||||
@@ -1451,6 +1451,14 @@ class XCX121SMCStrategy : public XSCBaseAlert
|
||||
XZone iDemandZone = supplyAndDemandZoneState.demandZones[i];
|
||||
conditions.demandZone = iDemandZone;
|
||||
|
||||
//
|
||||
// TODO: Remove this ...
|
||||
// XCDemandZoneObject *iDemandZoneObj;
|
||||
// bool isCreated = mPOIDrawer.CreateDemandZone(
|
||||
// iDemandZone,
|
||||
// iDemandZoneObj //
|
||||
// );
|
||||
|
||||
//
|
||||
// Order Blocks ...
|
||||
int orderBlocksCount = ArraySize(orderBlocksState.bullishOrderBlocks);
|
||||
@@ -1464,12 +1472,22 @@ class XCX121SMCStrategy : public XSCBaseAlert
|
||||
|
||||
//
|
||||
bool isInside =
|
||||
jZone.from >= iDemandZone.from &&
|
||||
jZone.lower > iDemandZone.lower &&
|
||||
jZone.lower < iDemandZone.upper;
|
||||
(jZone.lower > iDemandZone.lower &&
|
||||
jZone.lower < iDemandZone.upper) ||
|
||||
(jZone.lower < iDemandZone.lower);
|
||||
if (isInside)
|
||||
{
|
||||
//
|
||||
jZone.to = TimeCurrent();
|
||||
|
||||
//
|
||||
// TODO: Remove this ...
|
||||
// XCBullishOrderBlockObject *iBullOBObj;
|
||||
// bool isCreated = mPOIDrawer.CreateBullishOrderBlock(
|
||||
// jZone,
|
||||
// iBullOBObj //
|
||||
// );
|
||||
|
||||
AddRef(
|
||||
jZone,
|
||||
conditions.bullishOrderBlocks //
|
||||
@@ -1491,11 +1509,20 @@ class XCX121SMCStrategy : public XSCBaseAlert
|
||||
|
||||
//
|
||||
bool isInside =
|
||||
jBar.time > iDemandZone.from &&
|
||||
jBar.low > iDemandZone.lower &&
|
||||
jBar.low < iDemandZone.upper;
|
||||
(jBar.low > iDemandZone.lower &&
|
||||
jBar.low < iDemandZone.upper) ||
|
||||
(jBar.low < iDemandZone.lower);
|
||||
if (isInside)
|
||||
{
|
||||
//
|
||||
// TODO: Remove this ...
|
||||
// XCSupportZoneObject *iSupportZoneObj;
|
||||
// bool isCreated = mPOIDrawer.CreateSupportZone(
|
||||
// jBar,
|
||||
// iSupportZoneObj,
|
||||
// TimeCurrent() //
|
||||
// );
|
||||
|
||||
//
|
||||
AddRef(
|
||||
jBar,
|
||||
@@ -1518,9 +1545,22 @@ class XCX121SMCStrategy : public XSCBaseAlert
|
||||
|
||||
//
|
||||
bool isInside =
|
||||
jFVG.from > iDemandZone.from;
|
||||
jFVG.from > iDemandZone.from &&
|
||||
jFVG.lower < iDemandZone.upper &&
|
||||
jFVG.upper > iDemandZone.upper;
|
||||
if (isInside)
|
||||
{
|
||||
//
|
||||
jFVG.to = TimeCurrent();
|
||||
|
||||
//
|
||||
// TODO: Remove This ...
|
||||
// XCBullishFVGObject *iObj;
|
||||
// bool isCreated = mPOIDrawer.CreateBullishFVG(
|
||||
// jFVG,
|
||||
// iObj //
|
||||
// );
|
||||
|
||||
//
|
||||
AddRef(
|
||||
jFVG,
|
||||
@@ -1548,6 +1588,14 @@ class XCX121SMCStrategy : public XSCBaseAlert
|
||||
jBar.GetDown() < iDemandZone.upper;
|
||||
if (isInside)
|
||||
{
|
||||
//
|
||||
// TODO: Remve this ...
|
||||
// XCSwingLowObject *iObj;
|
||||
// bool isCreated = mPOIDrawer.CreateSwingLow(
|
||||
// jBar,
|
||||
// iObj //
|
||||
// );
|
||||
|
||||
//
|
||||
AddRef(
|
||||
jBar,
|
||||
@@ -1576,6 +1624,14 @@ class XCX121SMCStrategy : public XSCBaseAlert
|
||||
jBar.low < iDemandZone.upper;
|
||||
if (isInside)
|
||||
{
|
||||
//
|
||||
// TODO: Remove this ...
|
||||
// XCBullishMomentumBarObject *iObj;
|
||||
// bool isCreated = mPOIDrawer.CreateBullishMomentumBar(
|
||||
// jBar,
|
||||
// iObj //
|
||||
// );
|
||||
|
||||
//
|
||||
AddRef(
|
||||
jBar,
|
||||
@@ -1604,6 +1660,14 @@ class XCX121SMCStrategy : public XSCBaseAlert
|
||||
jBar.low < iDemandZone.upper;
|
||||
if (isInside)
|
||||
{
|
||||
//
|
||||
// TODO: Remove this ...
|
||||
XCBullishRejectionBarObject *iObj;
|
||||
bool isCreated = mPOIDrawer.CreateBullishRejectionBar(
|
||||
jBar,
|
||||
iObj //
|
||||
);
|
||||
|
||||
//
|
||||
AddRef(
|
||||
jBar,
|
||||
@@ -1616,177 +1680,177 @@ class XCX121SMCStrategy : public XSCBaseAlert
|
||||
|
||||
//
|
||||
// Supply Zone ...
|
||||
for (int i = 0; i < demandZonesCount; i++)
|
||||
{
|
||||
//
|
||||
// Supply Zone ...
|
||||
XZone iSupplyZone = supplyAndDemandZoneState.supplyZones[i];
|
||||
conditions.supplyZone = iSupplyZone;
|
||||
// for (int i = 0; i < demandZonesCount; i++)
|
||||
// {
|
||||
// //
|
||||
// // Supply Zone ...
|
||||
// XZone iSupplyZone = supplyAndDemandZoneState.supplyZones[i];
|
||||
// conditions.supplyZone = iSupplyZone;
|
||||
|
||||
//
|
||||
// Order Blocks ...
|
||||
int orderBlocksCount = ArraySize(orderBlocksState.bearishOrderBlocks);
|
||||
if (IsValidSize(orderBlocksCount))
|
||||
{
|
||||
//
|
||||
for (int j = 0; j < orderBlocksCount; j++)
|
||||
{
|
||||
//
|
||||
XZone jZone = orderBlocksState.bearishOrderBlocks[j];
|
||||
// //
|
||||
// // Order Blocks ...
|
||||
// int orderBlocksCount = ArraySize(orderBlocksState.bearishOrderBlocks);
|
||||
// if (IsValidSize(orderBlocksCount))
|
||||
// {
|
||||
// //
|
||||
// for (int j = 0; j < orderBlocksCount; j++)
|
||||
// {
|
||||
// //
|
||||
// XZone jZone = orderBlocksState.bearishOrderBlocks[j];
|
||||
|
||||
//
|
||||
bool isInside =
|
||||
jZone.from > iSupplyZone.from &&
|
||||
jZone.upper > iSupplyZone.lower &&
|
||||
jZone.upper < iSupplyZone.upper;
|
||||
if (isInside)
|
||||
{
|
||||
//
|
||||
AddRef(
|
||||
jZone,
|
||||
conditions.bearishOrderBlocks //
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
// //
|
||||
// bool isInside =
|
||||
// jZone.from > iSupplyZone.from &&
|
||||
// jZone.upper > iSupplyZone.lower &&
|
||||
// jZone.upper < iSupplyZone.upper;
|
||||
// if (isInside)
|
||||
// {
|
||||
// //
|
||||
// AddRef(
|
||||
// jZone,
|
||||
// conditions.bearishOrderBlocks //
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
//
|
||||
// Resistance Zones ...
|
||||
int resistancesCount = ArraySize(fvgsState.resistanceZones);
|
||||
if (IsValidSize(resistancesCount))
|
||||
{
|
||||
//
|
||||
for (int j = 0; j < resistancesCount; j++)
|
||||
{
|
||||
//
|
||||
XOHCL jBar = fvgsState.resistanceZones[j];
|
||||
// //
|
||||
// // Resistance Zones ...
|
||||
// int resistancesCount = ArraySize(fvgsState.resistanceZones);
|
||||
// if (IsValidSize(resistancesCount))
|
||||
// {
|
||||
// //
|
||||
// for (int j = 0; j < resistancesCount; j++)
|
||||
// {
|
||||
// //
|
||||
// XOHCL jBar = fvgsState.resistanceZones[j];
|
||||
|
||||
//
|
||||
bool isInside =
|
||||
jBar.time > iSupplyZone.from &&
|
||||
jBar.high > iSupplyZone.lower &&
|
||||
jBar.high < iSupplyZone.upper;
|
||||
if (isInside)
|
||||
{
|
||||
//
|
||||
AddRef(
|
||||
jBar,
|
||||
conditions.resistances //
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
// //
|
||||
// bool isInside =
|
||||
// jBar.time > iSupplyZone.from &&
|
||||
// jBar.high > iSupplyZone.lower &&
|
||||
// jBar.high < iSupplyZone.upper;
|
||||
// if (isInside)
|
||||
// {
|
||||
// //
|
||||
// AddRef(
|
||||
// jBar,
|
||||
// conditions.resistances //
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
//
|
||||
// Bearish FVGs ...
|
||||
int fvgsCount = ArraySize(fvgsState.bearishFVGs);
|
||||
if (IsValidSize(fvgsCount))
|
||||
{
|
||||
//
|
||||
for (int j = 0; j < fvgsCount; j++)
|
||||
{
|
||||
//
|
||||
XZone jZone = fvgsState.bearishFVGs[j];
|
||||
// //
|
||||
// // Bearish FVGs ...
|
||||
// int fvgsCount = ArraySize(fvgsState.bearishFVGs);
|
||||
// if (IsValidSize(fvgsCount))
|
||||
// {
|
||||
// //
|
||||
// for (int j = 0; j < fvgsCount; j++)
|
||||
// {
|
||||
// //
|
||||
// XZone jZone = fvgsState.bearishFVGs[j];
|
||||
|
||||
//
|
||||
bool isInside =
|
||||
jZone.from > iSupplyZone.from &&
|
||||
jZone.upper > iSupplyZone.lower &&
|
||||
jZone.upper < iSupplyZone.upper;
|
||||
if (isInside)
|
||||
{
|
||||
//
|
||||
AddRef(
|
||||
jZone,
|
||||
conditions.bearishFVGs //
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
// //
|
||||
// bool isInside =
|
||||
// jZone.from > iSupplyZone.from &&
|
||||
// jZone.upper > iSupplyZone.lower &&
|
||||
// jZone.upper < iSupplyZone.upper;
|
||||
// if (isInside)
|
||||
// {
|
||||
// //
|
||||
// AddRef(
|
||||
// jZone,
|
||||
// conditions.bearishFVGs //
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
//
|
||||
// Swing Highs ...
|
||||
int swingHighsCount = ArraySize(triggerState.swingHighs);
|
||||
if (IsValidSize(swingHighsCount))
|
||||
{
|
||||
//
|
||||
for (int j = 0; j < swingHighsCount; j++)
|
||||
{
|
||||
//
|
||||
XOHCL jBar = triggerState.swingHighs[j];
|
||||
// //
|
||||
// // Swing Highs ...
|
||||
// int swingHighsCount = ArraySize(triggerState.swingHighs);
|
||||
// if (IsValidSize(swingHighsCount))
|
||||
// {
|
||||
// //
|
||||
// for (int j = 0; j < swingHighsCount; j++)
|
||||
// {
|
||||
// //
|
||||
// XOHCL jBar = triggerState.swingHighs[j];
|
||||
|
||||
//
|
||||
bool isInside =
|
||||
jBar.time > iSupplyZone.from &&
|
||||
jBar.high > iSupplyZone.lower &&
|
||||
jBar.high < iSupplyZone.upper;
|
||||
if (isInside)
|
||||
{
|
||||
//
|
||||
AddRef(
|
||||
jBar,
|
||||
conditions.swingHighs //
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
// //
|
||||
// bool isInside =
|
||||
// jBar.time > iSupplyZone.from &&
|
||||
// jBar.high > iSupplyZone.lower &&
|
||||
// jBar.high < iSupplyZone.upper;
|
||||
// if (isInside)
|
||||
// {
|
||||
// //
|
||||
// AddRef(
|
||||
// jBar,
|
||||
// conditions.swingHighs //
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
//
|
||||
// Bearish Momentum Bars ...
|
||||
int bearishMomentumBarsCount = ArraySize(triggerState.momentumBars);
|
||||
if (IsValidSize(bearishMomentumBarsCount))
|
||||
{
|
||||
//
|
||||
for (int j = 0; j < bearishMomentumBarsCount; j++)
|
||||
{
|
||||
//
|
||||
XOHCL jBar = fvgsState.momentumBars[j];
|
||||
// //
|
||||
// // Bearish Momentum Bars ...
|
||||
// int bearishMomentumBarsCount = ArraySize(triggerState.momentumBars);
|
||||
// if (IsValidSize(bearishMomentumBarsCount))
|
||||
// {
|
||||
// //
|
||||
// for (int j = 0; j < bearishMomentumBarsCount; j++)
|
||||
// {
|
||||
// //
|
||||
// XOHCL jBar = fvgsState.momentumBars[j];
|
||||
|
||||
//
|
||||
bool isInside =
|
||||
jBar.IsBearish() &&
|
||||
jBar.time > iSupplyZone.from &&
|
||||
jBar.high > iSupplyZone.lower &&
|
||||
jBar.high < iSupplyZone.upper;
|
||||
if (isInside)
|
||||
{
|
||||
//
|
||||
AddRef(
|
||||
jBar,
|
||||
conditions.bearishMomentumBars //
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
// //
|
||||
// bool isInside =
|
||||
// jBar.IsBearish() &&
|
||||
// jBar.time > iSupplyZone.from &&
|
||||
// jBar.high > iSupplyZone.lower &&
|
||||
// jBar.high < iSupplyZone.upper;
|
||||
// if (isInside)
|
||||
// {
|
||||
// //
|
||||
// AddRef(
|
||||
// jBar,
|
||||
// conditions.bearishMomentumBars //
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
//
|
||||
// Bearish Rejection Bars ...
|
||||
int bearishRejectionBarsCount = ArraySize(triggerState.rejectionBars);
|
||||
if (IsValidSize(bearishRejectionBarsCount))
|
||||
{
|
||||
//
|
||||
for (int j = 0; j < bearishRejectionBarsCount; j++)
|
||||
{
|
||||
//
|
||||
XOHCL jBar = fvgsState.rejectionBars[j];
|
||||
// //
|
||||
// // Bearish Rejection Bars ...
|
||||
// int bearishRejectionBarsCount = ArraySize(triggerState.rejectionBars);
|
||||
// if (IsValidSize(bearishRejectionBarsCount))
|
||||
// {
|
||||
// //
|
||||
// for (int j = 0; j < bearishRejectionBarsCount; j++)
|
||||
// {
|
||||
// //
|
||||
// XOHCL jBar = fvgsState.rejectionBars[j];
|
||||
|
||||
//
|
||||
bool isInside =
|
||||
jBar.GetHighShadow() > jBar.GetLowShadow() &&
|
||||
jBar.time > iSupplyZone.from &&
|
||||
jBar.high > iSupplyZone.lower &&
|
||||
jBar.high < iSupplyZone.upper;
|
||||
if (isInside)
|
||||
{
|
||||
//
|
||||
AddRef(
|
||||
jBar,
|
||||
conditions.bearishRejectionBars //
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// //
|
||||
// bool isInside =
|
||||
// jBar.GetHighShadow() > jBar.GetLowShadow() &&
|
||||
// jBar.time > iSupplyZone.from &&
|
||||
// jBar.high > iSupplyZone.lower &&
|
||||
// jBar.high < iSupplyZone.upper;
|
||||
// if (isInside)
|
||||
// {
|
||||
// //
|
||||
// AddRef(
|
||||
// jBar,
|
||||
// conditions.bearishRejectionBars //
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
//
|
||||
bool isConditionReadyForDemand =
|
||||
|
||||
Reference in New Issue
Block a user