last ...
This commit is contained in:
@@ -687,106 +687,27 @@ bool DetectX121SMCXHKPVSignalSetup(
|
||||
// Detect Cycle State ...
|
||||
|
||||
//
|
||||
visionCycleHelper.GetCycleState(conditions.state);
|
||||
bool hasState = visionCycleHelper.GetCycleState(conditions.state);
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
XBoxZone priceBox;
|
||||
bool hasBox = false;
|
||||
if (hasState)
|
||||
{
|
||||
//
|
||||
hasBox = DetectPriceInsideBox(
|
||||
priceBox,
|
||||
decisionXConditions,
|
||||
conditions.state //
|
||||
);
|
||||
|
||||
// //
|
||||
// bool hasPriceInsideOB = false;
|
||||
// XCOrderBlock *priceInsideOB = NULL;
|
||||
|
||||
// //
|
||||
// if (!hasPriceInsideOB &&
|
||||
// hasBullishOBs)
|
||||
// {
|
||||
// //
|
||||
// for (int i = 0; i < bullishOBsCount; i++)
|
||||
// {
|
||||
// //
|
||||
// XCOrderBlock *iOb = conditions.bullishOBs[i];
|
||||
|
||||
// //
|
||||
// bool isInside = IsPriceInsideZone(
|
||||
// decisionXConditions.valesBuffer[1],
|
||||
// (XCZone *)iOb //
|
||||
// );
|
||||
// if (isInside)
|
||||
// {
|
||||
// //
|
||||
// hasPriceInsideOB = true;
|
||||
// priceInsideOB = iOb;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// //
|
||||
// if (!hasPriceInsideOB &&
|
||||
// hasBearishOBs)
|
||||
// {
|
||||
// //
|
||||
// for (int i = 0; i < bearishOBsCount; i++)
|
||||
// {
|
||||
// //
|
||||
// XCOrderBlock *iOb = conditions.bearishOBs[i];
|
||||
|
||||
// //
|
||||
// bool isInside = IsPriceInsideZone(
|
||||
// decisionXConditions.peaksBuffer[1],
|
||||
// (XCZone *)iOb //
|
||||
// );
|
||||
// if (isInside)
|
||||
// {
|
||||
// //
|
||||
// hasPriceInsideOB = true;
|
||||
// priceInsideOB = iOb;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// //
|
||||
// XStateZones obState;
|
||||
// bool hasOBState = false;
|
||||
// XOHCL priceInsideOBBreakerBar;
|
||||
// if (hasPriceInsideOB)
|
||||
// {
|
||||
// //
|
||||
// XOHCL toBar;
|
||||
// XOHCL fromBar;
|
||||
// ENUM_X_DIRECTION forDir =
|
||||
// priceInsideOB.IsBullish()
|
||||
// ? X_DIRECTION_BULLISH
|
||||
// : X_DIRECTION_BEARISH;
|
||||
// bool hasBreakerBar = HasBreakerBar(
|
||||
// toBar,
|
||||
// fromBar,
|
||||
// priceInsideOBBreakerBar,
|
||||
// forDir,
|
||||
// priceInsideOB.GetSymbol(),
|
||||
// priceInsideOB.GetPeriod(),
|
||||
// priceInsideOB.Upper(),
|
||||
// priceInsideOB.Lower(),
|
||||
// priceInsideOB.From(),
|
||||
// priceInsideOB.To() //
|
||||
// );
|
||||
// if (hasBreakerBar)
|
||||
// {
|
||||
// //
|
||||
// CalculateStateZones(
|
||||
// obState,
|
||||
// analyseState,
|
||||
// priceInsideOB.Upper(),
|
||||
// priceInsideOB.Lower(),
|
||||
// priceInsideOBBreakerBar.time //
|
||||
// );
|
||||
// }
|
||||
|
||||
// //
|
||||
// hasOBState = obState.IsValid();
|
||||
// }
|
||||
//
|
||||
if (hasBox)
|
||||
{
|
||||
//
|
||||
// Here We Can Validate Box by Same Cycles Peaks and Vales ...
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Draw ...
|
||||
@@ -795,6 +716,36 @@ bool DetectX121SMCXHKPVSignalSetup(
|
||||
conditions.state,
|
||||
drawnObjects //
|
||||
);
|
||||
|
||||
//
|
||||
if (hasBox)
|
||||
{
|
||||
//
|
||||
bool isBullish = IsBullish(priceBox.dir);
|
||||
color boxColor = isBullish ? clrYellow : clrOrange;
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
bool isCreated = visionCycleHelper.mPOIDrawer.CreateBox(
|
||||
priceBox,
|
||||
iObj,
|
||||
boxColor,
|
||||
1,
|
||||
false,
|
||||
STYLE_DASHDOTDOT //
|
||||
);
|
||||
|
||||
//
|
||||
if (isCreated)
|
||||
{
|
||||
//
|
||||
Add(
|
||||
(XCBaseObject *)iObj,
|
||||
drawnObjects //
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
if (IsValidSize(drawnObjectsCount))
|
||||
{
|
||||
Print("Drawn Objects ...");
|
||||
|
||||
Reference in New Issue
Block a user