diff --git a/Documents/BKP/1/tmp.codes.mq5 b/Documents/BKP/1/tmp.codes.mq5 index 42b01f88..710e8ed5 100644 --- a/Documents/BKP/1/tmp.codes.mq5 +++ b/Documents/BKP/1/tmp.codes.mq5 @@ -216,3 +216,122 @@ { return result; } + + +/////////////////////////////////////////////// + + + +/** + * Draw X121 SMC Conditions ... + * + * @param conditions: X121SMCStrategyConditions instance Reference ... + * @param drawMarketStructure: Boolean ... + * @param drawPriceZones: Boolean ... + * @param drawDecisionZones: Boolean ... + * + * @return ( int ) + */ +int DrawX121SMCStrategyConditions( + X121SMCStrategyConditions &conditions, + XCBaseObject *&drawnObjects[], + XCPOIDrawer *drawer, + bool drawMarketStructure = true, + bool drawPriceZones = true, + bool drawDecisionZones = true, + bool drawOnlyPriceZonesBoundary = true // +) +{ + // + int result = 0; + + // + Clean(drawnObjects); + + // + if (drawer == NULL || + !conditions.IsValid() || + !HasDirection(conditions.signalDir)) + { + return result; + } + + // + bool isBullish = IsBullish(conditions.signalDir); + + // // + // bool hasPriceZones = conditions.priceZones.IsValid(); + // if (hasPriceZones && + // drawPriceZones) + // { + // // + // XCBaseObject *objects[]; + // int objectsCount = drawer.DrawPriceZone( + // conditions.priceZones, + // objects, + // conditions.signalDir, + // drawOnlyPriceZonesBoundary // + // ); + // if (IsValidSize(objectsCount)) + // { + // // + // Copy( + // objects, + // drawnObjects, + // false // + // ); + // } + // } + + // // + // bool hasDecisionZones = conditions.decisionZones.IsValid(); + // if (hasDecisionZones && + // drawDecisionZones) + // { + // // + // XCBaseObject *objects[]; + // int objectsCount = drawer.DrawPriceZone( + // conditions.decisionZones, + // objects, + // conditions.signalDir, + // drawOnlyPriceZonesBoundary // + // ); + // if (IsValidSize(objectsCount)) + // { + // // + // Copy( + // objects, + // drawnObjects, + // false // + // ); + // } + // } + + // // + // bool hasMarketStructure = conditions.marketStructure.IsValid(); + // if (hasMarketStructure && + // drawMarketStructure) + // { + // // + // XCBaseObject *objects[]; + // int objectsCount = drawer.DrawMarketStructure( + // conditions.marketStructure, + // objects // + // ); + // if (IsValidSize(objectsCount)) + // { + // // + // Copy( + // objects, + // drawnObjects, + // false // + // ); + // } + // } + + // + result = ArraySize(drawnObjects); + + // + return result; +} diff --git a/X121SMCEA/Libraries/x-121.smc.lib.mq5 b/X121SMCEA/Libraries/x-121.smc.lib.mq5 index 3075997d..e879ab35 100644 --- a/X121SMCEA/Libraries/x-121.smc.lib.mq5 +++ b/X121SMCEA/Libraries/x-121.smc.lib.mq5 @@ -649,120 +649,6 @@ int AddGuard( return result; } -/** - * Draw X121 SMC Conditions ... - * - * @param conditions: X121SMCStrategyConditions instance Reference ... - * @param drawMarketStructure: Boolean ... - * @param drawPriceZones: Boolean ... - * @param drawDecisionZones: Boolean ... - * - * @return ( int ) - */ -int DrawX121SMCStrategyConditions( - X121SMCStrategyConditions &conditions, - XCBaseObject *&drawnObjects[], - XCPOIDrawer *drawer, - bool drawMarketStructure = true, - bool drawPriceZones = true, - bool drawDecisionZones = true, - bool drawOnlyPriceZonesBoundary = true // -) -{ - // - int result = 0; - - // - Clean(drawnObjects); - - // - if (drawer == NULL || - !conditions.IsValid() || - !HasDirection(conditions.signalDir)) - { - return result; - } - - // - bool isBullish = IsBullish(conditions.signalDir); - - // // - // bool hasPriceZones = conditions.priceZones.IsValid(); - // if (hasPriceZones && - // drawPriceZones) - // { - // // - // XCBaseObject *objects[]; - // int objectsCount = drawer.DrawPriceZone( - // conditions.priceZones, - // objects, - // conditions.signalDir, - // drawOnlyPriceZonesBoundary // - // ); - // if (IsValidSize(objectsCount)) - // { - // // - // Copy( - // objects, - // drawnObjects, - // false // - // ); - // } - // } - - // // - // bool hasDecisionZones = conditions.decisionZones.IsValid(); - // if (hasDecisionZones && - // drawDecisionZones) - // { - // // - // XCBaseObject *objects[]; - // int objectsCount = drawer.DrawPriceZone( - // conditions.decisionZones, - // objects, - // conditions.signalDir, - // drawOnlyPriceZonesBoundary // - // ); - // if (IsValidSize(objectsCount)) - // { - // // - // Copy( - // objects, - // drawnObjects, - // false // - // ); - // } - // } - - // // - // bool hasMarketStructure = conditions.marketStructure.IsValid(); - // if (hasMarketStructure && - // drawMarketStructure) - // { - // // - // XCBaseObject *objects[]; - // int objectsCount = drawer.DrawMarketStructure( - // conditions.marketStructure, - // objects // - // ); - // if (IsValidSize(objectsCount)) - // { - // // - // Copy( - // objects, - // drawnObjects, - // false // - // ); - // } - // } - - // - result = ArraySize(drawnObjects); - - // - return result; -} - // // //