This commit is contained in:
2025-02-01 02:14:30 +03:30
parent ea90e5f6c0
commit 43837bcf16
3 changed files with 374 additions and 138 deletions
+264
View File
@@ -1,3 +1,6 @@
////////////////////////////////////////////////////////////////////////////////////////////
//
// Draw ...
//
@@ -228,3 +231,264 @@
//
//
//
////////////////////////////////////////////////////////////////////////////////////////////
//
// if (hasPriceBox && hasYoungestOB)
// {
// //
// X121SMCCycleState iState;
// bool iHasState = visionCycleHelper.GetCycleState(iState);
// if (iHasState)
// {
// //
// // Retrieve Youngest Order Blocks ...
// XCOrderBlock *iYOB;
// bool iHasYoungestOB = iState.GetYoungestOB(iYOB);
// if (iHasYoungestOB)
// {
// //
// bool isCreate = false;
// bool isYoungestBullish = iYOB.IsBullish();
// if (isYoungestBullish)
// {
// //
// // XCBullishOrderBlockObject *iObj;
// // isCreate = visionCycleHelper.mPOIDrawer.CreateBullishOrderBlock(
// // iYOB,
// // iObj //
// // );
// // //
// // if (isCreate) {
// // //
// // iObj.ZoneColor(clrAqua);
// // iObj.ZoneWidth(4);
// // }
// }
// else
// {
// //
// // XCBearishOrderBlockObject *iObj;
// // isCreate = visionCycleHelper.mPOIDrawer.CreateBearishOrderBlock(
// // iYOB,
// // iObj //
// // );
// // //
// // if (isCreate) {
// // //
// // iObj.ZoneColor(clrMagenta);
// // iObj.ZoneWidth(4);
// // }
// }
// //
// // Compare it with current Condition PriceOB ...
// bool isSame =
// //
// conditions.priceOB.Upper() == iYOB.Upper() &&
// conditions.priceOB.Lower() == iYOB.Lower() &&
// conditions.priceOB.From() == iYOB.From() &&
// conditions.priceOB.Type() == iYOB.Type()
// //
// ;
// if (!isSame)
// {
// conditions.Clean();
// }
// }
// }
// }
//
// bool canReset =
// //
// hasPriceBox &&
// conditions.isPriceOBActed &&
// conditions.isPriceOBBreaked &&
// //
// (
// //
// IsBullish(conditions.priceBox.dir)
// ? pBar.high < lower &&
// cBar.high < lower
// : pBar.low > upper &&
// cBar.low > upper
// //
// )
// //
// ;
// if (canReset)
// {
// //
// Print("canReset");
// }
//
// Check Conditions Clean Senario ...
// bool canResetConditions =
// //
// hasPriceBox &&
// !isPriceOBValid &&
// conditions.priceOB != NULL &&
// conditions.priceOB.IsValid()
// //
// ;
// bool canReset2 =
// //
// conditions.priceOB != NULL &&
// (
// //
// (
// //
// conditions.priceOB.IsBullish()
// ? hh < conditions.priceOB.Lower()
// : ll > conditions.priceOB.Upper()
// //
// )
// //
// ||
// //
// (
// //
// conditions.priceOB.IsBullish()
// ? ll50 > conditions.priceOB.Upper()
// : hh50 < conditions.priceOB.Lower()
// //
// )
// //
// )
// //
// ;
// if (canResetConditions)
// {
// Print("canResetConditions");
// }
////////////////////////////////////////////////////////////////////////////////////////////
//
X121SMCCycleState iState;
bool iHasState = visionCycleHelper.GetCycleState(iState);
if (iHasState)
{
//
// Check Price Inside Box ...
XBoxZone iPriceBox;
XCOrderBlock *iPriceOB = NULL;
bool iHasPriceBox = DetectPriceInsideBox(
iPriceBox,
iPriceOB,
decisionXConditions,
iState //
);
//
if (iHasPriceBox) {
//
}
}
////////////////////////////////////////////////////////////////////////////////////////////
// //
// // Draw ...
// XCBaseObject *drawnObjects[];
// int drawnObjectsCount = visionCycleHelper.DrawCycleState(
// conditions.state,
// drawnObjects //
// );
// //
// if (hasPriceBox)
// {
// //
// bool isBullish = IsBullish(conditions.priceBox.dir);
// color boxColor = isBullish ? clrYellow : clrOrange;
// //
// XCBoxObject *iObj;
// bool isCreated = visionCycleHelper.mPOIDrawer.CreateBox(
// conditions.priceBox,
// iObj,
// boxColor,
// 1,
// false,
// STYLE_DASHDOTDOT //
// );
// //
// if (isCreated)
// {
// //
// Add(
// (XCBaseObject *)iObj,
// drawnObjects //
// );
// }
// //
// XCBaseObject *priceOBObj = NULL;
// if (isBullish)
// {
// //
// XCBullishOrderBlockObject *iObj;
// isCreated = visionCycleHelper
// .mPOIDrawer
// .CreateBullishOrderBlock(
// conditions.priceOB,
// iObj //
// );
// //
// if (isCreated)
// {
// //
// iObj.ZoneWidth(2);
// iObj.ZoneColor(boxColor);
// iObj.ZoneStyle(STYLE_SOLID);
// //
// priceOBObj = (XCBaseObject *)iObj;
// }
// }
// else
// {
// //
// XCBearishOrderBlockObject *iObj;
// isCreated = visionCycleHelper
// .mPOIDrawer
// .CreateBearishOrderBlock(
// conditions.priceOB,
// iObj //
// );
// //
// if (isCreated)
// {
// //
// iObj.ZoneWidth(2);
// iObj.ZoneColor(boxColor);
// iObj.ZoneStyle(STYLE_SOLID);
// //
// priceOBObj = (XCBaseObject *)iObj;
// }
// }
// //
// if (isCreated)
// {
// //
// Add(
// priceOBObj,
// drawnObjects //
// );
// }
// }
////////////////////////////////////////////////////////////////////////////////////////////