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