diff --git a/Documents/BKP/XCHCHE.Empty/x-saherelm.xch.che.parser.mq5 b/Documents/BKP/XCHCHE.Empty/x-saherelm.xch.che.parser.mq5 new file mode 100644 index 00000000..5173cf94 --- /dev/null +++ b/Documents/BKP/XCHCHE.Empty/x-saherelm.xch.che.parser.mq5 @@ -0,0 +1,1025 @@ +/////////////////////////////////////////////////////// +// +// SaherElm IT Center MQL5 Strategy Parser Library +// ------------------------------------------------ +// Name: XCHCHEStartegyConditionsParser +// Description: provide all conditions parsing +// for XCH Strategy ... +// +// +// Maintainer: +// ------------ +// Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com) +// +////////////////////////////////////////////////////// +// +// Global Properties ... +#property library +#property copyright "Copyright 2023, SaherElm IT Center" +#property link "https://www.saherelm.ir" +#property version "1.00" +#property strict + +// +// Imports ... +#include "../Strategies/x-saherelm.xch.che.strategy.mq5" + +// +// Conditions Parser ... +struct XCHCHEStartegyConditionsParser +{ + // + string _version; + + // + // Parsers ... + + // + XSCAccount _account; + XMarketParser _marketParser; + + // + string GenerateSignalConditions( + XSignal &signal, + XCHStrategyConditions &conditions // + ) + { + // + // Calculate Score ... + double bullishScore = 0; + double bearishScore = 0; + conditions.GenerateScore( + bullishScore, + bearishScore // + ); + + // + // Generate Signal Parser Structured Conditions ... + string result = + "(" + + "\n" + + "// Symbol: " + signal.symbol + "\n" + + "// ---------------" + "\n" + + "// Scores:" + "\n" + + "// ---------------" + "\n" + + "// Bullish: " + ToString(bullishScore) + "\n" + + "// Bearish: " + ToString(bearishScore) + "\n" + + "// ---------------" + "\n" + + "// Time: " + ToString(TimeCurrent()) + "\n" + + "// ---------------" + "\n" + + "//" + "\n" + + "// XPV ..." + "\n" + + "//" + "\n" + + // + // True(s) ... + (conditions.pvConditions.isNewPeak ? "conditions.pvConditions.isNewPeak &&" + "\n" : "") + + (conditions.pvConditions.isNewPeakOverLast ? "conditions.pvConditions.isNewPeakOverLast &&" + "\n" : "") + + (conditions.pvConditions.isNewPeakUnderLast ? "conditions.pvConditions.isNewPeakUnderLast &&" + "\n" : "") + + (conditions.pvConditions.isNewVale ? "conditions.pvConditions.isNewVale &&" + "\n" : "") + + (conditions.pvConditions.isNewValeOverLast ? "conditions.pvConditions.isNewValeOverLast &&" + "\n" : "") + + (conditions.pvConditions.isNewValeUnderLast ? "conditions.pvConditions.isNewValeUnderLast &&" + "\n" : "") + + (conditions.pvConditions.isFiboIncreased ? "conditions.pvConditions.isFiboIncreased &&" + "\n" : "") + + (conditions.pvConditions.isFiboDecreased ? "conditions.pvConditions.isFiboDecreased &&" + "\n" : "") + + (conditions.pvConditions.isFiboSectionChanged ? "conditions.pvConditions.isFiboSectionChanged &&" + "\n" : "") + + (conditions.pvConditions.isCloseOverFib1 ? "conditions.pvConditions.isCloseOverFib1 &&" + "\n" : "") + + (conditions.pvConditions.isCloseOverFib2 ? "conditions.pvConditions.isCloseOverFib2 &&" + "\n" : "") + + (conditions.pvConditions.isCloseOverFib3 ? "conditions.pvConditions.isCloseOverFib3 &&" + "\n" : "") + + (conditions.pvConditions.isCloseOverFib4 ? "conditions.pvConditions.isCloseOverFib4 &&" + "\n" : "") + + (conditions.pvConditions.isCloseOverFib5 ? "conditions.pvConditions.isCloseOverFib5 &&" + "\n" : "") + + (conditions.pvConditions.isCloseUnderFib1 ? "conditions.pvConditions.isCloseUnderFib1 &&" + "\n" : "") + + (conditions.pvConditions.isCloseUnderFib2 ? "conditions.pvConditions.isCloseUnderFib2 &&" + "\n" : "") + + (conditions.pvConditions.isCloseUnderFib3 ? "conditions.pvConditions.isCloseUnderFib3 &&" + "\n" : "") + + (conditions.pvConditions.isCloseUnderFib4 ? "conditions.pvConditions.isCloseUnderFib4 &&" + "\n" : "") + + (conditions.pvConditions.isCloseUnderFib5 ? "conditions.pvConditions.isCloseUnderFib5 &&" + "\n" : "") + + (conditions.pvConditions.isCloseCrossedOverFib1 ? "conditions.pvConditions.isCloseCrossedOverFib1 &&" + "\n" : "") + + (conditions.pvConditions.isCloseCrossedOverFib2 ? "conditions.pvConditions.isCloseCrossedOverFib2 &&" + "\n" : "") + + (conditions.pvConditions.isCloseCrossedOverFib3 ? "conditions.pvConditions.isCloseCrossedOverFib3 &&" + "\n" : "") + + (conditions.pvConditions.isCloseCrossedOverFib4 ? "conditions.pvConditions.isCloseCrossedOverFib4 &&" + "\n" : "") + + (conditions.pvConditions.isCloseCrossedOverFib5 ? "conditions.pvConditions.isCloseCrossedOverFib5 &&" + "\n" : "") + + (conditions.pvConditions.isCloseCrossedUnderFib1 ? "conditions.pvConditions.isCloseCrossedUnderFib1 &&" + "\n" : "") + + (conditions.pvConditions.isCloseCrossedUnderFib2 ? "conditions.pvConditions.isCloseCrossedUnderFib2 &&" + "\n" : "") + + (conditions.pvConditions.isCloseCrossedUnderFib3 ? "conditions.pvConditions.isCloseCrossedUnderFib3 &&" + "\n" : "") + + (conditions.pvConditions.isCloseCrossedUnderFib4 ? "conditions.pvConditions.isCloseCrossedUnderFib4 &&" + "\n" : "") + + (conditions.pvConditions.isCloseCrossedUnderFib5 ? "conditions.pvConditions.isCloseCrossedUnderFib5 &&" + "\n" : "") + + (conditions.pvConditions.isSCBullish ? "conditions.pvConditions.isSCBullish &&" + "\n" : "") + + (conditions.pvConditions.isSCHHBullish ? "conditions.pvConditions.isSCHHBullish &&" + "\n" : "") + + (conditions.pvConditions.isSCLLBullish ? "conditions.pvConditions.isSCLLBullish &&" + "\n" : "") + + (conditions.pvConditions.isSCSwitchedToBullish ? "conditions.pvConditions.isSCSwitchedToBullish &&" + "\n" : "") + + (conditions.pvConditions.isSCHHSwitchedToBullish ? "conditions.pvConditions.isSCHHSwitchedToBullish &&" + "\n" : "") + + (conditions.pvConditions.isSCLLSwitchedToBullish ? "conditions.pvConditions.isSCLLSwitchedToBullish &&" + "\n" : "") + + (conditions.pvConditions.isSCBearish ? "conditions.pvConditions.isSCBearish &&" + "\n" : "") + + (conditions.pvConditions.isSCHHBearish ? "conditions.pvConditions.isSCHHBearish &&" + "\n" : "") + + (conditions.pvConditions.isSCLLBearish ? "conditions.pvConditions.isSCLLBearish &&" + "\n" : "") + + (conditions.pvConditions.isSCSwitchedToBearish ? "conditions.pvConditions.isSCSwitchedToBearish &&" + "\n" : "") + + (conditions.pvConditions.isSCHHSwitchedToBearish ? "conditions.pvConditions.isSCHHSwitchedToBearish &&" + "\n" : "") + + (conditions.pvConditions.isSCLLSwitchedToBeraish ? "conditions.pvConditions.isSCLLSwitchedToBeraish &&" + "\n" : "") + + (conditions.pvConditions.isMCBullish ? "conditions.pvConditions.isMCBullish &&" + "\n" : "") + + (conditions.pvConditions.isMCHHBullish ? "conditions.pvConditions.isMCHHBullish &&" + "\n" : "") + + (conditions.pvConditions.isMCLLBullish ? "conditions.pvConditions.isMCLLBullish &&" + "\n" : "") + + (conditions.pvConditions.isMCSwitchedToBullish ? "conditions.pvConditions.isMCSwitchedToBullish &&" + "\n" : "") + + (conditions.pvConditions.isMCHHSwitchedToBullish ? "conditions.pvConditions.isMCHHSwitchedToBullish &&" + "\n" : "") + + (conditions.pvConditions.isMCLLSwitchedToBullish ? "conditions.pvConditions.isMCLLSwitchedToBullish &&" + "\n" : "") + + (conditions.pvConditions.isMCBearish ? "conditions.pvConditions.isMCBearish &&" + "\n" : "") + + (conditions.pvConditions.isMCHHBearish ? "conditions.pvConditions.isMCHHBearish &&" + "\n" : "") + + (conditions.pvConditions.isMCLLBearish ? "conditions.pvConditions.isMCLLBearish &&" + "\n" : "") + + (conditions.pvConditions.isMCSwitchedToBearish ? "conditions.pvConditions.isMCSwitchedToBearish &&" + "\n" : "") + + (conditions.pvConditions.isMCHHSwitchedToBearish ? "conditions.pvConditions.isMCHHSwitchedToBearish &&" + "\n" : "") + + (conditions.pvConditions.isMCLLSwitchedToBeraish ? "conditions.pvConditions.isMCLLSwitchedToBeraish &&" + "\n" : "") + + (conditions.pvConditions.isLCBullish ? "conditions.pvConditions.isLCBullish &&" + "\n" : "") + + (conditions.pvConditions.isLCHHBullish ? "conditions.pvConditions.isLCHHBullish &&" + "\n" : "") + + (conditions.pvConditions.isLCLLBullish ? "conditions.pvConditions.isLCLLBullish &&" + "\n" : "") + + (conditions.pvConditions.isLCSwitchedToBullish ? "conditions.pvConditions.isLCSwitchedToBullish &&" + "\n" : "") + + (conditions.pvConditions.isLCHHSwitchedToBullish ? "conditions.pvConditions.isLCHHSwitchedToBullish &&" + "\n" : "") + + (conditions.pvConditions.isLCLLSwitchedToBullish ? "conditions.pvConditions.isLCLLSwitchedToBullish &&" + "\n" : "") + + (conditions.pvConditions.isLCBearish ? "conditions.pvConditions.isLCBearish &&" + "\n" : "") + + (conditions.pvConditions.isLCHHBearish ? "conditions.pvConditions.isLCHHBearish &&" + "\n" : "") + + (conditions.pvConditions.isLCLLBearish ? "conditions.pvConditions.isLCLLBearish &&" + "\n" : "") + + (conditions.pvConditions.isLCSwitchedToBearish ? "conditions.pvConditions.isLCSwitchedToBearish &&" + "\n" : "") + + (conditions.pvConditions.isLCHHSwitchedToBearish ? "conditions.pvConditions.isLCHHSwitchedToBearish &&" + "\n" : "") + + (conditions.pvConditions.isLCLLSwitchedToBeraish ? "conditions.pvConditions.isLCLLSwitchedToBeraish &&" + "\n" : "") + + (conditions.pvConditions.isHCBullish ? "conditions.pvConditions.isHCBullish &&" + "\n" : "") + + (conditions.pvConditions.isHCHHBullish ? "conditions.pvConditions.isHCHHBullish &&" + "\n" : "") + + (conditions.pvConditions.isHCLLBullish ? "conditions.pvConditions.isHCLLBullish &&" + "\n" : "") + + (conditions.pvConditions.isHCSwitchedToBullish ? "conditions.pvConditions.isHCSwitchedToBullish &&" + "\n" : "") + + (conditions.pvConditions.isHCHHSwitchedToBullish ? "conditions.pvConditions.isHCHHSwitchedToBullish &&" + "\n" : "") + + (conditions.pvConditions.isHCLLSwitchedToBullish ? "conditions.pvConditions.isHCLLSwitchedToBullish &&" + "\n" : "") + + (conditions.pvConditions.isHCBearish ? "conditions.pvConditions.isHCBearish &&" + "\n" : "") + + (conditions.pvConditions.isHCHHBearish ? "conditions.pvConditions.isHCHHBearish &&" + "\n" : "") + + (conditions.pvConditions.isHCLLBearish ? "conditions.pvConditions.isHCLLBearish &&" + "\n" : "") + + (conditions.pvConditions.isHCSwitchedToBearish ? "conditions.pvConditions.isHCSwitchedToBearish &&" + "\n" : "") + + (conditions.pvConditions.isHCHHSwitchedToBearish ? "conditions.pvConditions.isHCHHSwitchedToBearish &&" + "\n" : "") + + (conditions.pvConditions.isHCLLSwitchedToBeraish ? "conditions.pvConditions.isHCLLSwitchedToBeraish &&" + "\n" : "") + + // "//" + "\n" + + // // + // // False(s) ... + // (!conditions.pvConditions.isNewPeak ? "!conditions.pvConditions.isNewPeak &&" + "\n" : "") + + // (!conditions.pvConditions.isNewPeakOverLast ? "!conditions.pvConditions.isNewPeakOverLast &&" + "\n" : "") + + // (!conditions.pvConditions.isNewPeakUnderLast ? "!conditions.pvConditions.isNewPeakUnderLast &&" + "\n" : "") + + // (!conditions.pvConditions.isNewVale ? "!conditions.pvConditions.isNewVale &&" + "\n" : "") + + // (!conditions.pvConditions.isNewValeOverLast ? "!conditions.pvConditions.isNewValeOverLast &&" + "\n" : "") + + // (!conditions.pvConditions.isNewValeUnderLast ? "!conditions.pvConditions.isNewValeUnderLast &&" + "\n" : "") + + // (!conditions.pvConditions.isFiboIncreased ? "!conditions.pvConditions.isFiboIncreased &&" + "\n" : "") + + // (!conditions.pvConditions.isFiboDecreased ? "!conditions.pvConditions.isFiboDecreased &&" + "\n" : "") + + // (!conditions.pvConditions.isFiboSectionChanged ? "!conditions.pvConditions.isFiboSectionChanged &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseOverFib1 ? "!conditions.pvConditions.isCloseOverFib1 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseOverFib2 ? "!conditions.pvConditions.isCloseOverFib2 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseOverFib3 ? "!conditions.pvConditions.isCloseOverFib3 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseOverFib4 ? "!conditions.pvConditions.isCloseOverFib4 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseOverFib5 ? "!conditions.pvConditions.isCloseOverFib5 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseUnderFib1 ? "!conditions.pvConditions.isCloseUnderFib1 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseUnderFib2 ? "!conditions.pvConditions.isCloseUnderFib2 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseUnderFib3 ? "!conditions.pvConditions.isCloseUnderFib3 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseUnderFib4 ? "!conditions.pvConditions.isCloseUnderFib4 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseUnderFib5 ? "!conditions.pvConditions.isCloseUnderFib5 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseCrossedOverFib1 ? "!conditions.pvConditions.isCloseCrossedOverFib1 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseCrossedOverFib2 ? "!conditions.pvConditions.isCloseCrossedOverFib2 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseCrossedOverFib3 ? "!conditions.pvConditions.isCloseCrossedOverFib3 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseCrossedOverFib4 ? "!conditions.pvConditions.isCloseCrossedOverFib4 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseCrossedOverFib5 ? "!conditions.pvConditions.isCloseCrossedOverFib5 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseCrossedUnderFib1 ? "!conditions.pvConditions.isCloseCrossedUnderFib1 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseCrossedUnderFib2 ? "!conditions.pvConditions.isCloseCrossedUnderFib2 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseCrossedUnderFib3 ? "!conditions.pvConditions.isCloseCrossedUnderFib3 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseCrossedUnderFib4 ? "!conditions.pvConditions.isCloseCrossedUnderFib4 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseCrossedUnderFib5 ? "!conditions.pvConditions.isCloseCrossedUnderFib5 &&" + "\n" : "") + + // (!conditions.pvConditions.isSCBullish ? "!conditions.pvConditions.isSCBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isSCHHBullish ? "!conditions.pvConditions.isSCHHBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isSCLLBullish ? "!conditions.pvConditions.isSCLLBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isSCSwitchedToBullish ? "!conditions.pvConditions.isSCSwitchedToBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isSCHHSwitchedToBullish ? "!conditions.pvConditions.isSCHHSwitchedToBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isSCLLSwitchedToBullish ? "!conditions.pvConditions.isSCLLSwitchedToBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isSCBearish ? "!conditions.pvConditions.isSCBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isSCHHBearish ? "!conditions.pvConditions.isSCHHBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isSCLLBearish ? "!conditions.pvConditions.isSCLLBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isSCSwitchedToBearish ? "!conditions.pvConditions.isSCSwitchedToBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isSCHHSwitchedToBearish ? "!conditions.pvConditions.isSCHHSwitchedToBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isSCLLSwitchedToBeraish ? "!conditions.pvConditions.isSCLLSwitchedToBeraish &&" + "\n" : "") + + // (!conditions.pvConditions.isMCBullish ? "!conditions.pvConditions.isMCBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isMCHHBullish ? "!conditions.pvConditions.isMCHHBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isMCLLBullish ? "!conditions.pvConditions.isMCLLBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isMCSwitchedToBullish ? "!conditions.pvConditions.isMCSwitchedToBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isMCHHSwitchedToBullish ? "!conditions.pvConditions.isMCHHSwitchedToBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isMCLLSwitchedToBullish ? "!conditions.pvConditions.isMCLLSwitchedToBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isMCBearish ? "!conditions.pvConditions.isMCBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isMCHHBearish ? "!conditions.pvConditions.isMCHHBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isMCLLBearish ? "!conditions.pvConditions.isMCLLBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isMCSwitchedToBearish ? "!conditions.pvConditions.isMCSwitchedToBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isMCHHSwitchedToBearish ? "!conditions.pvConditions.isMCHHSwitchedToBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isMCLLSwitchedToBeraish ? "!conditions.pvConditions.isMCLLSwitchedToBeraish &&" + "\n" : "") + + // (!conditions.pvConditions.isLCBullish ? "!conditions.pvConditions.isLCBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isLCHHBullish ? "!conditions.pvConditions.isLCHHBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isLCLLBullish ? "!conditions.pvConditions.isLCLLBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isLCSwitchedToBullish ? "!conditions.pvConditions.isLCSwitchedToBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isLCHHSwitchedToBullish ? "!conditions.pvConditions.isLCHHSwitchedToBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isLCLLSwitchedToBullish ? "!conditions.pvConditions.isLCLLSwitchedToBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isLCBearish ? "!conditions.pvConditions.isLCBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isLCHHBearish ? "!conditions.pvConditions.isLCHHBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isLCLLBearish ? "!conditions.pvConditions.isLCLLBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isLCSwitchedToBearish ? "!conditions.pvConditions.isLCSwitchedToBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isLCHHSwitchedToBearish ? "!conditions.pvConditions.isLCHHSwitchedToBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isLCLLSwitchedToBeraish ? "!conditions.pvConditions.isLCLLSwitchedToBeraish &&" + "\n" : "") + + // (!conditions.pvConditions.isHCBullish ? "!conditions.pvConditions.isHCBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isHCHHBullish ? "!conditions.pvConditions.isHCHHBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isHCLLBullish ? "!conditions.pvConditions.isHCLLBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isHCSwitchedToBullish ? "!conditions.pvConditions.isHCSwitchedToBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isHCHHSwitchedToBullish ? "!conditions.pvConditions.isHCHHSwitchedToBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isHCLLSwitchedToBullish ? "!conditions.pvConditions.isHCLLSwitchedToBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isHCBearish ? "!conditions.pvConditions.isHCBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isHCHHBearish ? "!conditions.pvConditions.isHCHHBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isHCLLBearish ? "!conditions.pvConditions.isHCLLBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isHCSwitchedToBearish ? "!conditions.pvConditions.isHCSwitchedToBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isHCHHSwitchedToBearish ? "!conditions.pvConditions.isHCHHSwitchedToBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isHCLLSwitchedToBeraish ? "!conditions.pvConditions.isHCLLSwitchedToBeraish &&" + "\n" : "") + + "//" + "\n" + + "// XCHM ..." + "\n" + + "//" + "\n" + + (conditions.chmConditions.hasBullishPower ? "conditions.chmConditions.hasBullishPower &&" + "\n" : "") + + (conditions.chmConditions.hasBearishPower ? "conditions.chmConditions.hasBearishPower &&" + "\n" : "") + + (conditions.chmConditions.isBullishPowerUp ? "conditions.chmConditions.isBullishPowerUp &&" + "\n" : "") + + (conditions.chmConditions.isBearishPowerUp ? "conditions.chmConditions.isBearishPowerUp &&" + "\n" : "") + + (conditions.chmConditions.isBullishPowerIncreasing ? "conditions.chmConditions.isBullishPowerIncreasing &&" + "\n" : "") + + (conditions.chmConditions.isBullishPowerDecreasing ? "conditions.chmConditions.isBullishPowerDecreasing &&" + "\n" : "") + + (conditions.chmConditions.isBearishPowerIncreasing ? "conditions.chmConditions.isBearishPowerIncreasing &&" + "\n" : "") + + (conditions.chmConditions.isBearishPowerDecreasing ? "conditions.chmConditions.isBearishPowerDecreasing &&" + "\n" : "") + + (conditions.chmConditions.isFastOverSlow ? "conditions.chmConditions.isFastOverSlow &&" + "\n" : "") + + (conditions.chmConditions.isFastUnderSlow ? "conditions.chmConditions.isFastUnderSlow &&" + "\n" : "") + + (conditions.chmConditions.isFastCrossedOverSlow ? "conditions.chmConditions.isFastCrossedOverSlow &&" + "\n" : "") + + (conditions.chmConditions.isFastCrossedUnderSlow ? "conditions.chmConditions.isFastCrossedUnderSlow &&" + "\n" : "") + + (conditions.chmConditions.isClosedOverFast ? "conditions.chmConditions.isClosedOverFast &&" + "\n" : "") + + (conditions.chmConditions.isClosedUnderFast ? "conditions.chmConditions.isClosedUnderFast &&" + "\n" : "") + + (conditions.chmConditions.isCFastOverSlow ? "conditions.chmConditions.isCFastOverSlow &&" + "\n" : "") + + (conditions.chmConditions.isCFastUnderSlow ? "conditions.chmConditions.isCFastUnderSlow &&" + "\n" : "") + + (conditions.chmConditions.isCFastCrossedOverSlow ? "conditions.chmConditions.isCFastCrossedOverSlow &&" + "\n" : "") + + (conditions.chmConditions.isCFastCrossedUnderSlow ? "conditions.chmConditions.isCFastCrossedUnderSlow &&" + "\n" : "") + + (conditions.chmConditions.isClosedOverCFast ? "conditions.chmConditions.isClosedOverCFast &&" + "\n" : "") + + (conditions.chmConditions.isClosedUnderCFast ? "conditions.chmConditions.isClosedUnderCFast &&" + "\n" : "") + + (conditions.chmConditions.isSFastOverSlow ? "conditions.chmConditions.isSFastOverSlow &&" + "\n" : "") + + (conditions.chmConditions.isSFastUnderSlow ? "conditions.chmConditions.isSFastUnderSlow &&" + "\n" : "") + + (conditions.chmConditions.isSFastCrossedOverSlow ? "conditions.chmConditions.isSFastCrossedOverSlow &&" + "\n" : "") + + (conditions.chmConditions.isSFastCrossedUnderSlow ? "conditions.chmConditions.isSFastCrossedUnderSlow &&" + "\n" : "") + + (conditions.chmConditions.isClosedOverSFast ? "conditions.chmConditions.isClosedOverSFast &&" + "\n" : "") + + (conditions.chmConditions.isClosedUnderSFast ? "conditions.chmConditions.isClosedUnderSFast &&" + "\n" : "") + + (conditions.chmConditions.isMFastOverSlow ? "conditions.chmConditions.isMFastOverSlow &&" + "\n" : "") + + (conditions.chmConditions.isMFastUnderSlow ? "conditions.chmConditions.isMFastUnderSlow &&" + "\n" : "") + + (conditions.chmConditions.isMFastCrossedOverSlow ? "conditions.chmConditions.isMFastCrossedOverSlow &&" + "\n" : "") + + (conditions.chmConditions.isMFastCrossedUnderSlow ? "conditions.chmConditions.isMFastCrossedUnderSlow &&" + "\n" : "") + + (conditions.chmConditions.isClosedOverMFast ? "conditions.chmConditions.isClosedOverMFast &&" + "\n" : "") + + (conditions.chmConditions.isClosedUnderMFast ? "conditions.chmConditions.isClosedUnderMFast &&" + "\n" : "") + + (conditions.chmConditions.isLFastOverSlow ? "conditions.chmConditions.isLFastOverSlow &&" + "\n" : "") + + (conditions.chmConditions.isLFastUnderSlow ? "conditions.chmConditions.isLFastUnderSlow &&" + "\n" : "") + + (conditions.chmConditions.isLFastCrossedOverSlow ? "conditions.chmConditions.isLFastCrossedOverSlow &&" + "\n" : "") + + (conditions.chmConditions.isLFastCrossedUnderSlow ? "conditions.chmConditions.isLFastCrossedUnderSlow &&" + "\n" : "") + + (conditions.chmConditions.isClosedOverLFast ? "conditions.chmConditions.isClosedOverLFast &&" + "\n" : "") + + (conditions.chmConditions.isClosedUnderLFast ? "conditions.chmConditions.isClosedUnderLFast &&" + "\n" : "") + + (conditions.chmConditions.isHFastOverSlow ? "conditions.chmConditions.isHFastOverSlow &&" + "\n" : "") + + (conditions.chmConditions.isHFastUnderSlow ? "conditions.chmConditions.isHFastUnderSlow &&" + "\n" : "") + + (conditions.chmConditions.isHFastCrossedOverSlow ? "conditions.chmConditions.isHFastCrossedOverSlow &&" + "\n" : "") + + (conditions.chmConditions.isHFastCrossedUnderSlow ? "conditions.chmConditions.isHFastCrossedUnderSlow &&" + "\n" : "") + + (conditions.chmConditions.isClosedOverHFast ? "conditions.chmConditions.isClosedOverHFast &&" + "\n" : "") + + (conditions.chmConditions.isClosedUnderHFast ? "conditions.chmConditions.isClosedUnderHFast &&" + "\n" : "") + + // "//" + "\n" + + // (!conditions.chmConditions.hasBullishPower ? "!conditions.chmConditions.hasBullishPower &&" + "\n" : "") + + // (!conditions.chmConditions.hasBearishPower ? "!conditions.chmConditions.hasBearishPower &&" + "\n" : "") + + // (!conditions.chmConditions.isBullishPowerUp ? "!conditions.chmConditions.isBullishPowerUp &&" + "\n" : "") + + // (!conditions.chmConditions.isBearishPowerUp ? "!conditions.chmConditions.isBearishPowerUp &&" + "\n" : "") + + // (!conditions.chmConditions.isBullishPowerIncreasing ? "!conditions.chmConditions.isBullishPowerIncreasing &&" + "\n" : "") + + // (!conditions.chmConditions.isBullishPowerDecreasing ? "!conditions.chmConditions.isBullishPowerDecreasing &&" + "\n" : "") + + // (!conditions.chmConditions.isBearishPowerIncreasing ? "!conditions.chmConditions.isBearishPowerIncreasing &&" + "\n" : "") + + // (!conditions.chmConditions.isBearishPowerDecreasing ? "!conditions.chmConditions.isBearishPowerDecreasing &&" + "\n" : "") + + // (!conditions.chmConditions.isFastOverSlow ? "!conditions.chmConditions.isFastOverSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isFastUnderSlow ? "!conditions.chmConditions.isFastUnderSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isFastCrossedOverSlow ? "!conditions.chmConditions.isFastCrossedOverSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isFastCrossedUnderSlow ? "!conditions.chmConditions.isFastCrossedUnderSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isClosedOverFast ? "!conditions.chmConditions.isClosedOverFast &&" + "\n" : "") + + // (!conditions.chmConditions.isClosedUnderFast ? "!conditions.chmConditions.isClosedUnderFast &&" + "\n" : "") + + // (!conditions.chmConditions.isCFastOverSlow ? "!conditions.chmConditions.isCFastOverSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isCFastUnderSlow ? "!conditions.chmConditions.isCFastUnderSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isCFastCrossedOverSlow ? "!conditions.chmConditions.isCFastCrossedOverSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isCFastCrossedUnderSlow ? "!conditions.chmConditions.isCFastCrossedUnderSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isClosedOverCFast ? "!conditions.chmConditions.isClosedOverCFast &&" + "\n" : "") + + // (!conditions.chmConditions.isClosedUnderCFast ? "!conditions.chmConditions.isClosedUnderCFast &&" + "\n" : "") + + // (!conditions.chmConditions.isSFastOverSlow ? "!conditions.chmConditions.isSFastOverSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isSFastUnderSlow ? "!conditions.chmConditions.isSFastUnderSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isSFastCrossedOverSlow ? "!conditions.chmConditions.isSFastCrossedOverSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isSFastCrossedUnderSlow ? "!conditions.chmConditions.isSFastCrossedUnderSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isClosedOverSFast ? "!conditions.chmConditions.isClosedOverSFast &&" + "\n" : "") + + // (!conditions.chmConditions.isClosedUnderSFast ? "!conditions.chmConditions.isClosedUnderSFast &&" + "\n" : "") + + // (!conditions.chmConditions.isMFastOverSlow ? "!conditions.chmConditions.isMFastOverSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isMFastUnderSlow ? "!conditions.chmConditions.isMFastUnderSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isMFastCrossedOverSlow ? "!conditions.chmConditions.isMFastCrossedOverSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isMFastCrossedUnderSlow ? "!conditions.chmConditions.isMFastCrossedUnderSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isClosedOverMFast ? "!conditions.chmConditions.isClosedOverMFast &&" + "\n" : "") + + // (!conditions.chmConditions.isClosedUnderMFast ? "!conditions.chmConditions.isClosedUnderMFast &&" + "\n" : "") + + // (!conditions.chmConditions.isLFastOverSlow ? "!conditions.chmConditions.isLFastOverSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isLFastUnderSlow ? "!conditions.chmConditions.isLFastUnderSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isLFastCrossedOverSlow ? "!conditions.chmConditions.isLFastCrossedOverSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isLFastCrossedUnderSlow ? "!conditions.chmConditions.isLFastCrossedUnderSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isClosedOverLFast ? "!conditions.chmConditions.isClosedOverLFast &&" + "\n" : "") + + // (!conditions.chmConditions.isClosedUnderLFast ? "!conditions.chmConditions.isClosedUnderLFast &&" + "\n" : "") + + // (!conditions.chmConditions.isHFastOverSlow ? "!conditions.chmConditions.isHFastOverSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isHFastUnderSlow ? "!conditions.chmConditions.isHFastUnderSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isHFastCrossedOverSlow ? "!conditions.chmConditions.isHFastCrossedOverSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isHFastCrossedUnderSlow ? "!conditions.chmConditions.isHFastCrossedUnderSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isClosedOverHFast ? "!conditions.chmConditions.isClosedOverHFast &&" + "\n" : "") + + // (!conditions.chmConditions.isClosedUnderHFast ? "!conditions.chmConditions.isClosedUnderHFast &&" + "\n" : "") + + "//" + "\n" + + "// XCHHK ..." + "\n" + + "//" + "\n" + + (conditions.chhkConditions.hasBullishPower ? "conditions.chhkConditions.hasBullishPower &&" + "\n" : "") + + (conditions.chhkConditions.hasBearishPower ? "conditions.chhkConditions.hasBearishPower &&" + "\n" : "") + + (conditions.chhkConditions.isBullishPowerUp ? "conditions.chhkConditions.isBullishPowerUp &&" + "\n" : "") + + (conditions.chhkConditions.isBearishPowerUp ? "conditions.chhkConditions.isBearishPowerUp &&" + "\n" : "") + + (conditions.chhkConditions.isBullishPowerIncreasing ? "conditions.chhkConditions.isBullishPowerIncreasing &&" + "\n" : "") + + (conditions.chhkConditions.isBullishPowerDecreasing ? "conditions.chhkConditions.isBullishPowerDecreasing &&" + "\n" : "") + + (conditions.chhkConditions.isBearishPowerIncreasing ? "conditions.chhkConditions.isBearishPowerIncreasing &&" + "\n" : "") + + (conditions.chhkConditions.isBearishPowerDecreasing ? "conditions.chhkConditions.isBearishPowerDecreasing &&" + "\n" : "") + + (conditions.chhkConditions.isCBullish ? "conditions.chhkConditions.isCBullish &&" + "\n" : "") + + (conditions.chhkConditions.isCSwitchedToBullish ? "conditions.chhkConditions.isCSwitchedToBullish &&" + "\n" : "") + + (conditions.chhkConditions.isCBearish ? "conditions.chhkConditions.isCBearish &&" + "\n" : "") + + (conditions.chhkConditions.isCSwitchedToBearish ? "conditions.chhkConditions.isCSwitchedToBearish &&" + "\n" : "") + + (conditions.chhkConditions.isCloseOverCHigh ? "conditions.chhkConditions.isCloseOverCHigh &&" + "\n" : "") + + (conditions.chhkConditions.isCloseUnderCLow ? "conditions.chhkConditions.isCloseUnderCLow &&" + "\n" : "") + + (conditions.chhkConditions.isSBullish ? "conditions.chhkConditions.isSBullish &&" + "\n" : "") + + (conditions.chhkConditions.isSSwitchedToBullish ? "conditions.chhkConditions.isSSwitchedToBullish &&" + "\n" : "") + + (conditions.chhkConditions.isSBearish ? "conditions.chhkConditions.isSBearish &&" + "\n" : "") + + (conditions.chhkConditions.isSSwitchedToBearish ? "conditions.chhkConditions.isSSwitchedToBearish &&" + "\n" : "") + + (conditions.chhkConditions.isCloseOverSHigh ? "conditions.chhkConditions.isCloseOverSHigh &&" + "\n" : "") + + (conditions.chhkConditions.isCloseUnderSLow ? "conditions.chhkConditions.isCloseUnderSLow &&" + "\n" : "") + + (conditions.chhkConditions.isMBullish ? "conditions.chhkConditions.isMBullish &&" + "\n" : "") + + (conditions.chhkConditions.isMSwitchedToBullish ? "conditions.chhkConditions.isMSwitchedToBullish &&" + "\n" : "") + + (conditions.chhkConditions.isMBearish ? "conditions.chhkConditions.isMBearish &&" + "\n" : "") + + (conditions.chhkConditions.isMSwitchedToBearish ? "conditions.chhkConditions.isMSwitchedToBearish &&" + "\n" : "") + + (conditions.chhkConditions.isCloseOverMHigh ? "conditions.chhkConditions.isCloseOverMHigh &&" + "\n" : "") + + (conditions.chhkConditions.isCloseUnderMLow ? "conditions.chhkConditions.isCloseUnderMLow &&" + "\n" : "") + + (conditions.chhkConditions.isLBullish ? "conditions.chhkConditions.isLBullish &&" + "\n" : "") + + (conditions.chhkConditions.isLSwitchedToBullish ? "conditions.chhkConditions.isLSwitchedToBullish &&" + "\n" : "") + + (conditions.chhkConditions.isLBearish ? "conditions.chhkConditions.isLBearish &&" + "\n" : "") + + (conditions.chhkConditions.isLSwitchedToBearish ? "conditions.chhkConditions.isLSwitchedToBearish &&" + "\n" : "") + + (conditions.chhkConditions.isCloseOverLHigh ? "conditions.chhkConditions.isCloseOverLHigh &&" + "\n" : "") + + (conditions.chhkConditions.isCloseUnderLLow ? "conditions.chhkConditions.isCloseUnderLLow &&" + "\n" : "") + + (conditions.chhkConditions.isHBullish ? "conditions.chhkConditions.isHBullish &&" + "\n" : "") + + (conditions.chhkConditions.isHSwitchedToBullish ? "conditions.chhkConditions.isHSwitchedToBullish &&" + "\n" : "") + + (conditions.chhkConditions.isHBearish ? "conditions.chhkConditions.isHBearish &&" + "\n" : "") + + (conditions.chhkConditions.isHSwitchedToBearish ? "conditions.chhkConditions.isHSwitchedToBearish &&" + "\n" : "") + + (conditions.chhkConditions.isCloseOverHHigh ? "conditions.chhkConditions.isCloseOverHHigh &&" + "\n" : "") + + (conditions.chhkConditions.isCloseUnderHLow ? "conditions.chhkConditions.isCloseUnderHLow &&" + "\n" : "") + + // "//" + "\n" + + // (!conditions.chhkConditions.hasBullishPower ? "!conditions.chhkConditions.hasBullishPower && " + "\n" : "") + + // (!conditions.chhkConditions.hasBearishPower ? "!conditions.chhkConditions.hasBearishPower && " + "\n" : "") + + // (!conditions.chhkConditions.isBullishPowerUp ? "!conditions.chhkConditions.isBullishPowerUp && " + "\n" : "") + + // (!conditions.chhkConditions.isBearishPowerUp ? "!conditions.chhkConditions.isBearishPowerUp && " + "\n" : "") + + // (!conditions.chhkConditions.isBullishPowerIncreasing ? "!conditions.chhkConditions.isBullishPowerIncreasing && " + "\n" : "") + + // (!conditions.chhkConditions.isBullishPowerDecreasing ? "!conditions.chhkConditions.isBullishPowerDecreasing && " + "\n" : "") + + // (!conditions.chhkConditions.isBearishPowerIncreasing ? "!conditions.chhkConditions.isBearishPowerIncreasing && " + "\n" : "") + + // (!conditions.chhkConditions.isBearishPowerDecreasing ? "!conditions.chhkConditions.isBearishPowerDecreasing && " + "\n" : "") + + // (!conditions.chhkConditions.isCBullish ? "!conditions.chhkConditions.isCBullish && " + "\n" : "") + + // (!conditions.chhkConditions.isCSwitchedToBullish ? "!conditions.chhkConditions.isCSwitchedToBullish && " + "\n" : "") + + // (!conditions.chhkConditions.isCBearish ? "!conditions.chhkConditions.isCBearish && " + "\n" : "") + + // (!conditions.chhkConditions.isCSwitchedToBearish ? "!conditions.chhkConditions.isCSwitchedToBearish && " + "\n" : "") + + // (!conditions.chhkConditions.isCloseOverCHigh ? "!conditions.chhkConditions.isCloseOverCHigh && " + "\n" : "") + + // (!conditions.chhkConditions.isCloseUnderCLow ? "!conditions.chhkConditions.isCloseUnderCLow && " + "\n" : "") + + // (!conditions.chhkConditions.isSBullish ? "!conditions.chhkConditions.isSBullish && " + "\n" : "") + + // (!conditions.chhkConditions.isSSwitchedToBullish ? "!conditions.chhkConditions.isSSwitchedToBullish && " + "\n" : "") + + // (!conditions.chhkConditions.isSBearish ? "!conditions.chhkConditions.isSBearish && " + "\n" : "") + + // (!conditions.chhkConditions.isSSwitchedToBearish ? "!conditions.chhkConditions.isSSwitchedToBearish && " + "\n" : "") + + // (!conditions.chhkConditions.isCloseOverSHigh ? "!conditions.chhkConditions.isCloseOverSHigh && " + "\n" : "") + + // (!conditions.chhkConditions.isCloseUnderSLow ? "!conditions.chhkConditions.isCloseUnderSLow && " + "\n" : "") + + // (!conditions.chhkConditions.isMBullish ? "!conditions.chhkConditions.isMBullish && " + "\n" : "") + + // (!conditions.chhkConditions.isMSwitchedToBullish ? "!conditions.chhkConditions.isMSwitchedToBullish && " + "\n" : "") + + // (!conditions.chhkConditions.isMBearish ? "!conditions.chhkConditions.isMBearish && " + "\n" : "") + + // (!conditions.chhkConditions.isMSwitchedToBearish ? "!conditions.chhkConditions.isMSwitchedToBearish && " + "\n" : "") + + // (!conditions.chhkConditions.isCloseOverMHigh ? "!conditions.chhkConditions.isCloseOverMHigh && " + "\n" : "") + + // (!conditions.chhkConditions.isCloseUnderMLow ? "!conditions.chhkConditions.isCloseUnderMLow && " + "\n" : "") + + // (!conditions.chhkConditions.isLBullish ? "!conditions.chhkConditions.isLBullish && " + "\n" : "") + + // (!conditions.chhkConditions.isLSwitchedToBullish ? "!conditions.chhkConditions.isLSwitchedToBullish && " + "\n" : "") + + // (!conditions.chhkConditions.isLBearish ? "!conditions.chhkConditions.isLBearish && " + "\n" : "") + + // (!conditions.chhkConditions.isLSwitchedToBearish ? "!conditions.chhkConditions.isLSwitchedToBearish && " + "\n" : "") + + // (!conditions.chhkConditions.isCloseOverLHigh ? "!conditions.chhkConditions.isCloseOverLHigh && " + "\n" : "") + + // (!conditions.chhkConditions.isCloseUnderLLow ? "!conditions.chhkConditions.isCloseUnderLLow && " + "\n" : "") + + // (!conditions.chhkConditions.isHBullish ? "!conditions.chhkConditions.isHBullish && " + "\n" : "") + + // (!conditions.chhkConditions.isHSwitchedToBullish ? "!conditions.chhkConditions.isHSwitchedToBullish && " + "\n" : "") + + // (!conditions.chhkConditions.isHBearish ? "!conditions.chhkConditions.isHBearish && " + "\n" : "") + + // (!conditions.chhkConditions.isHSwitchedToBearish ? "!conditions.chhkConditions.isHSwitchedToBearish && " + "\n" : "") + + // (!conditions.chhkConditions.isCloseOverHHigh ? "!conditions.chhkConditions.isCloseOverHHigh && " + "\n" : "") + + // (!conditions.chhkConditions.isCloseUnderHLow ? "!conditions.chhkConditions.isCloseUnderHLow && " + "\n" : "") + + "//" + "\n" + + "// XCHTD ..." + "\n" + + "//" + "\n" + + (conditions.chtdConditions.hasBullishPower ? "conditions.chtdConditions.hasBullishPower &&" + "\n" : "") + + (conditions.chtdConditions.hasBearishPower ? "conditions.chtdConditions.hasBearishPower &&" + "\n" : "") + + (conditions.chtdConditions.isBullishPowerUp ? "conditions.chtdConditions.isBullishPowerUp &&" + "\n" : "") + + (conditions.chtdConditions.isBearishPowerUp ? "conditions.chtdConditions.isBearishPowerUp &&" + "\n" : "") + + (conditions.chtdConditions.isBullishPowerIncreasing ? "conditions.chtdConditions.isBullishPowerIncreasing &&" + "\n" : "") + + (conditions.chtdConditions.isBullishPowerDecreasing ? "conditions.chtdConditions.isBullishPowerDecreasing &&" + "\n" : "") + + (conditions.chtdConditions.isBearishPowerIncreasing ? "conditions.chtdConditions.isBearishPowerIncreasing &&" + "\n" : "") + + (conditions.chtdConditions.isBearishPowerDecreasing ? "conditions.chtdConditions.isBearishPowerDecreasing &&" + "\n" : "") + + (conditions.chtdConditions.isCBullish ? "conditions.chtdConditions.isCBullish &&" + "\n" : "") + + (conditions.chtdConditions.isCBearish ? "conditions.chtdConditions.isCBearish &&" + "\n" : "") + + (conditions.chtdConditions.isCSwitchedToBullish ? "conditions.chtdConditions.isCSwitchedToBullish &&" + "\n" : "") + + (conditions.chtdConditions.isCSwitchedToBearish ? "conditions.chtdConditions.isCSwitchedToBearish &&" + "\n" : "") + + (conditions.chtdConditions.isSBullish ? "conditions.chtdConditions.isSBullish &&" + "\n" : "") + + (conditions.chtdConditions.isSBearish ? "conditions.chtdConditions.isSBearish &&" + "\n" : "") + + (conditions.chtdConditions.isSSwitchedToBullish ? "conditions.chtdConditions.isSSwitchedToBullish &&" + "\n" : "") + + (conditions.chtdConditions.isSSwitchedToBearish ? "conditions.chtdConditions.isSSwitchedToBearish &&" + "\n" : "") + + (conditions.chtdConditions.isMBullish ? "conditions.chtdConditions.isMBullish &&" + "\n" : "") + + (conditions.chtdConditions.isMBearish ? "conditions.chtdConditions.isMBearish &&" + "\n" : "") + + (conditions.chtdConditions.isMSwitchedToBullish ? "conditions.chtdConditions.isMSwitchedToBullish &&" + "\n" : "") + + (conditions.chtdConditions.isMSwitchedToBearish ? "conditions.chtdConditions.isMSwitchedToBearish &&" + "\n" : "") + + (conditions.chtdConditions.isLBullish ? "conditions.chtdConditions.isLBullish &&" + "\n" : "") + + (conditions.chtdConditions.isLBearish ? "conditions.chtdConditions.isLBearish &&" + "\n" : "") + + (conditions.chtdConditions.isLSwitchedToBullish ? "conditions.chtdConditions.isLSwitchedToBullish &&" + "\n" : "") + + (conditions.chtdConditions.isLSwitchedToBearish ? "conditions.chtdConditions.isLSwitchedToBearish &&" + "\n" : "") + + (conditions.chtdConditions.isHBullish ? "conditions.chtdConditions.isHBullish &&" + "\n" : "") + + (conditions.chtdConditions.isHBearish ? "conditions.chtdConditions.isHBearish &&" + "\n" : "") + + (conditions.chtdConditions.isHSwitchedToBullish ? "conditions.chtdConditions.isHSwitchedToBullish &&" + "\n" : "") + + (conditions.chtdConditions.isHSwitchedToBearish ? "conditions.chtdConditions.isHSwitchedToBearish &&" + "\n" : "") + + // "//" + "\n" + + // (!conditions.chtdConditions.hasBullishPower ? "!conditions.chtdConditions.hasBullishPower &&" + "\n" : "") + + // (!conditions.chtdConditions.hasBearishPower ? "!conditions.chtdConditions.hasBearishPower &&" + "\n" : "") + + // (!conditions.chtdConditions.isBullishPowerUp ? "!conditions.chtdConditions.isBullishPowerUp &&" + "\n" : "") + + // (!conditions.chtdConditions.isBearishPowerUp ? "!conditions.chtdConditions.isBearishPowerUp &&" + "\n" : "") + + // (!conditions.chtdConditions.isBullishPowerIncreasing ? "!conditions.chtdConditions.isBullishPowerIncreasing &&" + "\n" : "") + + // (!conditions.chtdConditions.isBullishPowerDecreasing ? "!conditions.chtdConditions.isBullishPowerDecreasing &&" + "\n" : "") + + // (!conditions.chtdConditions.isBearishPowerIncreasing ? "!conditions.chtdConditions.isBearishPowerIncreasing &&" + "\n" : "") + + // (!conditions.chtdConditions.isBearishPowerDecreasing ? "!conditions.chtdConditions.isBearishPowerDecreasing &&" + "\n" : "") + + // (!conditions.chtdConditions.isCBullish ? "!conditions.chtdConditions.isCBullish &&" + "\n" : "") + + // (!conditions.chtdConditions.isCBearish ? "!conditions.chtdConditions.isCBearish &&" + "\n" : "") + + // (!conditions.chtdConditions.isCSwitchedToBullish ? "!conditions.chtdConditions.isCSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chtdConditions.isCSwitchedToBearish ? "!conditions.chtdConditions.isCSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chtdConditions.isSBullish ? "!conditions.chtdConditions.isSBullish &&" + "\n" : "") + + // (!conditions.chtdConditions.isSBearish ? "!conditions.chtdConditions.isSBearish &&" + "\n" : "") + + // (!conditions.chtdConditions.isSSwitchedToBullish ? "!conditions.chtdConditions.isSSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chtdConditions.isSSwitchedToBearish ? "!conditions.chtdConditions.isSSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chtdConditions.isMBullish ? "!conditions.chtdConditions.isMBullish &&" + "\n" : "") + + // (!conditions.chtdConditions.isMBearish ? "!conditions.chtdConditions.isMBearish &&" + "\n" : "") + + // (!conditions.chtdConditions.isMSwitchedToBullish ? "!conditions.chtdConditions.isMSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chtdConditions.isMSwitchedToBearish ? "!conditions.chtdConditions.isMSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chtdConditions.isLBullish ? "!conditions.chtdConditions.isLBullish &&" + "\n" : "") + + // (!conditions.chtdConditions.isLBearish ? "!conditions.chtdConditions.isLBearish &&" + "\n" : "") + + // (!conditions.chtdConditions.isLSwitchedToBullish ? "!conditions.chtdConditions.isLSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chtdConditions.isLSwitchedToBearish ? "!conditions.chtdConditions.isLSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chtdConditions.isHBullish ? "!conditions.chtdConditions.isHBullish &&" + "\n" : "") + + // (!conditions.chtdConditions.isHBearish ? "!conditions.chtdConditions.isHBearish &&" + "\n" : "") + + // (!conditions.chtdConditions.isHSwitchedToBullish ? "!conditions.chtdConditions.isHSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chtdConditions.isHSwitchedToBearish ? "!conditions.chtdConditions.isHSwitchedToBearish &&" + "\n" : "") + + "//" + "\n" + + "// XCHCHE ..." + "\n" + + "//" + "\n" + + (conditions.chcheConditions.hasBullishPower ? "conditions.chcheConditions.hasBullishPower &&" + "\n" : "") + + (conditions.chcheConditions.hasBearishPower ? "conditions.chcheConditions.hasBearishPower &&" + "\n" : "") + + (conditions.chcheConditions.isBullishPowerUp ? "conditions.chcheConditions.isBullishPowerUp &&" + "\n" : "") + + (conditions.chcheConditions.isBearishPowerUp ? "conditions.chcheConditions.isBearishPowerUp &&" + "\n" : "") + + (conditions.chcheConditions.isBullishPowerIncreasing ? "conditions.chcheConditions.isBullishPowerIncreasing &&" + "\n" : "") + + (conditions.chcheConditions.isBullishPowerDecreasing ? "conditions.chcheConditions.isBullishPowerDecreasing &&" + "\n" : "") + + (conditions.chcheConditions.isBearishPowerIncreasing ? "conditions.chcheConditions.isBearishPowerIncreasing &&" + "\n" : "") + + (conditions.chcheConditions.isBearishPowerDecreasing ? "conditions.chcheConditions.isBearishPowerDecreasing &&" + "\n" : "") + + (conditions.chcheConditions.isCBullish ? "conditions.chcheConditions.isCBullish &&" + "\n" : "") + + (conditions.chcheConditions.isCBearish ? "conditions.chcheConditions.isCBearish &&" + "\n" : "") + + (conditions.chcheConditions.isCStrongBullish ? "conditions.chcheConditions.isCStrongBullish &&" + "\n" : "") + + (conditions.chcheConditions.isCStrongBearish ? "conditions.chcheConditions.isCStrongBearish &&" + "\n" : "") + + (conditions.chcheConditions.isCSwitchedToBullish ? "conditions.chcheConditions.isCSwitchedToBullish &&" + "\n" : "") + + (conditions.chcheConditions.isCSwitchedToBearish ? "conditions.chcheConditions.isCSwitchedToBearish &&" + "\n" : "") + + (conditions.chcheConditions.isCStrongSwitchedToBullish ? "conditions.chcheConditions.isCStrongSwitchedToBullish &&" + "\n" : "") + + (conditions.chcheConditions.isCStrongSwitchedToBearish ? "conditions.chcheConditions.isCStrongSwitchedToBearish &&" + "\n" : "") + + (conditions.chcheConditions.isSBullish ? "conditions.chcheConditions.isSBullish &&" + "\n" : "") + + (conditions.chcheConditions.isSBearish ? "conditions.chcheConditions.isSBearish &&" + "\n" : "") + + (conditions.chcheConditions.isSStrongBullish ? "conditions.chcheConditions.isSStrongBullish &&" + "\n" : "") + + (conditions.chcheConditions.isSStrongBearish ? "conditions.chcheConditions.isSStrongBearish &&" + "\n" : "") + + (conditions.chcheConditions.isSSwitchedToBullish ? "conditions.chcheConditions.isSSwitchedToBullish &&" + "\n" : "") + + (conditions.chcheConditions.isSSwitchedToBearish ? "conditions.chcheConditions.isSSwitchedToBearish &&" + "\n" : "") + + (conditions.chcheConditions.isSStrongSwitchedToBullish ? "conditions.chcheConditions.isSStrongSwitchedToBullish &&" + "\n" : "") + + (conditions.chcheConditions.isSStrongSwitchedToBearish ? "conditions.chcheConditions.isSStrongSwitchedToBearish &&" + "\n" : "") + + (conditions.chcheConditions.isMBullish ? "conditions.chcheConditions.isMBullish &&" + "\n" : "") + + (conditions.chcheConditions.isMBearish ? "conditions.chcheConditions.isMBearish &&" + "\n" : "") + + (conditions.chcheConditions.isMStrongBullish ? "conditions.chcheConditions.isMStrongBullish &&" + "\n" : "") + + (conditions.chcheConditions.isMStrongBearish ? "conditions.chcheConditions.isMStrongBearish &&" + "\n" : "") + + (conditions.chcheConditions.isMSwitchedToBullish ? "conditions.chcheConditions.isMSwitchedToBullish &&" + "\n" : "") + + (conditions.chcheConditions.isMSwitchedToBearish ? "conditions.chcheConditions.isMSwitchedToBearish &&" + "\n" : "") + + (conditions.chcheConditions.isMStrongSwitchedToBullish ? "conditions.chcheConditions.isMStrongSwitchedToBullish &&" + "\n" : "") + + (conditions.chcheConditions.isMStrongSwitchedToBearish ? "conditions.chcheConditions.isMStrongSwitchedToBearish &&" + "\n" : "") + + (conditions.chcheConditions.isLBullish ? "conditions.chcheConditions.isLBullish &&" + "\n" : "") + + (conditions.chcheConditions.isLBearish ? "conditions.chcheConditions.isLBearish &&" + "\n" : "") + + (conditions.chcheConditions.isLStrongBullish ? "conditions.chcheConditions.isLStrongBullish &&" + "\n" : "") + + (conditions.chcheConditions.isLStrongBearish ? "conditions.chcheConditions.isLStrongBearish &&" + "\n" : "") + + (conditions.chcheConditions.isLSwitchedToBullish ? "conditions.chcheConditions.isLSwitchedToBullish &&" + "\n" : "") + + (conditions.chcheConditions.isLSwitchedToBearish ? "conditions.chcheConditions.isLSwitchedToBearish &&" + "\n" : "") + + (conditions.chcheConditions.isLStrongSwitchedToBullish ? "conditions.chcheConditions.isLStrongSwitchedToBullish &&" + "\n" : "") + + (conditions.chcheConditions.isLStrongSwitchedToBearish ? "conditions.chcheConditions.isLStrongSwitchedToBearish &&" + "\n" : "") + + (conditions.chcheConditions.isHBullish ? "conditions.chcheConditions.isHBullish &&" + "\n" : "") + + (conditions.chcheConditions.isHBearish ? "conditions.chcheConditions.isHBearish &&" + "\n" : "") + + (conditions.chcheConditions.isHStrongBullish ? "conditions.chcheConditions.isHStrongBullish &&" + "\n" : "") + + (conditions.chcheConditions.isHStrongBearish ? "conditions.chcheConditions.isHStrongBearish &&" + "\n" : "") + + (conditions.chcheConditions.isHSwitchedToBullish ? "conditions.chcheConditions.isHSwitchedToBullish &&" + "\n" : "") + + (conditions.chcheConditions.isHSwitchedToBearish ? "conditions.chcheConditions.isHSwitchedToBearish &&" + "\n" : "") + + (conditions.chcheConditions.isHStrongSwitchedToBullish ? "conditions.chcheConditions.isHStrongSwitchedToBullish &&" + "\n" : "") + + (conditions.chcheConditions.isHStrongSwitchedToBearish ? "conditions.chcheConditions.isHStrongSwitchedToBearish &&" + "\n" : "") + + // "//" + "\n" + + // (!conditions.chcheConditions.hasBullishPower ? "!conditions.chcheConditions.hasBullishPower &&" + "\n" : "") + + // (!conditions.chcheConditions.hasBearishPower ? "!conditions.chcheConditions.hasBearishPower &&" + "\n" : "") + + // (!conditions.chcheConditions.isBullishPowerUp ? "!conditions.chcheConditions.isBullishPowerUp &&" + "\n" : "") + + // (!conditions.chcheConditions.isBearishPowerUp ? "!conditions.chcheConditions.isBearishPowerUp &&" + "\n" : "") + + // (!conditions.chcheConditions.isBullishPowerIncreasing ? "!conditions.chcheConditions.isBullishPowerIncreasing &&" + "\n" : "") + + // (!conditions.chcheConditions.isBullishPowerDecreasing ? "!conditions.chcheConditions.isBullishPowerDecreasing &&" + "\n" : "") + + // (!conditions.chcheConditions.isBearishPowerIncreasing ? "!conditions.chcheConditions.isBearishPowerIncreasing &&" + "\n" : "") + + // (!conditions.chcheConditions.isBearishPowerDecreasing ? "!conditions.chcheConditions.isBearishPowerDecreasing &&" + "\n" : "") + + // (!conditions.chcheConditions.isCBullish ? "!conditions.chcheConditions.isCBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isCBearish ? "!conditions.chcheConditions.isCBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isCStrongBullish ? "!conditions.chcheConditions.isCStrongBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isCStrongBearish ? "!conditions.chcheConditions.isCStrongBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isCSwitchedToBullish ? "!conditions.chcheConditions.isCSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isCSwitchedToBearish ? "!conditions.chcheConditions.isCSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isCStrongSwitchedToBullish ? "!conditions.chcheConditions.isCStrongSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isCStrongSwitchedToBearish ? "!conditions.chcheConditions.isCStrongSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isSBullish ? "!conditions.chcheConditions.isSBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isSBearish ? "!conditions.chcheConditions.isSBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isSStrongBullish ? "!conditions.chcheConditions.isSStrongBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isSStrongBearish ? "!conditions.chcheConditions.isSStrongBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isSSwitchedToBullish ? "!conditions.chcheConditions.isSSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isSSwitchedToBearish ? "!conditions.chcheConditions.isSSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isSStrongSwitchedToBullish ? "!conditions.chcheConditions.isSStrongSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isSStrongSwitchedToBearish ? "!conditions.chcheConditions.isSStrongSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isMBullish ? "!conditions.chcheConditions.isMBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isMBearish ? "!conditions.chcheConditions.isMBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isMStrongBullish ? "!conditions.chcheConditions.isMStrongBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isMStrongBearish ? "!conditions.chcheConditions.isMStrongBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isMSwitchedToBullish ? "!conditions.chcheConditions.isMSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isMSwitchedToBearish ? "!conditions.chcheConditions.isMSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isMStrongSwitchedToBullish ? "!conditions.chcheConditions.isMStrongSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isMStrongSwitchedToBearish ? "!conditions.chcheConditions.isMStrongSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isLBullish ? "!conditions.chcheConditions.isLBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isLBearish ? "!conditions.chcheConditions.isLBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isLStrongBullish ? "!conditions.chcheConditions.isLStrongBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isLStrongBearish ? "!conditions.chcheConditions.isLStrongBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isLSwitchedToBullish ? "!conditions.chcheConditions.isLSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isLSwitchedToBearish ? "!conditions.chcheConditions.isLSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isLStrongSwitchedToBullish ? "!conditions.chcheConditions.isLStrongSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isLStrongSwitchedToBearish ? "!conditions.chcheConditions.isLStrongSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isHBullish ? "!conditions.chcheConditions.isHBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isHBearish ? "!conditions.chcheConditions.isHBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isHStrongBullish ? "!conditions.chcheConditions.isHStrongBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isHStrongBearish ? "!conditions.chcheConditions.isHStrongBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isHSwitchedToBullish ? "!conditions.chcheConditions.isHSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isHSwitchedToBearish ? "!conditions.chcheConditions.isHSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isHStrongSwitchedToBullish ? "!conditions.chcheConditions.isHStrongSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isHStrongSwitchedToBearish ? "!conditions.chcheConditions.isHStrongSwitchedToBearish &&" + "\n" : "") + + "//" + "\n" + + "// XCHSTR ..." + "\n" + + "//" + "\n" + + (conditions.chstrConditions.hasBullishPower ? "conditions.chstrConditions.hasBullishPower &&" + "\n" : "") + + (conditions.chstrConditions.hasBearishPower ? "conditions.chstrConditions.hasBearishPower &&" + "\n" : "") + + (conditions.chstrConditions.isBullishPowerUp ? "conditions.chstrConditions.isBullishPowerUp &&" + "\n" : "") + + (conditions.chstrConditions.isBearishPowerUp ? "conditions.chstrConditions.isBearishPowerUp &&" + "\n" : "") + + (conditions.chstrConditions.isBullishPowerIncreasing ? "conditions.chstrConditions.isBullishPowerIncreasing &&" + "\n" : "") + + (conditions.chstrConditions.isBullishPowerDecreasing ? "conditions.chstrConditions.isBullishPowerDecreasing &&" + "\n" : "") + + (conditions.chstrConditions.isBearishPowerIncreasing ? "conditions.chstrConditions.isBearishPowerIncreasing &&" + "\n" : "") + + (conditions.chstrConditions.isBearishPowerDecreasing ? "conditions.chstrConditions.isBearishPowerDecreasing &&" + "\n" : "") + + (conditions.chstrConditions.isCBullish ? "conditions.chstrConditions.isCBullish &&" + "\n" : "") + + (conditions.chstrConditions.isCBearish ? "conditions.chstrConditions.isCBearish &&" + "\n" : "") + + (conditions.chstrConditions.isCSwitchedToBullish ? "conditions.chstrConditions.isCSwitchedToBullish &&" + "\n" : "") + + (conditions.chstrConditions.isCSwitchedToBearish ? "conditions.chstrConditions.isCSwitchedToBearish &&" + "\n" : "") + + (conditions.chstrConditions.isSBullish ? "conditions.chstrConditions.isSBullish &&" + "\n" : "") + + (conditions.chstrConditions.isSBearish ? "conditions.chstrConditions.isSBearish &&" + "\n" : "") + + (conditions.chstrConditions.isSSwitchedToBullish ? "conditions.chstrConditions.isSSwitchedToBullish &&" + "\n" : "") + + (conditions.chstrConditions.isSSwitchedToBearish ? "conditions.chstrConditions.isSSwitchedToBearish &&" + "\n" : "") + + (conditions.chstrConditions.isMBullish ? "conditions.chstrConditions.isMBullish &&" + "\n" : "") + + (conditions.chstrConditions.isMBearish ? "conditions.chstrConditions.isMBearish &&" + "\n" : "") + + (conditions.chstrConditions.isMSwitchedToBullish ? "conditions.chstrConditions.isMSwitchedToBullish &&" + "\n" : "") + + (conditions.chstrConditions.isMSwitchedToBearish ? "conditions.chstrConditions.isMSwitchedToBearish &&" + "\n" : "") + + (conditions.chstrConditions.isLBullish ? "conditions.chstrConditions.isLBullish &&" + "\n" : "") + + (conditions.chstrConditions.isLBearish ? "conditions.chstrConditions.isLBearish &&" + "\n" : "") + + (conditions.chstrConditions.isLSwitchedToBullish ? "conditions.chstrConditions.isLSwitchedToBullish &&" + "\n" : "") + + (conditions.chstrConditions.isLSwitchedToBearish ? "conditions.chstrConditions.isLSwitchedToBearish &&" + "\n" : "") + + (conditions.chstrConditions.isHBullish ? "conditions.chstrConditions.isHBullish &&" + "\n" : "") + + (conditions.chstrConditions.isHBearish ? "conditions.chstrConditions.isHBearish &&" + "\n" : "") + + (conditions.chstrConditions.isHSwitchedToBullish ? "conditions.chstrConditions.isHSwitchedToBullish &&" + "\n" : "") + + (conditions.chstrConditions.isHSwitchedToBearish ? "conditions.chstrConditions.isHSwitchedToBearish &&" + "\n" : "") + + // "//" + "\n" + + // (!conditions.chstrConditions.hasBullishPower ? "!conditions.chstrConditions.hasBullishPower &&" + "\n" : "") + + // (!conditions.chstrConditions.hasBearishPower ? "!conditions.chstrConditions.hasBearishPower &&" + "\n" : "") + + // (!conditions.chstrConditions.isBullishPowerUp ? "!conditions.chstrConditions.isBullishPowerUp &&" + "\n" : "") + + // (!conditions.chstrConditions.isBearishPowerUp ? "!conditions.chstrConditions.isBearishPowerUp &&" + "\n" : "") + + // (!conditions.chstrConditions.isBullishPowerIncreasing ? "!conditions.chstrConditions.isBullishPowerIncreasing &&" + "\n" : "") + + // (!conditions.chstrConditions.isBullishPowerDecreasing ? "!conditions.chstrConditions.isBullishPowerDecreasing &&" + "\n" : "") + + // (!conditions.chstrConditions.isBearishPowerIncreasing ? "!conditions.chstrConditions.isBearishPowerIncreasing &&" + "\n" : "") + + // (!conditions.chstrConditions.isBearishPowerDecreasing ? "!conditions.chstrConditions.isBearishPowerDecreasing &&" + "\n" : "") + + // (!conditions.chstrConditions.isCBullish ? "!conditions.chstrConditions.isCBullish &&" + "\n" : "") + + // (!conditions.chstrConditions.isCBearish ? "!conditions.chstrConditions.isCBearish &&" + "\n" : "") + + // (!conditions.chstrConditions.isCSwitchedToBullish ? "!conditions.chstrConditions.isCSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chstrConditions.isCSwitchedToBearish ? "!conditions.chstrConditions.isCSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chstrConditions.isSBullish ? "!conditions.chstrConditions.isSBullish &&" + "\n" : "") + + // (!conditions.chstrConditions.isSBearish ? "!conditions.chstrConditions.isSBearish &&" + "\n" : "") + + // (!conditions.chstrConditions.isSSwitchedToBullish ? "!conditions.chstrConditions.isSSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chstrConditions.isSSwitchedToBearish ? "!conditions.chstrConditions.isSSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chstrConditions.isMBullish ? "!conditions.chstrConditions.isMBullish &&" + "\n" : "") + + // (!conditions.chstrConditions.isMBearish ? "!conditions.chstrConditions.isMBearish &&" + "\n" : "") + + // (!conditions.chstrConditions.isMSwitchedToBullish ? "!conditions.chstrConditions.isMSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chstrConditions.isMSwitchedToBearish ? "!conditions.chstrConditions.isMSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chstrConditions.isLBullish ? "!conditions.chstrConditions.isLBullish &&" + "\n" : "") + + // (!conditions.chstrConditions.isLBearish ? "!conditions.chstrConditions.isLBearish &&" + "\n" : "") + + // (!conditions.chstrConditions.isLSwitchedToBullish ? "!conditions.chstrConditions.isLSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chstrConditions.isLSwitchedToBearish ? "!conditions.chstrConditions.isLSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chstrConditions.isHBullish ? "!conditions.chstrConditions.isHBullish &&" + "\n" : "") + + // (!conditions.chstrConditions.isHBearish ? "!conditions.chstrConditions.isHBearish &&" + "\n" : "") + + // (!conditions.chstrConditions.isHSwitchedToBullish ? "!conditions.chstrConditions.isHSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chstrConditions.isHSwitchedToBearish ? "!conditions.chstrConditions.isHSwitchedToBearish &&" + "\n" : "") + + "//" + "\n" + + "// XCHVLM ..." + "\n" + + "//" + "\n" + + (conditions.chvlmConditions.hasBullishPower ? "conditions.chvlmConditions.hasBullishPower &&" + "\n" : "") + + (conditions.chvlmConditions.hasBearishPower ? "conditions.chvlmConditions.hasBearishPower &&" + "\n" : "") + + (conditions.chvlmConditions.isBullishPowerUp ? "conditions.chvlmConditions.isBullishPowerUp &&" + "\n" : "") + + (conditions.chvlmConditions.isBearishPowerUp ? "conditions.chvlmConditions.isBearishPowerUp &&" + "\n" : "") + + (conditions.chvlmConditions.isBullishPowerIncreasing ? "conditions.chvlmConditions.isBullishPowerIncreasing &&" + "\n" : "") + + (conditions.chvlmConditions.isBullishPowerDecreasing ? "conditions.chvlmConditions.isBullishPowerDecreasing &&" + "\n" : "") + + (conditions.chvlmConditions.isBearishPowerIncreasing ? "conditions.chvlmConditions.isBearishPowerIncreasing &&" + "\n" : "") + + (conditions.chvlmConditions.isBearishPowerDecreasing ? "conditions.chvlmConditions.isBearishPowerDecreasing &&" + "\n" : "") + + (conditions.chvlmConditions.isCBullish ? "conditions.chvlmConditions.isCBullish &&" + "\n" : "") + + (conditions.chvlmConditions.isCBearish ? "conditions.chvlmConditions.isCBearish &&" + "\n" : "") + + (conditions.chvlmConditions.isCSwitchedToBullish ? "conditions.chvlmConditions.isCSwitchedToBullish &&" + "\n" : "") + + (conditions.chvlmConditions.isCSwitchedToBearish ? "conditions.chvlmConditions.isCSwitchedToBearish &&" + "\n" : "") + + (conditions.chvlmConditions.isSBullish ? "conditions.chvlmConditions.isSBullish &&" + "\n" : "") + + (conditions.chvlmConditions.isSBearish ? "conditions.chvlmConditions.isSBearish &&" + "\n" : "") + + (conditions.chvlmConditions.isSSwitchedToBullish ? "conditions.chvlmConditions.isSSwitchedToBullish &&" + "\n" : "") + + (conditions.chvlmConditions.isSSwitchedToBearish ? "conditions.chvlmConditions.isSSwitchedToBearish &&" + "\n" : "") + + (conditions.chvlmConditions.isMBullish ? "conditions.chvlmConditions.isMBullish &&" + "\n" : "") + + (conditions.chvlmConditions.isMBearish ? "conditions.chvlmConditions.isMBearish &&" + "\n" : "") + + (conditions.chvlmConditions.isMSwitchedToBullish ? "conditions.chvlmConditions.isMSwitchedToBullish &&" + "\n" : "") + + (conditions.chvlmConditions.isMSwitchedToBearish ? "conditions.chvlmConditions.isMSwitchedToBearish &&" + "\n" : "") + + (conditions.chvlmConditions.isLBullish ? "conditions.chvlmConditions.isLBullish &&" + "\n" : "") + + (conditions.chvlmConditions.isLBearish ? "conditions.chvlmConditions.isLBearish &&" + "\n" : "") + + (conditions.chvlmConditions.isLSwitchedToBullish ? "conditions.chvlmConditions.isLSwitchedToBullish &&" + "\n" : "") + + (conditions.chvlmConditions.isLSwitchedToBearish ? "conditions.chvlmConditions.isLSwitchedToBearish &&" + "\n" : "") + + (conditions.chvlmConditions.isHBullish ? "conditions.chvlmConditions.isHBullish &&" + "\n" : "") + + (conditions.chvlmConditions.isHBearish ? "conditions.chvlmConditions.isHBearish &&" + "\n" : "") + + (conditions.chvlmConditions.isHSwitchedToBullish ? "conditions.chvlmConditions.isHSwitchedToBullish &&" + "\n" : "") + + (conditions.chvlmConditions.isHSwitchedToBearish ? "conditions.chvlmConditions.isHSwitchedToBearish &&" + "\n" : "") + + // "//" + "\n" + + // (!conditions.chvlmConditions.hasBullishPower ? "!conditions.chvlmConditions.hasBullishPower &&" + "\n" : "") + + // (!conditions.chvlmConditions.hasBearishPower ? "!conditions.chvlmConditions.hasBearishPower &&" + "\n" : "") + + // (!conditions.chvlmConditions.isBullishPowerUp ? "!conditions.chvlmConditions.isBullishPowerUp &&" + "\n" : "") + + // (!conditions.chvlmConditions.isBearishPowerUp ? "!conditions.chvlmConditions.isBearishPowerUp &&" + "\n" : "") + + // (!conditions.chvlmConditions.isBullishPowerIncreasing ? "!conditions.chvlmConditions.isBullishPowerIncreasing &&" + "\n" : "") + + // (!conditions.chvlmConditions.isBullishPowerDecreasing ? "!conditions.chvlmConditions.isBullishPowerDecreasing &&" + "\n" : "") + + // (!conditions.chvlmConditions.isBearishPowerIncreasing ? "!conditions.chvlmConditions.isBearishPowerIncreasing &&" + "\n" : "") + + // (!conditions.chvlmConditions.isBearishPowerDecreasing ? "!conditions.chvlmConditions.isBearishPowerDecreasing &&" + "\n" : "") + + // (!conditions.chvlmConditions.isCBullish ? "!conditions.chvlmConditions.isCBullish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isCBearish ? "!conditions.chvlmConditions.isCBearish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isCSwitchedToBullish ? "!conditions.chvlmConditions.isCSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isCSwitchedToBearish ? "!conditions.chvlmConditions.isCSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isSBullish ? "!conditions.chvlmConditions.isSBullish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isSBearish ? "!conditions.chvlmConditions.isSBearish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isSSwitchedToBullish ? "!conditions.chvlmConditions.isSSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isSSwitchedToBearish ? "!conditions.chvlmConditions.isSSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isMBullish ? "!conditions.chvlmConditions.isMBullish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isMBearish ? "!conditions.chvlmConditions.isMBearish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isMSwitchedToBullish ? "!conditions.chvlmConditions.isMSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isMSwitchedToBearish ? "!conditions.chvlmConditions.isMSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isLBullish ? "!conditions.chvlmConditions.isLBullish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isLBearish ? "!conditions.chvlmConditions.isLBearish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isLSwitchedToBullish ? "!conditions.chvlmConditions.isLSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isLSwitchedToBearish ? "!conditions.chvlmConditions.isLSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isHBullish ? "!conditions.chvlmConditions.isHBullish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isHBearish ? "!conditions.chvlmConditions.isHBearish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isHSwitchedToBullish ? "!conditions.chvlmConditions.isHSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isHSwitchedToBearish ? "!conditions.chvlmConditions.isHSwitchedToBearish &&" + "\n" : "") + + "//" + "\n" + + "// XCHVWAP ..." + "\n" + + "//" + "\n" + + (conditions.chvwapConditions.hasBullishPower ? "conditions.chvwapConditions.hasBullishPower &&" + "\n" : "") + + (conditions.chvwapConditions.hasBearishPower ? "conditions.chvwapConditions.hasBearishPower &&" + "\n" : "") + + (conditions.chvwapConditions.isBullishPowerUp ? "conditions.chvwapConditions.isBullishPowerUp &&" + "\n" : "") + + (conditions.chvwapConditions.isBearishPowerUp ? "conditions.chvwapConditions.isBearishPowerUp &&" + "\n" : "") + + (conditions.chvwapConditions.isBullishPowerIncreasing ? "conditions.chvwapConditions.isBullishPowerIncreasing &&" + "\n" : "") + + (conditions.chvwapConditions.isBullishPowerDecreasing ? "conditions.chvwapConditions.isBullishPowerDecreasing &&" + "\n" : "") + + (conditions.chvwapConditions.isBearishPowerIncreasing ? "conditions.chvwapConditions.isBearishPowerIncreasing &&" + "\n" : "") + + (conditions.chvwapConditions.isBearishPowerDecreasing ? "conditions.chvwapConditions.isBearishPowerDecreasing &&" + "\n" : "") + + (conditions.chvwapConditions.isSBullish ? "conditions.chvwapConditions.isSBullish &&" + "\n" : "") + + (conditions.chvwapConditions.isSBearish ? "conditions.chvwapConditions.isSBearish &&" + "\n" : "") + + (conditions.chvwapConditions.isSSwitchedToBullish ? "conditions.chvwapConditions.isSSwitchedToBullish &&" + "\n" : "") + + (conditions.chvwapConditions.isSSwitchedToBearish ? "conditions.chvwapConditions.isSSwitchedToBearish &&" + "\n" : "") + + (conditions.chvwapConditions.isMBullish ? "conditions.chvwapConditions.isMBullish &&" + "\n" : "") + + (conditions.chvwapConditions.isMBearish ? "conditions.chvwapConditions.isMBearish &&" + "\n" : "") + + (conditions.chvwapConditions.isMSwitchedToBullish ? "conditions.chvwapConditions.isMSwitchedToBullish &&" + "\n" : "") + + (conditions.chvwapConditions.isMSwitchedToBearish ? "conditions.chvwapConditions.isMSwitchedToBearish &&" + "\n" : "") + + (conditions.chvwapConditions.isLBullish ? "conditions.chvwapConditions.isLBullish &&" + "\n" : "") + + (conditions.chvwapConditions.isLBearish ? "conditions.chvwapConditions.isLBearish &&" + "\n" : "") + + (conditions.chvwapConditions.isLSwitchedToBullish ? "conditions.chvwapConditions.isLSwitchedToBullish &&" + "\n" : "") + + (conditions.chvwapConditions.isLSwitchedToBearish ? "conditions.chvwapConditions.isLSwitchedToBearish &&" + "\n" : "") + + (conditions.chvwapConditions.isHBullish ? "conditions.chvwapConditions.isHBullish &&" + "\n" : "") + + (conditions.chvwapConditions.isHBearish ? "conditions.chvwapConditions.isHBearish &&" + "\n" : "") + + (conditions.chvwapConditions.isHSwitchedToBullish ? "conditions.chvwapConditions.isHSwitchedToBullish &&" + "\n" : "") + + (conditions.chvwapConditions.isHSwitchedToBearish ? "conditions.chvwapConditions.isHSwitchedToBearish &&" + "\n" : "") + + // "//" + "\n" + + // (!conditions.chvwapConditions.hasBullishPower ? "!conditions.chvwapConditions.hasBullishPower &&" + "\n" : "") + + // (!conditions.chvwapConditions.hasBearishPower ? "!conditions.chvwapConditions.hasBearishPower &&" + "\n" : "") + + // (!conditions.chvwapConditions.isBullishPowerUp ? "!conditions.chvwapConditions.isBullishPowerUp &&" + "\n" : "") + + // (!conditions.chvwapConditions.isBearishPowerUp ? "!conditions.chvwapConditions.isBearishPowerUp &&" + "\n" : "") + + // (!conditions.chvwapConditions.isBullishPowerIncreasing ? "!conditions.chvwapConditions.isBullishPowerIncreasing &&" + "\n" : "") + + // (!conditions.chvwapConditions.isBullishPowerDecreasing ? "!conditions.chvwapConditions.isBullishPowerDecreasing &&" + "\n" : "") + + // (!conditions.chvwapConditions.isBearishPowerIncreasing ? "!conditions.chvwapConditions.isBearishPowerIncreasing &&" + "\n" : "") + + // (!conditions.chvwapConditions.isBearishPowerDecreasing ? "!conditions.chvwapConditions.isBearishPowerDecreasing &&" + "\n" : "") + + // (!conditions.chvwapConditions.isSBullish ? "!conditions.chvwapConditions.isSBullish &&" + "\n" : "") + + // (!conditions.chvwapConditions.isSBearish ? "!conditions.chvwapConditions.isSBearish &&" + "\n" : "") + + // (!conditions.chvwapConditions.isSSwitchedToBullish ? "!conditions.chvwapConditions.isSSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chvwapConditions.isSSwitchedToBearish ? "!conditions.chvwapConditions.isSSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chvwapConditions.isMBullish ? "!conditions.chvwapConditions.isMBullish &&" + "\n" : "") + + // (!conditions.chvwapConditions.isMBearish ? "!conditions.chvwapConditions.isMBearish &&" + "\n" : "") + + // (!conditions.chvwapConditions.isMSwitchedToBullish ? "!conditions.chvwapConditions.isMSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chvwapConditions.isMSwitchedToBearish ? "!conditions.chvwapConditions.isMSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chvwapConditions.isLBullish ? "!conditions.chvwapConditions.isLBullish &&" + "\n" : "") + + // (!conditions.chvwapConditions.isLBearish ? "!conditions.chvwapConditions.isLBearish &&" + "\n" : "") + + // (!conditions.chvwapConditions.isLSwitchedToBullish ? "!conditions.chvwapConditions.isLSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chvwapConditions.isLSwitchedToBearish ? "!conditions.chvwapConditions.isLSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chvwapConditions.isHBullish ? "!conditions.chvwapConditions.isHBullish &&" + "\n" : "") + + // (!conditions.chvwapConditions.isHBearish ? "!conditions.chvwapConditions.isHBearish &&" + "\n" : "") + + // (!conditions.chvwapConditions.isHSwitchedToBullish ? "!conditions.chvwapConditions.isHSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chvwapConditions.isHSwitchedToBearish ? "!conditions.chvwapConditions.isHSwitchedToBearish &&" + "\n" : "") + + "//" + "\n" + + "// XCHICH ..." + "\n" + + "//" + "\n" + + (conditions.chichConditions.isCClosedOverKijunSen ? "conditions.chichConditions.isCClosedOverKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isCClosedUnderKijunSen ? "conditions.chichConditions.isCClosedUnderKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isCTenkanSenOverKijunSen ? "conditions.chichConditions.isCTenkanSenOverKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isCTenkanSenUnderKijunSen ? "conditions.chichConditions.isCTenkanSenUnderKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isCTenkanSenCrossedOverKijunSen ? "conditions.chichConditions.isCTenkanSenCrossedOverKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isCTenkanSenCrossedUnderKijunSen ? "conditions.chichConditions.isCTenkanSenCrossedUnderKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isCSenkouSpanAOverB ? "conditions.chichConditions.isCSenkouSpanAOverB &&" + "\n" : "") + + (conditions.chichConditions.isCSenkouSpanAUnderB ? "conditions.chichConditions.isCSenkouSpanAUnderB &&" + "\n" : "") + + (conditions.chichConditions.isCSenkouSpanAOverLast ? "conditions.chichConditions.isCSenkouSpanAOverLast &&" + "\n" : "") + + (conditions.chichConditions.isCSenkouSpanAUnderLast ? "conditions.chichConditions.isCSenkouSpanAUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isCFutureSenkouSpanAOverB ? "conditions.chichConditions.isCFutureSenkouSpanAOverB &&" + "\n" : "") + + (conditions.chichConditions.isCFutureSenkouSpanAUnderB ? "conditions.chichConditions.isCFutureSenkouSpanAUnderB &&" + "\n" : "") + + (conditions.chichConditions.isCFutureSenkouSpanAOverLast ? "conditions.chichConditions.isCFutureSenkouSpanAOverLast &&" + "\n" : "") + + (conditions.chichConditions.isCFutureSenkouSpanAUnderLast ? "conditions.chichConditions.isCFutureSenkouSpanAUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isCSenkouSpanACrossedOverB ? "conditions.chichConditions.isCSenkouSpanACrossedOverB &&" + "\n" : "") + + (conditions.chichConditions.isCSenkouSpanACrossedUnderB ? "conditions.chichConditions.isCSenkouSpanACrossedUnderB &&" + "\n" : "") + + (conditions.chichConditions.isCSenkouSpanACrossedOverLast ? "conditions.chichConditions.isCSenkouSpanACrossedOverLast &&" + "\n" : "") + + (conditions.chichConditions.isCSenkouSpanACrossedUnderLast ? "conditions.chichConditions.isCSenkouSpanACrossedUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isCFutureSenkouSpanACrossedOverB ? "conditions.chichConditions.isCFutureSenkouSpanACrossedOverB &&" + "\n" : "") + + (conditions.chichConditions.isCFutureSenkouSpanACrossedUnderB ? "conditions.chichConditions.isCFutureSenkouSpanACrossedUnderB &&" + "\n" : "") + + (conditions.chichConditions.isCFutureSenkouSpanACrossedOverLast ? "conditions.chichConditions.isCFutureSenkouSpanACrossedOverLast &&" + "\n" : "") + + (conditions.chichConditions.isCFutureSenkouSpanACrossedUnderLast ? "conditions.chichConditions.isCFutureSenkouSpanACrossedUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isSClosedOverKijunSen ? "conditions.chichConditions.isSClosedOverKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isSClosedUnderKijunSen ? "conditions.chichConditions.isSClosedUnderKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isSTenkanSenOverKijunSen ? "conditions.chichConditions.isSTenkanSenOverKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isSTenkanSenUnderKijunSen ? "conditions.chichConditions.isSTenkanSenUnderKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isSTenkanSenCrossedOverKijunSen ? "conditions.chichConditions.isSTenkanSenCrossedOverKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isSTenkanSenCrossedUnderKijunSen ? "conditions.chichConditions.isSTenkanSenCrossedUnderKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isSSenkouSpanAOverB ? "conditions.chichConditions.isSSenkouSpanAOverB &&" + "\n" : "") + + (conditions.chichConditions.isSSenkouSpanAUnderB ? "conditions.chichConditions.isSSenkouSpanAUnderB &&" + "\n" : "") + + (conditions.chichConditions.isSSenkouSpanAOverLast ? "conditions.chichConditions.isSSenkouSpanAOverLast &&" + "\n" : "") + + (conditions.chichConditions.isSSenkouSpanAUnderLast ? "conditions.chichConditions.isSSenkouSpanAUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isSFutureSenkouSpanAOverB ? "conditions.chichConditions.isSFutureSenkouSpanAOverB &&" + "\n" : "") + + (conditions.chichConditions.isSFutureSenkouSpanAUnderB ? "conditions.chichConditions.isSFutureSenkouSpanAUnderB &&" + "\n" : "") + + (conditions.chichConditions.isSFutureSenkouSpanAOverLast ? "conditions.chichConditions.isSFutureSenkouSpanAOverLast &&" + "\n" : "") + + (conditions.chichConditions.isSFutureSenkouSpanAUnderLast ? "conditions.chichConditions.isSFutureSenkouSpanAUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isSSenkouSpanACrossedOverB ? "conditions.chichConditions.isSSenkouSpanACrossedOverB &&" + "\n" : "") + + (conditions.chichConditions.isSSenkouSpanACrossedUnderB ? "conditions.chichConditions.isSSenkouSpanACrossedUnderB &&" + "\n" : "") + + (conditions.chichConditions.isSSenkouSpanACrossedOverLast ? "conditions.chichConditions.isSSenkouSpanACrossedOverLast &&" + "\n" : "") + + (conditions.chichConditions.isSSenkouSpanACrossedUnderLast ? "conditions.chichConditions.isSSenkouSpanACrossedUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isSFutureSenkouSpanACrossedOverB ? "conditions.chichConditions.isSFutureSenkouSpanACrossedOverB &&" + "\n" : "") + + (conditions.chichConditions.isSFutureSenkouSpanACrossedUnderB ? "conditions.chichConditions.isSFutureSenkouSpanACrossedUnderB &&" + "\n" : "") + + (conditions.chichConditions.isSFutureSenkouSpanACrossedOverLast ? "conditions.chichConditions.isSFutureSenkouSpanACrossedOverLast &&" + "\n" : "") + + (conditions.chichConditions.isSFutureSenkouSpanACrossedUnderLast ? "conditions.chichConditions.isSFutureSenkouSpanACrossedUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isMClosedOverKijunSen ? "conditions.chichConditions.isMClosedOverKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isMClosedUnderKijunSen ? "conditions.chichConditions.isMClosedUnderKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isMTenkanSenOverKijunSen ? "conditions.chichConditions.isMTenkanSenOverKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isMTenkanSenUnderKijunSen ? "conditions.chichConditions.isMTenkanSenUnderKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isMTenkanSenCrossedOverKijunSen ? "conditions.chichConditions.isMTenkanSenCrossedOverKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isMTenkanSenCrossedUnderKijunSen ? "conditions.chichConditions.isMTenkanSenCrossedUnderKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isMSenkouSpanAOverB ? "conditions.chichConditions.isMSenkouSpanAOverB &&" + "\n" : "") + + (conditions.chichConditions.isMSenkouSpanAUnderB ? "conditions.chichConditions.isMSenkouSpanAUnderB &&" + "\n" : "") + + (conditions.chichConditions.isMSenkouSpanAOverLast ? "conditions.chichConditions.isMSenkouSpanAOverLast &&" + "\n" : "") + + (conditions.chichConditions.isMSenkouSpanAUnderLast ? "conditions.chichConditions.isMSenkouSpanAUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isMFutureSenkouSpanAOverB ? "conditions.chichConditions.isMFutureSenkouSpanAOverB &&" + "\n" : "") + + (conditions.chichConditions.isMFutureSenkouSpanAUnderB ? "conditions.chichConditions.isMFutureSenkouSpanAUnderB &&" + "\n" : "") + + (conditions.chichConditions.isMFutureSenkouSpanAOverLast ? "conditions.chichConditions.isMFutureSenkouSpanAOverLast &&" + "\n" : "") + + (conditions.chichConditions.isMFutureSenkouSpanAUnderLast ? "conditions.chichConditions.isMFutureSenkouSpanAUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isMSenkouSpanACrossedOverB ? "conditions.chichConditions.isMSenkouSpanACrossedOverB &&" + "\n" : "") + + (conditions.chichConditions.isMSenkouSpanACrossedUnderB ? "conditions.chichConditions.isMSenkouSpanACrossedUnderB &&" + "\n" : "") + + (conditions.chichConditions.isMSenkouSpanACrossedOverLast ? "conditions.chichConditions.isMSenkouSpanACrossedOverLast &&" + "\n" : "") + + (conditions.chichConditions.isMSenkouSpanACrossedUnderLast ? "conditions.chichConditions.isMSenkouSpanACrossedUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isMFutureSenkouSpanACrossedOverB ? "conditions.chichConditions.isMFutureSenkouSpanACrossedOverB &&" + "\n" : "") + + (conditions.chichConditions.isMFutureSenkouSpanACrossedUnderB ? "conditions.chichConditions.isMFutureSenkouSpanACrossedUnderB &&" + "\n" : "") + + (conditions.chichConditions.isMFutureSenkouSpanACrossedOverLast ? "conditions.chichConditions.isMFutureSenkouSpanACrossedOverLast &&" + "\n" : "") + + (conditions.chichConditions.isMFutureSenkouSpanACrossedUnderLast ? "conditions.chichConditions.isMFutureSenkouSpanACrossedUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isLClosedOverKijunSen ? "conditions.chichConditions.isLClosedOverKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isLClosedUnderKijunSen ? "conditions.chichConditions.isLClosedUnderKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isLTenkanSenOverKijunSen ? "conditions.chichConditions.isLTenkanSenOverKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isLTenkanSenUnderKijunSen ? "conditions.chichConditions.isLTenkanSenUnderKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isLTenkanSenCrossedOverKijunSen ? "conditions.chichConditions.isLTenkanSenCrossedOverKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isLTenkanSenCrossedUnderKijunSen ? "conditions.chichConditions.isLTenkanSenCrossedUnderKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isLSenkouSpanAOverB ? "conditions.chichConditions.isLSenkouSpanAOverB &&" + "\n" : "") + + (conditions.chichConditions.isLSenkouSpanAUnderB ? "conditions.chichConditions.isLSenkouSpanAUnderB &&" + "\n" : "") + + (conditions.chichConditions.isLSenkouSpanAOverLast ? "conditions.chichConditions.isLSenkouSpanAOverLast &&" + "\n" : "") + + (conditions.chichConditions.isLSenkouSpanAUnderLast ? "conditions.chichConditions.isLSenkouSpanAUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isLFutureSenkouSpanAOverB ? "conditions.chichConditions.isLFutureSenkouSpanAOverB &&" + "\n" : "") + + (conditions.chichConditions.isLFutureSenkouSpanAUnderB ? "conditions.chichConditions.isLFutureSenkouSpanAUnderB &&" + "\n" : "") + + (conditions.chichConditions.isLFutureSenkouSpanAOverLast ? "conditions.chichConditions.isLFutureSenkouSpanAOverLast &&" + "\n" : "") + + (conditions.chichConditions.isLFutureSenkouSpanAUnderLast ? "conditions.chichConditions.isLFutureSenkouSpanAUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isLSenkouSpanACrossedOverB ? "conditions.chichConditions.isLSenkouSpanACrossedOverB &&" + "\n" : "") + + (conditions.chichConditions.isLSenkouSpanACrossedUnderB ? "conditions.chichConditions.isLSenkouSpanACrossedUnderB &&" + "\n" : "") + + (conditions.chichConditions.isLSenkouSpanACrossedOverLast ? "conditions.chichConditions.isLSenkouSpanACrossedOverLast &&" + "\n" : "") + + (conditions.chichConditions.isLSenkouSpanACrossedUnderLast ? "conditions.chichConditions.isLSenkouSpanACrossedUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isLFutureSenkouSpanACrossedOverB ? "conditions.chichConditions.isLFutureSenkouSpanACrossedOverB &&" + "\n" : "") + + (conditions.chichConditions.isLFutureSenkouSpanACrossedUnderB ? "conditions.chichConditions.isLFutureSenkouSpanACrossedUnderB &&" + "\n" : "") + + (conditions.chichConditions.isLFutureSenkouSpanACrossedOverLast ? "conditions.chichConditions.isLFutureSenkouSpanACrossedOverLast &&" + "\n" : "") + + (conditions.chichConditions.isLFutureSenkouSpanACrossedUnderLast ? "conditions.chichConditions.isLFutureSenkouSpanACrossedUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isHClosedOverKijunSen ? "conditions.chichConditions.isHClosedOverKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isHClosedUnderKijunSen ? "conditions.chichConditions.isHClosedUnderKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isHTenkanSenOverKijunSen ? "conditions.chichConditions.isHTenkanSenOverKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isHTenkanSenUnderKijunSen ? "conditions.chichConditions.isHTenkanSenUnderKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isHTenkanSenCrossedOverKijunSen ? "conditions.chichConditions.isHTenkanSenCrossedOverKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isHTenkanSenCrossedUnderKijunSen ? "conditions.chichConditions.isHTenkanSenCrossedUnderKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isHSenkouSpanAOverB ? "conditions.chichConditions.isHSenkouSpanAOverB &&" + "\n" : "") + + (conditions.chichConditions.isHSenkouSpanAUnderB ? "conditions.chichConditions.isHSenkouSpanAUnderB &&" + "\n" : "") + + (conditions.chichConditions.isHSenkouSpanAOverLast ? "conditions.chichConditions.isHSenkouSpanAOverLast &&" + "\n" : "") + + (conditions.chichConditions.isHSenkouSpanAUnderLast ? "conditions.chichConditions.isHSenkouSpanAUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isHFutureSenkouSpanAOverB ? "conditions.chichConditions.isHFutureSenkouSpanAOverB &&" + "\n" : "") + + (conditions.chichConditions.isHFutureSenkouSpanAUnderB ? "conditions.chichConditions.isHFutureSenkouSpanAUnderB &&" + "\n" : "") + + (conditions.chichConditions.isHFutureSenkouSpanAOverLast ? "conditions.chichConditions.isHFutureSenkouSpanAOverLast &&" + "\n" : "") + + (conditions.chichConditions.isHFutureSenkouSpanAUnderLast ? "conditions.chichConditions.isHFutureSenkouSpanAUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isHSenkouSpanACrossedOverB ? "conditions.chichConditions.isHSenkouSpanACrossedOverB &&" + "\n" : "") + + (conditions.chichConditions.isHSenkouSpanACrossedUnderB ? "conditions.chichConditions.isHSenkouSpanACrossedUnderB &&" + "\n" : "") + + (conditions.chichConditions.isHSenkouSpanACrossedOverLast ? "conditions.chichConditions.isHSenkouSpanACrossedOverLast &&" + "\n" : "") + + (conditions.chichConditions.isHSenkouSpanACrossedUnderLast ? "conditions.chichConditions.isHSenkouSpanACrossedUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isHFutureSenkouSpanACrossedOverB ? "conditions.chichConditions.isHFutureSenkouSpanACrossedOverB &&" + "\n" : "") + + (conditions.chichConditions.isHFutureSenkouSpanACrossedUnderB ? "conditions.chichConditions.isHFutureSenkouSpanACrossedUnderB &&" + "\n" : "") + + (conditions.chichConditions.isHFutureSenkouSpanACrossedOverLast ? "conditions.chichConditions.isHFutureSenkouSpanACrossedOverLast &&" + "\n" : "") + + (conditions.chichConditions.isHFutureSenkouSpanACrossedUnderLast ? "conditions.chichConditions.isHFutureSenkouSpanACrossedUnderLast &&" + "\n" : "") + + // "//" + "\n" + + // (!conditions.chichConditions.isCClosedOverKijunSen ? "!conditions.chichConditions.isCClosedOverKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isCClosedUnderKijunSen ? "!conditions.chichConditions.isCClosedUnderKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isCTenkanSenOverKijunSen ? "!conditions.chichConditions.isCTenkanSenOverKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isCTenkanSenUnderKijunSen ? "!conditions.chichConditions.isCTenkanSenUnderKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isCTenkanSenCrossedOverKijunSen ? "!conditions.chichConditions.isCTenkanSenCrossedOverKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isCTenkanSenCrossedUnderKijunSen ? "!conditions.chichConditions.isCTenkanSenCrossedUnderKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isCSenkouSpanAOverB ? "!conditions.chichConditions.isCSenkouSpanAOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isCSenkouSpanAUnderB ? "!conditions.chichConditions.isCSenkouSpanAUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isCSenkouSpanAOverLast ? "!conditions.chichConditions.isCSenkouSpanAOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isCSenkouSpanAUnderLast ? "!conditions.chichConditions.isCSenkouSpanAUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isCFutureSenkouSpanAOverB ? "!conditions.chichConditions.isCFutureSenkouSpanAOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isCFutureSenkouSpanAUnderB ? "!conditions.chichConditions.isCFutureSenkouSpanAUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isCFutureSenkouSpanAOverLast ? "!conditions.chichConditions.isCFutureSenkouSpanAOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isCFutureSenkouSpanAUnderLast ? "!conditions.chichConditions.isCFutureSenkouSpanAUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isCSenkouSpanACrossedOverB ? "!conditions.chichConditions.isCSenkouSpanACrossedOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isCSenkouSpanACrossedUnderB ? "!conditions.chichConditions.isCSenkouSpanACrossedUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isCSenkouSpanACrossedOverLast ? "!conditions.chichConditions.isCSenkouSpanACrossedOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isCSenkouSpanACrossedUnderLast ? "!conditions.chichConditions.isCSenkouSpanACrossedUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isCFutureSenkouSpanACrossedOverB ? "!conditions.chichConditions.isCFutureSenkouSpanACrossedOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isCFutureSenkouSpanACrossedUnderB ? "!conditions.chichConditions.isCFutureSenkouSpanACrossedUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isCFutureSenkouSpanACrossedOverLast ? "!conditions.chichConditions.isCFutureSenkouSpanACrossedOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isCFutureSenkouSpanACrossedUnderLast ? "!conditions.chichConditions.isCFutureSenkouSpanACrossedUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isSClosedOverKijunSen ? "!conditions.chichConditions.isSClosedOverKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isSClosedUnderKijunSen ? "!conditions.chichConditions.isSClosedUnderKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isSTenkanSenOverKijunSen ? "!conditions.chichConditions.isSTenkanSenOverKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isSTenkanSenUnderKijunSen ? "!conditions.chichConditions.isSTenkanSenUnderKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isSTenkanSenCrossedOverKijunSen ? "!conditions.chichConditions.isSTenkanSenCrossedOverKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isSTenkanSenCrossedUnderKijunSen ? "!conditions.chichConditions.isSTenkanSenCrossedUnderKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isSSenkouSpanAOverB ? "!conditions.chichConditions.isSSenkouSpanAOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isSSenkouSpanAUnderB ? "!conditions.chichConditions.isSSenkouSpanAUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isSSenkouSpanAOverLast ? "!conditions.chichConditions.isSSenkouSpanAOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isSSenkouSpanAUnderLast ? "!conditions.chichConditions.isSSenkouSpanAUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isSFutureSenkouSpanAOverB ? "!conditions.chichConditions.isSFutureSenkouSpanAOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isSFutureSenkouSpanAUnderB ? "!conditions.chichConditions.isSFutureSenkouSpanAUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isSFutureSenkouSpanAOverLast ? "!conditions.chichConditions.isSFutureSenkouSpanAOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isSFutureSenkouSpanAUnderLast ? "!conditions.chichConditions.isSFutureSenkouSpanAUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isSSenkouSpanACrossedOverB ? "!conditions.chichConditions.isSSenkouSpanACrossedOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isSSenkouSpanACrossedUnderB ? "!conditions.chichConditions.isSSenkouSpanACrossedUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isSSenkouSpanACrossedOverLast ? "!conditions.chichConditions.isSSenkouSpanACrossedOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isSSenkouSpanACrossedUnderLast ? "!conditions.chichConditions.isSSenkouSpanACrossedUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isSFutureSenkouSpanACrossedOverB ? "!conditions.chichConditions.isSFutureSenkouSpanACrossedOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isSFutureSenkouSpanACrossedUnderB ? "!conditions.chichConditions.isSFutureSenkouSpanACrossedUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isSFutureSenkouSpanACrossedOverLast ? "!conditions.chichConditions.isSFutureSenkouSpanACrossedOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isSFutureSenkouSpanACrossedUnderLast ? "!conditions.chichConditions.isSFutureSenkouSpanACrossedUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isMClosedOverKijunSen ? "!conditions.chichConditions.isMClosedOverKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isMClosedUnderKijunSen ? "!conditions.chichConditions.isMClosedUnderKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isMTenkanSenOverKijunSen ? "!conditions.chichConditions.isMTenkanSenOverKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isMTenkanSenUnderKijunSen ? "!conditions.chichConditions.isMTenkanSenUnderKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isMTenkanSenCrossedOverKijunSen ? "!conditions.chichConditions.isMTenkanSenCrossedOverKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isMTenkanSenCrossedUnderKijunSen ? "!conditions.chichConditions.isMTenkanSenCrossedUnderKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isMSenkouSpanAOverB ? "!conditions.chichConditions.isMSenkouSpanAOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isMSenkouSpanAUnderB ? "!conditions.chichConditions.isMSenkouSpanAUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isMSenkouSpanAOverLast ? "!conditions.chichConditions.isMSenkouSpanAOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isMSenkouSpanAUnderLast ? "!conditions.chichConditions.isMSenkouSpanAUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isMFutureSenkouSpanAOverB ? "!conditions.chichConditions.isMFutureSenkouSpanAOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isMFutureSenkouSpanAUnderB ? "!conditions.chichConditions.isMFutureSenkouSpanAUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isMFutureSenkouSpanAOverLast ? "!conditions.chichConditions.isMFutureSenkouSpanAOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isMFutureSenkouSpanAUnderLast ? "!conditions.chichConditions.isMFutureSenkouSpanAUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isMSenkouSpanACrossedOverB ? "!conditions.chichConditions.isMSenkouSpanACrossedOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isMSenkouSpanACrossedUnderB ? "!conditions.chichConditions.isMSenkouSpanACrossedUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isMSenkouSpanACrossedOverLast ? "!conditions.chichConditions.isMSenkouSpanACrossedOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isMSenkouSpanACrossedUnderLast ? "!conditions.chichConditions.isMSenkouSpanACrossedUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isMFutureSenkouSpanACrossedOverB ? "!conditions.chichConditions.isMFutureSenkouSpanACrossedOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isMFutureSenkouSpanACrossedUnderB ? "!conditions.chichConditions.isMFutureSenkouSpanACrossedUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isMFutureSenkouSpanACrossedOverLast ? "!conditions.chichConditions.isMFutureSenkouSpanACrossedOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isMFutureSenkouSpanACrossedUnderLast ? "!conditions.chichConditions.isMFutureSenkouSpanACrossedUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isLClosedOverKijunSen ? "!conditions.chichConditions.isLClosedOverKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isLClosedUnderKijunSen ? "!conditions.chichConditions.isLClosedUnderKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isLTenkanSenOverKijunSen ? "!conditions.chichConditions.isLTenkanSenOverKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isLTenkanSenUnderKijunSen ? "!conditions.chichConditions.isLTenkanSenUnderKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isLTenkanSenCrossedOverKijunSen ? "!conditions.chichConditions.isLTenkanSenCrossedOverKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isLTenkanSenCrossedUnderKijunSen ? "!conditions.chichConditions.isLTenkanSenCrossedUnderKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isLSenkouSpanAOverB ? "!conditions.chichConditions.isLSenkouSpanAOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isLSenkouSpanAUnderB ? "!conditions.chichConditions.isLSenkouSpanAUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isLSenkouSpanAOverLast ? "!conditions.chichConditions.isLSenkouSpanAOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isLSenkouSpanAUnderLast ? "!conditions.chichConditions.isLSenkouSpanAUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isLFutureSenkouSpanAOverB ? "!conditions.chichConditions.isLFutureSenkouSpanAOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isLFutureSenkouSpanAUnderB ? "!conditions.chichConditions.isLFutureSenkouSpanAUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isLFutureSenkouSpanAOverLast ? "!conditions.chichConditions.isLFutureSenkouSpanAOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isLFutureSenkouSpanAUnderLast ? "!conditions.chichConditions.isLFutureSenkouSpanAUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isLSenkouSpanACrossedOverB ? "!conditions.chichConditions.isLSenkouSpanACrossedOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isLSenkouSpanACrossedUnderB ? "!conditions.chichConditions.isLSenkouSpanACrossedUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isLSenkouSpanACrossedOverLast ? "!conditions.chichConditions.isLSenkouSpanACrossedOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isLSenkouSpanACrossedUnderLast ? "!conditions.chichConditions.isLSenkouSpanACrossedUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isLFutureSenkouSpanACrossedOverB ? "!conditions.chichConditions.isLFutureSenkouSpanACrossedOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isLFutureSenkouSpanACrossedUnderB ? "!conditions.chichConditions.isLFutureSenkouSpanACrossedUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isLFutureSenkouSpanACrossedOverLast ? "!conditions.chichConditions.isLFutureSenkouSpanACrossedOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isLFutureSenkouSpanACrossedUnderLast ? "!conditions.chichConditions.isLFutureSenkouSpanACrossedUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isHClosedOverKijunSen ? "!conditions.chichConditions.isHClosedOverKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isHClosedUnderKijunSen ? "!conditions.chichConditions.isHClosedUnderKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isHTenkanSenOverKijunSen ? "!conditions.chichConditions.isHTenkanSenOverKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isHTenkanSenUnderKijunSen ? "!conditions.chichConditions.isHTenkanSenUnderKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isHTenkanSenCrossedOverKijunSen ? "!conditions.chichConditions.isHTenkanSenCrossedOverKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isHTenkanSenCrossedUnderKijunSen ? "!conditions.chichConditions.isHTenkanSenCrossedUnderKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isHSenkouSpanAOverB ? "!conditions.chichConditions.isHSenkouSpanAOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isHSenkouSpanAUnderB ? "!conditions.chichConditions.isHSenkouSpanAUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isHSenkouSpanAOverLast ? "!conditions.chichConditions.isHSenkouSpanAOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isHSenkouSpanAUnderLast ? "!conditions.chichConditions.isHSenkouSpanAUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isHFutureSenkouSpanAOverB ? "!conditions.chichConditions.isHFutureSenkouSpanAOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isHFutureSenkouSpanAUnderB ? "!conditions.chichConditions.isHFutureSenkouSpanAUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isHFutureSenkouSpanAOverLast ? "!conditions.chichConditions.isHFutureSenkouSpanAOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isHFutureSenkouSpanAUnderLast ? "!conditions.chichConditions.isHFutureSenkouSpanAUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isHSenkouSpanACrossedOverB ? "!conditions.chichConditions.isHSenkouSpanACrossedOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isHSenkouSpanACrossedUnderB ? "!conditions.chichConditions.isHSenkouSpanACrossedUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isHSenkouSpanACrossedOverLast ? "!conditions.chichConditions.isHSenkouSpanACrossedOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isHSenkouSpanACrossedUnderLast ? "!conditions.chichConditions.isHSenkouSpanACrossedUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isHFutureSenkouSpanACrossedOverB ? "!conditions.chichConditions.isHFutureSenkouSpanACrossedOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isHFutureSenkouSpanACrossedUnderB ? "!conditions.chichConditions.isHFutureSenkouSpanACrossedUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isHFutureSenkouSpanACrossedOverLast ? "!conditions.chichConditions.isHFutureSenkouSpanACrossedOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isHFutureSenkouSpanACrossedUnderLast ? "!conditions.chichConditions.isHFutureSenkouSpanACrossedUnderLast &&" + "\n" : "") + + "//" + "\n" + + ")" + "\n" + "//" + + "\n" + + "||" + "\n" + + "//"; + + // + return result; + } + + // + bool IsFiltered( + XSignal &signal, // Provided Signal + XCHStrategyConditions &conditions, // Market Conditions + bool force = false // + ) + { + // + bool result = false; + + // + // Validate Args ... + if (!signal.IsValid() || !conditions.IsValid()) + { + // + result = true; + return result; + } + + // + string market = _account.GetCompany(); + bool isAMarkets = _marketParser.IsAMarkets(market); + + // + // bool isAMarketFiltered = _amarketsParser.IsFiltered( + // signal, + // conditions, + // force // + // ); + + // + if (!force) + { + // result = isAMarketFiltered; + } + else + { + // + result = + // + // isAMarketFiltered + // // + // || + // + false + // + ; + } + + // + return result; + } +}; + +// \ No newline at end of file diff --git a/Documents/BKP/XCHCHE.Empty/x-saherelm.xch.che.strategy.ea.mq5 b/Documents/BKP/XCHCHE.Empty/x-saherelm.xch.che.strategy.ea.mq5 new file mode 100644 index 00000000..4e184f6a --- /dev/null +++ b/Documents/BKP/XCHCHE.Empty/x-saherelm.xch.che.strategy.ea.mq5 @@ -0,0 +1,966 @@ +/////////////////////////////////////////////////////// +// +// SaherElm IT Center XTest MQL5 Expert Advisor +// ------------------------------------------------- +// Name: XCHCHEEA +// Description: an Exper Advisor which used XCHSetup +// to Analyse Market ... +// +// Maintainer: +// ------------ +// Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com) +// +//////////////////////////////////////////////////////x +// +// Global Properties ... +#property copyright "Copyright 2023, SaherElm IT Center" +#property link "https://saherelm.ir" +#property version "1.00" +#property description "SaherElm XCHCHEEA" +#property strict + +// +#define ShortName "XCHCHEEA" + +// +// Imports ... +#include "../Helpers/x-saherelm.xct.helper.mq5" +#include "../Helpers/x-saherelm.xcc.helper.mq5" + +// +#include "../Parsers/x-saherelm.xch.che.parser.mq5" +#include "../Strategies/x-saherelm.xch.che.strategy.mq5" + +// +// Inputs ... + +// +// Common ... +input group "Common"; +input long eaMagicNumber = 78692110; // Magic Number +input int eaSlippage = 10; // Slippgae +input string eaLogSuffix = ""; // Log Suffix + +// +// Symbols ... +input group "Symbols"; +input bool eaMultiSymbol = false; // Use Multi Symbol +input bool eaUseMaxAllowedTradesPerSymbol = true; // Use Max Allowed Trades Per Symbol +input string eaSymbols = "EURUSDb,GBPUSDb,EURGBPb,USDJPYb,EURJPYb,USDCHFb,EURCHFb,AUDUSDb,NZDUSDb,USDCADb,EURCADb,XAUUSDb,DowJones30"; // Trading Symbols + +// +// Risk Management ... +input group "Risk Management"; + +// +// Risk Management > Risk / Reward Calculation ... +input group "Risk/Reward"; +input double eaR2R = 1.5; // Risk to Reward Ratio for Dynamic TP SL +input bool eaUseFixedTPSLPoints = false; // Use Fixed TP SL in Points +input bool eaIgnoreTP = false; // Ignore TP +input bool eaIgnoreSL = false; // Ignore SL +input double eaTPPoint = 200; // Static TP Point +input double eaSLPoint = 200; // Static SL Point + +// +// Risk Management > Volume Calculation ... +input group "Volume"; +input bool eaUseDynamicVolume = false; // Use Dynamic Volume +input double eaDynamicVolumeStep = 0.01; // Increase Volume Step +input double eaDynamicVolumeBalanceFactor = 200; // Balance Factor for Generate Dynamic Volume +input double eaVolume = 0.2; // Static Volume + +// +// Risk Management > Trade Management ... +input group "Trade Management"; +input bool eaAllowLong = true; // Allow Long Positions +input bool eaAllowShort = true; // Allow Short Positions +input int eaMaxAllowedLongs = 2; // Max Allowed Long Positions +input int eaMaxAllowedShorts = 2; // Max Allowed Short Positions +input double eaMaxDrawdownPercentForOpenTrades = 3; // Max Drawdown Percent for Open Trades + +// +// Risk Management > Hedging ... +input group "Hedging"; +input bool eaAllowHedging = true; // Allow Hedging Trades +input int eaMinTradesForHedge = 2; // Minimum Open Trades for Hedging +input double eaHedgeVolumeFactor = 0.01; // Volume Factor for Hedging +input double eaMinimumProfitPerVolumeForHedging = 0.5; // Minimum Required Profit per Volume for Hedging + +// +// Risk Management > Trailling Stop ... +input group "Trailling Stop"; +input bool eaAllowTrailStop = true; // Allow Trail Stop +input double eaStartTrailInPoint = 50; // Trail Start After Profit (Point) +input double eaTrailStepInPoint = 25; // Trail Size in each Step (Point) +input bool eaIgnoreTPAfterTrail = true; // Ignore TP after Trail + +// +// Risk Management > Trades Recovery ... +input group "Trades Recovery"; +input bool eaAllowRecovery = false; // Allow Recover Trades +input double eaRecoveryTPPoint = 150; // Recovery TP (Point) +input double eaRecoverySLPoint = 200; // Recovery SL (Point) +input int eaMaxAllowedRecoveryTrades = 0; // Max Allowed Recovery Trades +input double eaRecoveryVolumeMultiplier = 2; // Recovery Volume Multiplier +input double eaMaxAllowedRecoveryTradesVolume = 0.1; // Max Allowed Recovery Volume + +// +// Alert ... +input group "Alert"; +input bool eAEnableAlerts = true; // Enable Alerts +input bool eALogAlerts = true; // Log Alerts +input bool eAMailAlerts = false; // Mail Alerts +input bool eAPushAlerts = false; // Push Alerts +input bool eATerminalAlerts = false; // Terminal Alerts + +// +// Time Report ... +input group "Reports"; +input bool eaAlertNewMonths = false; // Alert New Month +input bool eaAlertNewWeeks = false; // Alert New Weeks +input bool eaAlertNewDays = true; // Alert New Days +input bool eaAlertNewHours = false; // Alert New Hours +input bool eaAlertRawSignals = false; // Alert Raw Signals +input bool eaAlertStrongSignals = false; // Alert Strong Signals + +// +// Variables ... + +// +// Bar Style nad Time Instances ... +XSCXCTHelper *mCTHelper; +XSCXCCHelper *mCCHelper; + +// +// Registred Strategies ... +XSCBaseStrategy *strategies[]; + +// +// Trader Instance Class ... +XSCTrade *eaTrader; + +// +// Alert Class ... +XSCAlert *eaAlert; + +// +// Time Tracker ... +XTimeTracker eaTimeTracker; + +// +// Trade Handler Instance Class ... +XSCXTradeHandler *eaTradeHandler; + +// +string mTag = ""; + +// +int forceSignalsCount = 0; + +// +// Event Handlers ... + +// +// Initialization ... +int OnInit() +{ + // + if (!ValidateInputs()) + { + return INIT_PARAMETERS_INCORRECT; + } + + // + if (!InitialEA()) + { + return INIT_FAILED; + } + + // + mTag = + !IsValid(eaLogSuffix) + ? ShortName + : ShortName + "_" + eaLogSuffix; + + // + drawPrefix = mTag; + + // + // EventSetTimer(1); + // EventSetMillisecondTimer(100); + + // + // Alert Initialization ... + string msg = "Initialized Successfully ..."; + eaAlert.Alert(msg); + + // + // Init Succeed ... + return INIT_SUCCEEDED; +} + +// +// DeInitialization ... +void OnDeinit(const int reason) +{ + // + // REASON_PROGRAM 0 The EA has stopped working calling the ExpertRemove() function + // REASON_REMOVE 1 Program removed from a chart + // REASON_RECOMPILE 2 Program recompiled + // REASON_CHARTCHANGE 3 A symbol or a chart period is changed + // REASON_CHARTCLOSE 4 Chart closed + // REASON_PARAMETERS 5 Inputs changed by a user + // REASON_ACCOUNT 6 Another account has been activated or reconnection to the trade server has occurred due to changes in the account settings + // REASON_TEMPLATE 7 Another chart template applied + // REASON_INITFAILED 8 The OnInit() handler returned a non-zero value + // REASON_CLOSE 9 Terminal closed + + // + string msg = "MaxSameTimeTrades: " + ToString(eaTradeHandler.MaxSameTimeTrades()) + "\n" + + "ForceSignalsCount: " + ToString(forceSignalsCount); + eaAlert.Alert(msg); + + // + // Alert De Initialization Succeeded ... + msg = "De Initialized Successfully ..."; + eaAlert.Alert(msg); + + // + // De Initialize XSampleEA Providers ... + delete mCTHelper; + delete mCCHelper; + + // + delete eaAlert; + delete eaTrader; + delete eaTradeHandler; + + // + // EventKillTimer(); + + // + Clean(strategies); +} + +// +// On Tick Handler ... +void OnTick() +{ + // + HandleTradeState(); + HandleTimeReport(); + HandleStrategiesOnTick(); +} + +// +// Handle On Trade Event ... +void OnTrade() +{ + eaTrader.HandleOnTrade(); +} + +// +// On Timer ... +void OnTimer() +{ + // + // HandleTradeState(); + // HandleTimeReport(); + // HandleStrategiesOnTick(); +} + +// +// Custom Functions ... + +// +// Validate Inputs ... +bool ValidateInputs() +{ + // + bool result = false; + + // + string errMessage = ""; + + // + bool isCommonValid = ( + // + eaSlippage > 0 && + eaMagicNumber > 0 + // + ); + if (!isCommonValid) + { + // + errMessage += "common configurations error;" + "\n"; + } + + // + bool isSymbolsValid = ( + // + eaMultiSymbol + ? IsValid(eaSymbols) + : true + // + ); + if (!isSymbolsValid) + { + // + errMessage += "symbols configurations error;" + "\n"; + } + + // + bool isRiskRewardValid = ( + // + (eaUseFixedTPSLPoints + ? eaTPPoint > 0 || + eaSLPoint > 0 + : eaR2R > 0) && + !(eaIgnoreTP && + eaIgnoreSL) + // + ); + if (!isRiskRewardValid) + { + // + errMessage += "risk/reward configurations error;" + "\n"; + } + + // + bool isVolumeValid = ( + // + eaUseDynamicVolume + ? eaDynamicVolumeStep >= 0.01 && + eaDynamicVolumeBalanceFactor > 0 + : eaVolume >= 0.01 + // + ); + if (!isVolumeValid) + { + // + errMessage += "volume configurations error;" + "\n"; + } + + // + bool isTradeManagementValid = ( + // + !(!eaAllowLong && !eaAllowShort) && + eaMaxAllowedLongs >= 0 && + eaMaxAllowedShorts >= 0 + // + ); + if (!isTradeManagementValid) + { + // + errMessage += "trade management configurations error;" + "\n"; + } + + // + bool isHedgingValid = ( + // + eaAllowHedging + ? eaMinTradesForHedge >= 1 && + eaHedgeVolumeFactor >= 0.01 && + eaMinimumProfitPerVolumeForHedging >= 0 + : true + // + ); + if (!isHedgingValid) + { + // + errMessage += "hedging configurations error;" + "\n"; + } + + // + bool isTraillingValid = ( + // + eaAllowTrailStop + ? eaStartTrailInPoint > 0 && + eaTrailStepInPoint > 0 + : true + // + ); + if (!isTraillingValid) + { + // + errMessage += "trailling configurations error;" + "\n"; + } + + // + bool isRecoveryValid = ( + // + eaAllowRecovery + ? eaRecoveryTPPoint > 0 && + eaRecoverySLPoint > 0 && + eaMaxAllowedRecoveryTrades >= 0 && + eaRecoveryVolumeMultiplier > 0 && + eaMaxAllowedRecoveryTradesVolume >= 0 + : true + // + ); + if (!isRecoveryValid) + { + // + errMessage += "recovery configurations error;" + "\n"; + } + + // + result = + // + // Common ... + isCommonValid && + // + // Symbols ... + isSymbolsValid && + // + // Risk/Reward ... + isRiskRewardValid && + // + // Volume ... + isVolumeValid && + // + // Trade Management ... + isTradeManagementValid && + // + // Hedging ... + isHedgingValid && + // + // Trailling ... + isTraillingValid && + // + // Recovery ... + isRecoveryValid + // + ; + + // + if (!result) + { + Print("Errors: \n", errMessage); + } + + // + return result; +} + +// +// Initialize all Requirements ... +bool InitialEA() +{ + // + bool result = false; + + // + // Bar Timer ... + XCTInputs ctInputs; + ctInputs.Default(); + mCTHelper = new XSCXCTHelper(); + result = mCTHelper.Init( + _Symbol, + _Period, + ctInputs // + ); + if (!result) + { + return result; + } + + // + // Bar Styles ... + XCCInputs ccInputs; + ccInputs.Default(); + mCCHelper = new XSCXCCHelper(); + result = mCCHelper.Init( + _Symbol, + _Period, + ccInputs // + ); + if (!result) + { + return result; + } + + // + // Create Instance of Alert Class ... + eaAlert = new XSCAlert(); + eaAlert.SetPrefix(mTag); + eaAlert.SetLogAlerts(eALogAlerts); + eaAlert.SetMailAlerts(eAMailAlerts); + eaAlert.SetPushAlerts(eAPushAlerts); + eaAlert.SetEnableAlerts(eAEnableAlerts); + eaAlert.SetTerminalAlerts(eATerminalAlerts); + + // + // Create Trader Instance ... + eaTrader = new XSCTrade( + eaSlippage, + eaMagicNumber // + ); + eaTrader.AddOnStopLossEventHandler(OnStopLossTriggered); + eaTrader.AddOnTakeProfitEventHandler(OnTakeProfitTriggered); + eaTrader.AddOnForceClosePositionEventHandler(OnPositionForceClosed); + + // + // Initialize Trade Handler ... + eaTradeHandler = new XSCXTradeHandler(eaTrader); + eaTradeHandler.SaveTrades(true); + eaTradeHandler.SaveSignals(true); + eaTradeHandler.SaveConditions(true); + + // + // Configure Alerts ... + eaTradeHandler.SetAlertPrefix(mTag); + eaTradeHandler.SetAlertEnableAlerts(eAEnableAlerts); + eaTradeHandler.SetAlertLogAlerts(eALogAlerts); + eaTradeHandler.SetAlertMailAlerts(eAMailAlerts); + eaTradeHandler.SetAlertPushAlerts(eAPushAlerts); + eaTradeHandler.SetAlertTerminalAlerts(eATerminalAlerts); + + // + // Configure Trade Management ... + eaTradeHandler.AllowLong(eaAllowLong); + eaTradeHandler.AllowShort(eaAllowShort); + eaTradeHandler.MaxAllowedLongs(eaMaxAllowedLongs); + eaTradeHandler.MaxAllowedShorts(eaMaxAllowedShorts); + eaTradeHandler.UseMaxAllowedTradesPerSymbol(eaUseMaxAllowedTradesPerSymbol); + eaTradeHandler.MaxDrawdownPercentForOpenTrades(eaMaxDrawdownPercentForOpenTrades); + + // + // Configure Hedging ... + eaTradeHandler.AllowHedging(eaAllowHedging); + eaTradeHandler.HedgeVolumeFactor(eaHedgeVolumeFactor); + eaTradeHandler.MinTradesForHedge(eaMinTradesForHedge); + eaTradeHandler.HedgeMinProfitPerVolumeFactor(eaMinimumProfitPerVolumeForHedging); + + // + // Configure Trailing ... + eaTradeHandler.AllowTrailStops(eaAllowTrailStop); + eaTradeHandler.TrailBasedOnProfit(true); + eaTradeHandler.TrailStartInPoint(eaStartTrailInPoint); + eaTradeHandler.TrailStepInPoint(eaTrailStepInPoint); + eaTradeHandler.IgnoreTPOnTrail(eaIgnoreTPAfterTrail); + + // + // Configure Recovery ... + eaTradeHandler.AllowRecover(eaAllowRecovery); + eaTradeHandler.ForcePressuresInRecovery(false); + eaTradeHandler.RecoveryTPPoint(eaRecoveryTPPoint); + eaTradeHandler.RecoverySLPoint(eaRecoverySLPoint); + eaTradeHandler.MaxAllowedRecover(eaMaxAllowedRecoveryTrades); + eaTradeHandler.RecoveryVolumeMultiplier(eaRecoveryVolumeMultiplier); + eaTradeHandler.MaxAllowedRecoveryVolume(eaMaxAllowedRecoveryTradesVolume); + + // + // Single Symbol ... + if (!eaMultiSymbol) + { + // + // Create Class Instance ... + XSCXCHCHEStrategy *xchcheStrategy; + xchcheStrategy = new XSCXCHCHEStrategy( + _Symbol, + _Period, + PERIOD_H1, // Analyzing Period + eaVolume, + eaR2R, // R2R ... + eaSlippage, + eaMagicNumber, + true, // Ignore Signal Execution + eaUseFixedTPSLPoints, // Use TP SL Point + false, // Use Max + eaTPPoint, // TP + eaSLPoint, // SL + eaIgnoreTP, + eaIgnoreSL, + eaAllowLong, + eaAllowShort, + eaMaxAllowedLongs, // Max Longs + eaMaxAllowedShorts // Max Shorts + ); + + // + // Configuere Strategy ... + xchcheStrategy.DrawImportantAreas(false); + xchcheStrategy.AddXCHSignalEventHandler(OnSignalRecieved); + + // + // Configure Alerts ... + xchcheStrategy.SetAlertPrefix(mTag); + xchcheStrategy.SetAlertEnableAlerts(eAEnableAlerts); + xchcheStrategy.SetAlertLogAlerts(eALogAlerts); + xchcheStrategy.SetAlertMailAlerts(eAMailAlerts); + xchcheStrategy.SetAlertPushAlerts(eAPushAlerts); + xchcheStrategy.SetAlertTerminalAlerts(eATerminalAlerts); + + // + // Register Strategy ... + RegisterStrategy(xchcheStrategy); + } + // + // Multi Symbol ... + else + { + // + // Parse Symbols ... + string symbols[]; + int symbolsCount = SplitContent( + symbols, + eaSymbols // + ); + result = IsValidSize(symbolsCount); + if (!result) + { + return result; + } + + // + for (int i = 0; i < symbolsCount; i++) + { + // + // Select Symbol ... + string iSymbol = symbols[i]; + + // + // Create Class Instance ... + XSCXCHCHEStrategy *iStrategy; + iStrategy = new XSCXCHCHEStrategy( + iSymbol, + _Period, + PERIOD_H1, // Analyzing Period + eaVolume, + eaR2R, // R2R ... + eaSlippage, + eaMagicNumber, + true, // Ignore Signal Execution + eaUseFixedTPSLPoints, // Use TP SL Point + false, // Use Max + eaTPPoint, // TP + eaSLPoint, // SL + eaIgnoreTP, + eaIgnoreSL, + eaAllowLong, + eaAllowShort, + eaMaxAllowedLongs, // Max Longs + eaMaxAllowedShorts // Max Shorts + ); + + // + // Configuere Strategy ... + iStrategy.DrawImportantAreas(false); + iStrategy.AddXCHSignalEventHandler(OnSignalRecieved); + + // + // Configure Alerts ... + iStrategy.SetAlertPrefix(mTag); + iStrategy.SetAlertEnableAlerts(eAEnableAlerts); + iStrategy.SetAlertLogAlerts(eALogAlerts); + iStrategy.SetAlertMailAlerts(eAMailAlerts); + iStrategy.SetAlertPushAlerts(eAPushAlerts); + iStrategy.SetAlertTerminalAlerts(eATerminalAlerts); + + // + // Register Strategy ... + RegisterStrategy(iStrategy); + } + } + + // + return result; +} + +// +// Register Strategy ... +void RegisterStrategy(XSCBaseStrategy *strategy) +{ + // + if (strategy == NULL) + { + return; + } + + // + ArrayResize( + strategies, + ArraySize(strategies) + 1 // + ); + + // + strategies[ArraySize(strategies) - 1] = strategy; +} + +// +// Call All Registered Strategis Tick Handler Functions ... +void HandleStrategiesOnTick() +{ + // + int count = ArraySize(strategies); + if (!IsValidSize(count)) + { + return; + } + + // + for (int i = 0; i < count; i++) + { + // + // Call Tick Handler Function ... + strategies[i].HandleTick(); + } +} + +// +// Manage Trading States ... +void HandleTradeState() +{ + // + // Implement All Trade States here ... + eaTradeHandler.UpdateData(); + + // + // Do Protection Senarios ... + eaTradeHandler.HandleProtection(); +} + +// +// Time Reporting ... +void HandleTimeReport() +{ + // + // Monthly Report .... + if (eaAlertNewMonths && + eaTimeTracker.IsNewMonth()) + { + // + string msg = "New Month ..."; + + // + eaAlert.Alert(msg); + } + + // + // Weekly Report .... + if (eaAlertNewWeeks && + eaTimeTracker.IsNewWeek()) + { + // + string msg = "New Week ..."; + + // + eaAlert.Alert(msg); + } + + // + // Daily Report .... + if (eaAlertNewDays && + eaTimeTracker.IsNewDay()) + { + // + string msg = "New Day ..."; + + // + eaAlert.Alert(msg); + } + + // + // Hourly Report .... + if (eaAlertNewHours && + eaTimeTracker.IsNewHour()) + { + // + string msg = "New Hour ..."; + + // + eaAlert.Alert(msg); + } +} + +// +// SIGNAL EVENT Handlers ... +// + +// +// All Signals from Strategies Comming Here for Execution or +// Analyzing ... +void OnSignalRecieved( + XSignal &signal, + XCHStrategyConditions &conditions // +) +{ + // + // Check Signal and Conditions Validations ... + + // + if (!signal.IsValid()) + { + return; + } + + // + if (!conditions.IsValid()) + { + return; + } + + // + // Notify When a Raw (Unfiltered) Signal Recieved + // if it's Provided ... + if (eaAlertRawSignals) + { + // + string msg = "Raw " + (IsLong(signal.type) ? "Long" : "Short") + " Signal Recieved: (" + signal.provider + "," + signal.symbol + "," + ToString(signal.period) + ") ..."; + eaAlert.Alert(msg); + } + + // + // Prepare Signal Dynamic Volume + // if Provided ... + if (eaUseDynamicVolume && + eaDynamicVolumeStep > 0 && + eaDynamicVolumeBalanceFactor > 0) + { + // + double dVolume = eaTrader.GetDynamicVolume( + signal.symbol, + eaDynamicVolumeBalanceFactor, + eaDynamicVolumeStep // + ); + + // + if (dVolume > 0) + { + signal.volume = dVolume; + } + + // + eaTradeHandler.UpdateSignal(signal); + } + + // + // Since Signal Filtering done based on + // Strategy and it's not related to Public + // TradeHandler for Seperation of Concern issue, + // we do this here ... + XCHCHEStartegyConditionsParser parser; + bool isFiltered = parser.IsFiltered( + signal, + conditions // + ); + if (isFiltered) + { + // + eaTradeHandler.RemoveSignal(signal); + return; + } + + // // + // // Here we Can Increase Signal Volume if + // // it is not force Filtered ... + // bool isForceFiltered = parser.IsFiltered( + // signal, + // conditions, + // true // + // ); + // if (!isForceFiltered) + // { + // // + // // TODO: + // // Implement Strong Signals Conditions + // // Senarios ... + // forceSignalsCount++; + + // // + // // Alert Froce Strong Signals + // // if Provided ... + // if (eaAlertStrongSignals) + // { + // // + // string msg = "Foce Strong " + (IsLong(signal.type) ? "Long" : "Short") + " Signal Recieved: (" + signal.provider + "," + signal.symbol + "," + ToString(signal.period) + ") ..."; + // eaAlert.Alert(msg); + // } + // } + + // + // Attach Conditions Summary to Signal ... + string conditionsSummary = conditions.GenerateSummary( + false, + false, + true, + false // + ); + + // + signal.conditions = parser.GenerateSignalConditions( + signal, + conditions // + ); // conditionsSummary; + + // + // Execute Signal Using Trade Handler ... + ENUM_X_SIGNAL_EXECUTION_RESULT state; + bool isExecuted = eaTradeHandler.ExecuteSignal( + signal, + state // + ); +} + +// +// Handle StopLoss Triggered Positions ... +void OnStopLossTriggered(const XDeal &deal) +{ + // + // Finish ... + eaTradeHandler.Finish(deal); + + // + ReportBalance(); +} + +// +// Handle Take Profit Triggered Positions ... +void OnTakeProfitTriggered(const XDeal &deal) +{ + // + // Finish ... + eaTradeHandler.Finish(deal); + + // + ReportBalance(); +} + +// +// Handle Force Close a Position ... +void OnPositionForceClosed( + const ulong ticket, + const XPosition &position, + const string comment // +) +{ + // + // Finish ... + eaTradeHandler.Finish( + ticket, + position, + comment // + ); + + // + ReportBalance(); +} + +// +// Report Account Balance ... +void ReportBalance() +{ + // + if (!IsRunningOnTestMode()) + { + return; + } + + // + string msg = "Balance: " + ToString(eaTrader.mAccount.GetBalance()); + eaAlert.Log(msg); +} + +// \ No newline at end of file diff --git a/Documents/BKP/XCHCHE.Empty/x-saherelm.xch.che.strategy.mq5 b/Documents/BKP/XCHCHE.Empty/x-saherelm.xch.che.strategy.mq5 new file mode 100644 index 00000000..f4a8a670 --- /dev/null +++ b/Documents/BKP/XCHCHE.Empty/x-saherelm.xch.che.strategy.mq5 @@ -0,0 +1,926 @@ +/////////////////////////////////////////////////////// +// +// SaherElm IT Center MQL5 Class Library +// -------------------------------------- +// Name: XSCXCHCHEStrategy +// Description: provides all based classes for use ... +// +// +// Maintainer: +// ------------ +// Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com) +// +////////////////////////////////////////////////////// +// +// Global Properties ... +#property library +#property copyright "Copyright 2023, SaherElm IT Center" +#property link "https://www.saherelm.ir" +#property version "1.00" +#property strict + +// +// Imports ... +#include "./x-saherelm.xch.strategy.mq5" + +// +// Definitions ... + +// +// Specific Identifier(s) of XStrategy ... +string XCHCHEStartegyToken = "XCHCHE"; + +// +// XStrategy Class Implementation(s) ... +class XSCXCHCHEStrategy : public XSCBaseStrategy +{ + // + // Public ... +public: + // + // Constructor(s) ... + void XSCXCHCHEStrategy( + // + // Base ... + string _symbol, // Trading Symbol + ENUM_TIMEFRAMES _period, // Trading TimeFrame + ENUM_TIMEFRAMES _analizePeriod, // Important Area Detect Time Frame + double _volume, // Voluem + double _r2r, // Risk/Reward Ratio + int _slippage, // Trader Slippage + long _magicNumber, // Trader Magic Number + bool _ignoreSignalExecution = false, // Ignore Signal Execution + bool _useTPSLAsPoint = false, // Converts TP and SL by Provided Points + bool _forceMaxTPSLAsPoint = false, // Force Max TP and SL by Provided Points + double _tpPoint = 0, // TP As Point + double _slPoint = 0, // SL As Point + bool _ignoreTP = false, // TP set to 0 + bool _ignoreSL = false, // SL set to 0 + bool _allowLong = true, + bool _allowShort = true, + int _maxAllowedLongs = 0, + int _maxAllowedShorts = 0 // + ) : XSCBaseStrategy(_symbol, + _period, + _analizePeriod, + _volume, + _r2r, + _slippage, + _magicNumber, + _ignoreSignalExecution, + _useTPSLAsPoint, + _forceMaxTPSLAsPoint, + _tpPoint, + _slPoint, + _ignoreTP, + _ignoreSL, + _allowLong, + _allowShort, + _maxAllowedLongs, + _maxAllowedShorts // + ) + { + // + SetAlertPrefix(GetTag()); + + // + PrepareRequirements(); + } + + // + // Deconstructor ... + void ~XSCXCHCHEStrategy() + { + // + delete pvHelper; + + // + delete chmHelper; + delete chhkHelper; + delete chstrHelper; + delete chcheHelper; + } + + // + // Getter / Setter (s) ... + + // + // Event Handlers ... + + // + // On Signal Handlers ... + void AddXCHSignalEventHandler(TOnXCHSignal handler) + { + // + Add( + handler, + mOnXCHSignalEventHandlers // + ); + } + + // + // Overrides ... + + // + // Customize Strategy Identifier ... + string GetTag() override + { + return XCHCHEStartegyToken; + } + + // + // Check Conditions For Signal ... + bool HasSignal( + XSignal &signal // + ) override + { + // + bool result = false; + + // + signal.Clean(); + + // + double sl = 0; + double tp = 0; + double risk = 0; + double entry = 0; + double reward = 0; + double r2r = R2R(); + ENUM_POSITION_TYPE type = POSITION_TYPE_BUY; + ENUM_X_ORDER_MODES mode = X_ORDER_MODE_MARKET; + + // + bool hasLong = false; + bool hasShort = false; + + // + // Retrieve Conditions ... + + // + // XPV ... + XPVConditions pvConditions; + result = pvHelper.GetConditions(pvConditions); + if (!result) + { + return result; + } + + // + // XCHM ... + XCHMConditions chmConditions; + result = chmHelper.GetConditions(chmConditions); + if (!result) + { + return result; + } + + // + // XCHHK ... + XCHHKConditions chhkConditions; + result = chhkHelper.GetConditions(chhkConditions); + if (!result) + { + return result; + } + + // + // XCHTD ... + XCHTDConditions chtdConditions; + result = chtdHelper.GetConditions(chtdConditions); + if (!result) + { + return result; + } + + // + // XCHSTR ... + XCHSTRConditions chstrConditions; + result = chstrHelper.GetConditions(chstrConditions); + if (!result) + { + return result; + } + + // + // XCHCHE ... + XCHCHEConditions chcheConditions; + result = chcheHelper.GetConditions(chcheConditions); + if (!result) + { + return result; + } + + // + // XCHVLM ... + XCHVLMConditions chvlmConditions; + result = chvlmHelper.GetConditions(chvlmConditions); + if (!result) + { + return result; + } + + // + // XCHICH ... + XCHICHConditions chichConditions; + result = chichHelper.GetConditions(chichConditions); + if (!result) + { + return result; + } + + // + // XCHVWAP ... + XCHVWAPConditions chvwapConditions; + result = chvwapHelper.GetConditions(chvwapConditions); + if (!result) + { + return result; + } + + // + // Start Calculations ... + + // + double points = GetPoints(mSymbol); + + // + int zIndex = 0; + int cIndex = zIndex + 1; + int pIndex = cIndex + 1; + int ppIndex = pIndex + 1; + + // + // Retrieve Bars ... + + // + // Last Bar ... + XOHCL cBar; + result = cBar.Init( + mSymbol, + mPeriod, + cIndex // + ); + if (!result) + { + return result; + } + + // + // Prepare Conditions ... + + // + XCHStrategyConditions conditions; + + // + conditions.symbol = mSymbol; + conditions.period = mPeriod; + conditions.time = cBar.time; + + // + conditions.pvConditions = pvConditions; + conditions.chmConditions = chmConditions; + conditions.chhkConditions = chhkConditions; + conditions.chtdConditions = chtdConditions; + conditions.chstrConditions = chstrConditions; + conditions.chcheConditions = chcheConditions; + conditions.chvlmConditions = chvlmConditions; + conditions.chichConditions = chichConditions; + conditions.chvwapConditions = chvwapConditions; + + // + result = conditions.IsValid(); + if (!result) + { + return result; + } + + // + // Previous Bar of Last Bar ... + XOHCL pBar; + result = cBar.GetPreviousBar(pBar); + if (!result) + { + return result; + } + + // + // Last Swing Low Bar ... + XOHCL lastSwingLow; + result = cBar.FindLastSwingLow(lastSwingLow); + if (!result) + { + return result; + } + + // + // Last Swing High Bar ... + XOHCL lastSwingHigh; + result = cBar.FindLastSwingHigh(lastSwingHigh); + if (!result) + { + return result; + } + + // + int pushers = 0; + string signallers[]; + + // + // Common Conditions For Bullish and Bearish Powers ... + + // + bool notHaveBearishPower = (!chmConditions.hasBearishPower && + !chhkConditions.hasBearishPower && + !chtdConditions.hasBearishPower && + !chcheConditions.hasBearishPower && + !chstrConditions.hasBearishPower && + !chvlmConditions.hasBearishPower && + !chvwapConditions.hasBearishPower); + + // + bool notHaveBullishPower = (!chmConditions.hasBullishPower && + !chhkConditions.hasBullishPower && + !chtdConditions.hasBullishPower && + !chcheConditions.hasBullishPower && + !chstrConditions.hasBullishPower && + !chvlmConditions.hasBullishPower && + !chvwapConditions.hasBullishPower); + + // + // Detecting Signals ... + + // + result = hasLong || hasShort; + if (!result) + { + // + CheckImportantAreasValidation(); + + // + return result; + } + + // + DestroyImportantAreas(); + + // + // Retrieve Entry Price based on Position Type ... + entry = GetEntry(mSymbol, type); + + // + // Calculate TP and SL ... + // based on Strategy ... + // only when on of TP or SL Provides, using provided R2R ... + if ((tp <= 0 && sl > 0) || (tp > 0 && sl <= 0)) + { + // + CalculateTPSLByPrice( + sl, + tp, + type, + entry, + r2r // + ); + } + + // + // Prepare Signal ... + result = signal.Prepare( + mSymbol, + signallers[0], + mPeriod, + type, + mode, + entry, + mVolume, + sl, + tp // + ); + if (!result) + { + return result; + } + + // + signal.pushers = pushers; + + // + // Prepare and Normalize Signal for Execution in Strategy ... + result = PrepareSignal(signal); + if (!result) + { + return result; + } + + // + // Notify XCH Specified Signal Event Handlers ... + NotifyOnXCHSignalEventHandlers( + signal, + conditions // + ); + + // + // Since we Ignore Signal Execution in this Strategy ... + // Make it the result false here for Preventing Double Execution ... + result = false; + + // + return result; + } + + // + // Protected ... +protected: + // + // Props ... + + // + // XPV ... + XPVInputs pvInputs; + XSCXPVHelper *pvHelper; + + // + // XCHMA ... + XCHMInputs chmInputs; + XSCXCHMHelper *chmHelper; + + // + // XCHHK ... + XCHHKInputs chhkInputs; + XSCXCHHKHelper *chhkHelper; + + // + // XCHTD ... + XCHTDInputs chtdInputs; + XSCXCHTDHelper *chtdHelper; + + // + // XSTR ... + XCHSTRInputs chstrInputs; + XSCXCHSTRHelper *chstrHelper; + + // + // XCHCHE ... + XCHCHEInputs chcheInputs; + XSCXCHCHEHelper *chcheHelper; + + // + // XCHVLM ... + XCHVLMInputs chvlmInputs; + XSCXCHVLMHelper *chvlmHelper; + + // + // XCHICH ... + XCHICHInputs chichInputs; + XSCXCHICHHelper *chichHelper; + + // + // XCHVWAP ... + XCHVWAPInputs chvwapInputs; + XSCXCHVWAPHelper *chvwapHelper; + + // + + // + // Private ... +private: + // + // Props ... + + // + // On XCH Signal Recieved Event Handler(s) ... + TOnXCHSignal mOnXCHSignalEventHandlers[]; + + // + // Notified Signal Event Handler(s) ... + void NotifyOnXCHSignalEventHandlers( + XSignal &signal, + XCHStrategyConditions &conditions // + ) + { + // + if (!signal.IsValid() || !conditions.IsValid()) + { + return; + } + + // + int count = ArraySize(mOnXCHSignalEventHandlers); + if (!IsValidSize(count)) + { + return; + } + + // + for (int i = 0; i < count; i++) + { + // + mOnXCHSignalEventHandlers[i]( + signal, + conditions // + ); + } + } + + // + // Install all Helpers and Prepare all + // Configurations for required Indicators ... + void PrepareRequirements() + { + // + support.Clean(); + supportTime = NULL; + isSupportTested = false; + + // + resistance.Clean(); + resistanceTime = NULL; + isResistanceTested = false; + + // + // Short ... + ENUM_X_PERIOD_METHOD scMethod = X_PERIOD_AUTO; // X_PERIOD_MANUALLY; // How to Find Period + ENUM_TIMEFRAMES scPeriod = NULL; // PERIOD_M20; // Time Period + + // + // Medium ... + ENUM_X_PERIOD_METHOD mcMethod = X_PERIOD_AUTO; // X_PERIOD_MANUALLY; // How to Find Period + ENUM_TIMEFRAMES mcPeriod = NULL; // PERIOD_M30; // Time Period + + // + // Long ... + ENUM_X_PERIOD_METHOD lcMethod = X_PERIOD_AUTO; // X_PERIOD_MANUALLY; // How to Find Period + ENUM_TIMEFRAMES lcPeriod = NULL; // PERIOD_H1; // Time Period + + // + // Hind ... + ENUM_X_PERIOD_METHOD hcMethod = X_PERIOD_AUTO; // X_PERIOD_MANUALLY; // How to Find Period + ENUM_TIMEFRAMES hcPeriod = NULL; // PERIOD_H2; // Time Period + + // + // XPV ... + + // + pvInputs.Default(); + + // + pvInputs.scMethod = scMethod; + pvInputs.scPeriod = scPeriod; + pvInputs.mcMethod = mcMethod; + pvInputs.mcPeriod = mcPeriod; + pvInputs.lcMethod = lcMethod; + pvInputs.lcPeriod = lcPeriod; + pvInputs.hcMethod = hcMethod; + pvInputs.hcPeriod = hcPeriod; + + // + pvInputs.showPeaksAndVales = false; + pvInputs.showLevels = false; + pvInputs.showConsolidations = false; + pvInputs.showFibo1Levels = false; + pvInputs.showFibo2Levels = false; + pvInputs.showFibo3Levels = false; + pvInputs.showFibo4Levels = false; + pvInputs.showFibo5Levels = false; + + // + pvHelper = new XSCXPVHelper(); + pvHelper.Init( + mSymbol, + mPeriod, + pvInputs // + ); + + // + // XCHM ... + + // + chmInputs.Default(); + + // + chmInputs.scMethod = scMethod; + chmInputs.scPeriod = scPeriod; + chmInputs.mcMethod = mcMethod; + chmInputs.mcPeriod = mcPeriod; + chmInputs.lcMethod = lcMethod; + chmInputs.lcPeriod = lcPeriod; + chmInputs.hcMethod = hcMethod; + chmInputs.hcPeriod = hcPeriod; + + // + chmInputs.showFast = false; + chmInputs.showSlow = false; + + // + chmInputs.showAVG = false; + + // + chmInputs.showCurrent = false; + chmInputs.showShort = false; + chmInputs.showMedium = false; + chmInputs.showLong = false; + chmInputs.showHind = false; + + // + chmHelper = new XSCXCHMHelper(); + chmHelper.Init( + mSymbol, + mPeriod, + chmInputs // + ); + + // + // XCHHK ... + + // + chhkInputs.Default(); + + // + chhkInputs.scMethod = scMethod; + chhkInputs.scPeriod = scPeriod; + chhkInputs.mcMethod = mcMethod; + chhkInputs.mcPeriod = mcPeriod; + chhkInputs.lcMethod = lcMethod; + chhkInputs.lcPeriod = lcPeriod; + chhkInputs.hcMethod = hcMethod; + chhkInputs.hcPeriod = hcPeriod; + + // + chhkInputs.ignoreShadows = true; + + // + chhkInputs.showCurrent = false; + chhkInputs.showShort = false; + chhkInputs.showMedium = false; + chhkInputs.showLong = false; + chhkInputs.showHind = false; + + // + chhkHelper = new XSCXCHHKHelper(); + chhkHelper.Init( + mSymbol, + mPeriod, + chhkInputs // + ); + + // + // XCHTD ... + + // + chtdInputs.Default(); + + // + chtdInputs.scMethod = scMethod; + chtdInputs.scPeriod = scPeriod; + chtdInputs.mcMethod = mcMethod; + chtdInputs.mcPeriod = mcPeriod; + chtdInputs.lcMethod = lcMethod; + chtdInputs.lcPeriod = lcPeriod; + chtdInputs.hcMethod = hcMethod; + chtdInputs.hcPeriod = hcPeriod; + + // + chtdInputs.showCurrent = false; + chtdInputs.showShort = false; + chtdInputs.showMedium = false; + chtdInputs.showLong = false; + chtdInputs.showHind = false; + + // + chtdHelper = new XSCXCHTDHelper(); + chtdHelper.Init( + mSymbol, + mPeriod, + chtdInputs // + ); + + // + // XCHSTR ... + + // + chstrInputs.Default(); + + // + chstrInputs.scMethod = scMethod; + chstrInputs.scPeriod = scPeriod; + chstrInputs.mcMethod = mcMethod; + chstrInputs.mcPeriod = mcPeriod; + chstrInputs.lcMethod = lcMethod; + chstrInputs.lcPeriod = lcPeriod; + chstrInputs.hcMethod = hcMethod; + chstrInputs.hcPeriod = hcPeriod; + + // + chstrInputs.showCurrent = false; + chstrInputs.showShort = false; + chstrInputs.showMedium = false; + chstrInputs.showLong = false; + chstrInputs.showHind = false; + + // + chstrHelper = new XSCXCHSTRHelper(); + chstrHelper.Init( + mSymbol, + mPeriod, + chstrInputs // + ); + + // + // XCHCHE ... + + // + chcheInputs.Default(); + + // + chcheInputs.scMethod = scMethod; + chcheInputs.scPeriod = scPeriod; + chcheInputs.mcMethod = mcMethod; + chcheInputs.mcPeriod = mcPeriod; + chcheInputs.lcMethod = lcMethod; + chcheInputs.lcPeriod = lcPeriod; + chcheInputs.hcMethod = hcMethod; + chcheInputs.hcPeriod = hcPeriod; + + // + chcheInputs.showLE1 = false; + chcheInputs.showLE2 = false; + chcheInputs.showSE1 = false; + chcheInputs.showSE2 = false; + + // + chcheInputs.showCurrent = false; + chcheInputs.showShort = false; + chcheInputs.showMedium = false; + chcheInputs.showLong = false; + chcheInputs.showHind = false; + + // + chcheHelper = new XSCXCHCHEHelper(); + chcheHelper.Init( + mSymbol, + mPeriod, + chcheInputs // + ); + + // + // XCHVLM ... + + // + chvlmInputs.Default(); + + // + chvlmInputs.scMethod = scMethod; + chvlmInputs.scPeriod = scPeriod; + chvlmInputs.mcMethod = mcMethod; + chvlmInputs.mcPeriod = mcPeriod; + chvlmInputs.lcMethod = lcMethod; + chvlmInputs.lcPeriod = lcPeriod; + chvlmInputs.hcMethod = hcMethod; + chvlmInputs.hcPeriod = hcPeriod; + + // + chvlmInputs.showCurrent = true; + chvlmInputs.showShort = true; + chvlmInputs.showMedium = true; + chvlmInputs.showLong = true; + chvlmInputs.showHind = true; + + // + chvlmHelper = new XSCXCHVLMHelper(); + chvlmHelper.Init( + mSymbol, + mPeriod, + chvlmInputs // + ); + + // + // XCHICH ... + + // + chichInputs.Default(); + + // + chichInputs.scMethod = scMethod; + chichInputs.scPeriod = scPeriod; + chichInputs.mcMethod = mcMethod; + chichInputs.mcPeriod = mcPeriod; + chichInputs.lcMethod = lcMethod; + chichInputs.lcPeriod = lcPeriod; + chichInputs.hcMethod = hcMethod; + chichInputs.hcPeriod = hcPeriod; + + // + chichInputs.showTenkanSen = false; + chichInputs.showKijunSen = false; + chichInputs.showChikouSpan = false; + chichInputs.showSenkouSpanA = false; + chichInputs.showSenkouSpanB = false; + chichInputs.showKumo = false; + + // + chichInputs.showCurrent = false; + chichInputs.showShort = false; + chichInputs.showMedium = false; + chichInputs.showLong = false; + chichInputs.showHind = false; + + // + chichHelper = new XSCXCHICHHelper(); + chichHelper.Init( + mSymbol, + mPeriod, + chichInputs // + ); + + // + // XCHVWAP ... + + // + chvwapInputs.Default(); + + // + chvwapInputs.scMethod = scMethod; + chvwapInputs.scPeriod = scPeriod; + chvwapInputs.mcMethod = mcMethod; + chvwapInputs.mcPeriod = mcPeriod; + chvwapInputs.lcMethod = lcMethod; + chvwapInputs.lcPeriod = lcPeriod; + chvwapInputs.hcMethod = hcMethod; + chvwapInputs.hcPeriod = hcPeriod; + + // + chvwapInputs.showShort = false; + chvwapInputs.showMedium = false; + chvwapInputs.showLong = false; + chvwapInputs.showHind = false; + + // + chvwapHelper = new XSCXCHVWAPHelper(); + chvwapHelper.Init( + mSymbol, + mPeriod, + chvwapInputs // + ); + + // + } + + // + void FillConditionsImportantAreas(XCHStrategyConditions &conditions) + { + // + if (!conditions.IsValid()) + { + return; + } + + // + conditions.support = support; + conditions.resistance = resistance; + conditions.bullishOB = bullishOB; + conditions.bearishOB = bearishOB; + conditions.bullishFVG = bullishFVG; + conditions.bearishFVG = bearishFVG; + conditions.bullishTrend = bullishTrend; + conditions.bearishTrend = bearishTrend; + + // + conditions.bullishFVGUpper = bullishFVGUpper; + conditions.bullishFVGLower = bullishFVGLower; + conditions.bearishFVGUpper = bearishFVGUpper; + conditions.bearishFVGLower = bearishFVGLower; + + // + Copy( + bullishTrendSwingHighs, + conditions.bullishTrendSwingHighs, + true // + ); + + // + Copy( + bullishTrendSwingLows, + conditions.bullishTrendSwingLows, + true // + ); + + // + Copy( + bearishTrendSwingHighs, + conditions.bearishTrendSwingHighs, + true // + ); + + // + Copy( + bearishTrendSwingLows, + conditions.bearishTrendSwingLows, + true // + ); + } + + // +}; + +// \ No newline at end of file diff --git a/Experts/x-saherelm.xch.che.strategy.ea.mq5 b/Experts/x-saherelm.xch.che.strategy.ea.mq5 new file mode 100644 index 00000000..4e184f6a --- /dev/null +++ b/Experts/x-saherelm.xch.che.strategy.ea.mq5 @@ -0,0 +1,966 @@ +/////////////////////////////////////////////////////// +// +// SaherElm IT Center XTest MQL5 Expert Advisor +// ------------------------------------------------- +// Name: XCHCHEEA +// Description: an Exper Advisor which used XCHSetup +// to Analyse Market ... +// +// Maintainer: +// ------------ +// Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com) +// +//////////////////////////////////////////////////////x +// +// Global Properties ... +#property copyright "Copyright 2023, SaherElm IT Center" +#property link "https://saherelm.ir" +#property version "1.00" +#property description "SaherElm XCHCHEEA" +#property strict + +// +#define ShortName "XCHCHEEA" + +// +// Imports ... +#include "../Helpers/x-saherelm.xct.helper.mq5" +#include "../Helpers/x-saherelm.xcc.helper.mq5" + +// +#include "../Parsers/x-saherelm.xch.che.parser.mq5" +#include "../Strategies/x-saherelm.xch.che.strategy.mq5" + +// +// Inputs ... + +// +// Common ... +input group "Common"; +input long eaMagicNumber = 78692110; // Magic Number +input int eaSlippage = 10; // Slippgae +input string eaLogSuffix = ""; // Log Suffix + +// +// Symbols ... +input group "Symbols"; +input bool eaMultiSymbol = false; // Use Multi Symbol +input bool eaUseMaxAllowedTradesPerSymbol = true; // Use Max Allowed Trades Per Symbol +input string eaSymbols = "EURUSDb,GBPUSDb,EURGBPb,USDJPYb,EURJPYb,USDCHFb,EURCHFb,AUDUSDb,NZDUSDb,USDCADb,EURCADb,XAUUSDb,DowJones30"; // Trading Symbols + +// +// Risk Management ... +input group "Risk Management"; + +// +// Risk Management > Risk / Reward Calculation ... +input group "Risk/Reward"; +input double eaR2R = 1.5; // Risk to Reward Ratio for Dynamic TP SL +input bool eaUseFixedTPSLPoints = false; // Use Fixed TP SL in Points +input bool eaIgnoreTP = false; // Ignore TP +input bool eaIgnoreSL = false; // Ignore SL +input double eaTPPoint = 200; // Static TP Point +input double eaSLPoint = 200; // Static SL Point + +// +// Risk Management > Volume Calculation ... +input group "Volume"; +input bool eaUseDynamicVolume = false; // Use Dynamic Volume +input double eaDynamicVolumeStep = 0.01; // Increase Volume Step +input double eaDynamicVolumeBalanceFactor = 200; // Balance Factor for Generate Dynamic Volume +input double eaVolume = 0.2; // Static Volume + +// +// Risk Management > Trade Management ... +input group "Trade Management"; +input bool eaAllowLong = true; // Allow Long Positions +input bool eaAllowShort = true; // Allow Short Positions +input int eaMaxAllowedLongs = 2; // Max Allowed Long Positions +input int eaMaxAllowedShorts = 2; // Max Allowed Short Positions +input double eaMaxDrawdownPercentForOpenTrades = 3; // Max Drawdown Percent for Open Trades + +// +// Risk Management > Hedging ... +input group "Hedging"; +input bool eaAllowHedging = true; // Allow Hedging Trades +input int eaMinTradesForHedge = 2; // Minimum Open Trades for Hedging +input double eaHedgeVolumeFactor = 0.01; // Volume Factor for Hedging +input double eaMinimumProfitPerVolumeForHedging = 0.5; // Minimum Required Profit per Volume for Hedging + +// +// Risk Management > Trailling Stop ... +input group "Trailling Stop"; +input bool eaAllowTrailStop = true; // Allow Trail Stop +input double eaStartTrailInPoint = 50; // Trail Start After Profit (Point) +input double eaTrailStepInPoint = 25; // Trail Size in each Step (Point) +input bool eaIgnoreTPAfterTrail = true; // Ignore TP after Trail + +// +// Risk Management > Trades Recovery ... +input group "Trades Recovery"; +input bool eaAllowRecovery = false; // Allow Recover Trades +input double eaRecoveryTPPoint = 150; // Recovery TP (Point) +input double eaRecoverySLPoint = 200; // Recovery SL (Point) +input int eaMaxAllowedRecoveryTrades = 0; // Max Allowed Recovery Trades +input double eaRecoveryVolumeMultiplier = 2; // Recovery Volume Multiplier +input double eaMaxAllowedRecoveryTradesVolume = 0.1; // Max Allowed Recovery Volume + +// +// Alert ... +input group "Alert"; +input bool eAEnableAlerts = true; // Enable Alerts +input bool eALogAlerts = true; // Log Alerts +input bool eAMailAlerts = false; // Mail Alerts +input bool eAPushAlerts = false; // Push Alerts +input bool eATerminalAlerts = false; // Terminal Alerts + +// +// Time Report ... +input group "Reports"; +input bool eaAlertNewMonths = false; // Alert New Month +input bool eaAlertNewWeeks = false; // Alert New Weeks +input bool eaAlertNewDays = true; // Alert New Days +input bool eaAlertNewHours = false; // Alert New Hours +input bool eaAlertRawSignals = false; // Alert Raw Signals +input bool eaAlertStrongSignals = false; // Alert Strong Signals + +// +// Variables ... + +// +// Bar Style nad Time Instances ... +XSCXCTHelper *mCTHelper; +XSCXCCHelper *mCCHelper; + +// +// Registred Strategies ... +XSCBaseStrategy *strategies[]; + +// +// Trader Instance Class ... +XSCTrade *eaTrader; + +// +// Alert Class ... +XSCAlert *eaAlert; + +// +// Time Tracker ... +XTimeTracker eaTimeTracker; + +// +// Trade Handler Instance Class ... +XSCXTradeHandler *eaTradeHandler; + +// +string mTag = ""; + +// +int forceSignalsCount = 0; + +// +// Event Handlers ... + +// +// Initialization ... +int OnInit() +{ + // + if (!ValidateInputs()) + { + return INIT_PARAMETERS_INCORRECT; + } + + // + if (!InitialEA()) + { + return INIT_FAILED; + } + + // + mTag = + !IsValid(eaLogSuffix) + ? ShortName + : ShortName + "_" + eaLogSuffix; + + // + drawPrefix = mTag; + + // + // EventSetTimer(1); + // EventSetMillisecondTimer(100); + + // + // Alert Initialization ... + string msg = "Initialized Successfully ..."; + eaAlert.Alert(msg); + + // + // Init Succeed ... + return INIT_SUCCEEDED; +} + +// +// DeInitialization ... +void OnDeinit(const int reason) +{ + // + // REASON_PROGRAM 0 The EA has stopped working calling the ExpertRemove() function + // REASON_REMOVE 1 Program removed from a chart + // REASON_RECOMPILE 2 Program recompiled + // REASON_CHARTCHANGE 3 A symbol or a chart period is changed + // REASON_CHARTCLOSE 4 Chart closed + // REASON_PARAMETERS 5 Inputs changed by a user + // REASON_ACCOUNT 6 Another account has been activated or reconnection to the trade server has occurred due to changes in the account settings + // REASON_TEMPLATE 7 Another chart template applied + // REASON_INITFAILED 8 The OnInit() handler returned a non-zero value + // REASON_CLOSE 9 Terminal closed + + // + string msg = "MaxSameTimeTrades: " + ToString(eaTradeHandler.MaxSameTimeTrades()) + "\n" + + "ForceSignalsCount: " + ToString(forceSignalsCount); + eaAlert.Alert(msg); + + // + // Alert De Initialization Succeeded ... + msg = "De Initialized Successfully ..."; + eaAlert.Alert(msg); + + // + // De Initialize XSampleEA Providers ... + delete mCTHelper; + delete mCCHelper; + + // + delete eaAlert; + delete eaTrader; + delete eaTradeHandler; + + // + // EventKillTimer(); + + // + Clean(strategies); +} + +// +// On Tick Handler ... +void OnTick() +{ + // + HandleTradeState(); + HandleTimeReport(); + HandleStrategiesOnTick(); +} + +// +// Handle On Trade Event ... +void OnTrade() +{ + eaTrader.HandleOnTrade(); +} + +// +// On Timer ... +void OnTimer() +{ + // + // HandleTradeState(); + // HandleTimeReport(); + // HandleStrategiesOnTick(); +} + +// +// Custom Functions ... + +// +// Validate Inputs ... +bool ValidateInputs() +{ + // + bool result = false; + + // + string errMessage = ""; + + // + bool isCommonValid = ( + // + eaSlippage > 0 && + eaMagicNumber > 0 + // + ); + if (!isCommonValid) + { + // + errMessage += "common configurations error;" + "\n"; + } + + // + bool isSymbolsValid = ( + // + eaMultiSymbol + ? IsValid(eaSymbols) + : true + // + ); + if (!isSymbolsValid) + { + // + errMessage += "symbols configurations error;" + "\n"; + } + + // + bool isRiskRewardValid = ( + // + (eaUseFixedTPSLPoints + ? eaTPPoint > 0 || + eaSLPoint > 0 + : eaR2R > 0) && + !(eaIgnoreTP && + eaIgnoreSL) + // + ); + if (!isRiskRewardValid) + { + // + errMessage += "risk/reward configurations error;" + "\n"; + } + + // + bool isVolumeValid = ( + // + eaUseDynamicVolume + ? eaDynamicVolumeStep >= 0.01 && + eaDynamicVolumeBalanceFactor > 0 + : eaVolume >= 0.01 + // + ); + if (!isVolumeValid) + { + // + errMessage += "volume configurations error;" + "\n"; + } + + // + bool isTradeManagementValid = ( + // + !(!eaAllowLong && !eaAllowShort) && + eaMaxAllowedLongs >= 0 && + eaMaxAllowedShorts >= 0 + // + ); + if (!isTradeManagementValid) + { + // + errMessage += "trade management configurations error;" + "\n"; + } + + // + bool isHedgingValid = ( + // + eaAllowHedging + ? eaMinTradesForHedge >= 1 && + eaHedgeVolumeFactor >= 0.01 && + eaMinimumProfitPerVolumeForHedging >= 0 + : true + // + ); + if (!isHedgingValid) + { + // + errMessage += "hedging configurations error;" + "\n"; + } + + // + bool isTraillingValid = ( + // + eaAllowTrailStop + ? eaStartTrailInPoint > 0 && + eaTrailStepInPoint > 0 + : true + // + ); + if (!isTraillingValid) + { + // + errMessage += "trailling configurations error;" + "\n"; + } + + // + bool isRecoveryValid = ( + // + eaAllowRecovery + ? eaRecoveryTPPoint > 0 && + eaRecoverySLPoint > 0 && + eaMaxAllowedRecoveryTrades >= 0 && + eaRecoveryVolumeMultiplier > 0 && + eaMaxAllowedRecoveryTradesVolume >= 0 + : true + // + ); + if (!isRecoveryValid) + { + // + errMessage += "recovery configurations error;" + "\n"; + } + + // + result = + // + // Common ... + isCommonValid && + // + // Symbols ... + isSymbolsValid && + // + // Risk/Reward ... + isRiskRewardValid && + // + // Volume ... + isVolumeValid && + // + // Trade Management ... + isTradeManagementValid && + // + // Hedging ... + isHedgingValid && + // + // Trailling ... + isTraillingValid && + // + // Recovery ... + isRecoveryValid + // + ; + + // + if (!result) + { + Print("Errors: \n", errMessage); + } + + // + return result; +} + +// +// Initialize all Requirements ... +bool InitialEA() +{ + // + bool result = false; + + // + // Bar Timer ... + XCTInputs ctInputs; + ctInputs.Default(); + mCTHelper = new XSCXCTHelper(); + result = mCTHelper.Init( + _Symbol, + _Period, + ctInputs // + ); + if (!result) + { + return result; + } + + // + // Bar Styles ... + XCCInputs ccInputs; + ccInputs.Default(); + mCCHelper = new XSCXCCHelper(); + result = mCCHelper.Init( + _Symbol, + _Period, + ccInputs // + ); + if (!result) + { + return result; + } + + // + // Create Instance of Alert Class ... + eaAlert = new XSCAlert(); + eaAlert.SetPrefix(mTag); + eaAlert.SetLogAlerts(eALogAlerts); + eaAlert.SetMailAlerts(eAMailAlerts); + eaAlert.SetPushAlerts(eAPushAlerts); + eaAlert.SetEnableAlerts(eAEnableAlerts); + eaAlert.SetTerminalAlerts(eATerminalAlerts); + + // + // Create Trader Instance ... + eaTrader = new XSCTrade( + eaSlippage, + eaMagicNumber // + ); + eaTrader.AddOnStopLossEventHandler(OnStopLossTriggered); + eaTrader.AddOnTakeProfitEventHandler(OnTakeProfitTriggered); + eaTrader.AddOnForceClosePositionEventHandler(OnPositionForceClosed); + + // + // Initialize Trade Handler ... + eaTradeHandler = new XSCXTradeHandler(eaTrader); + eaTradeHandler.SaveTrades(true); + eaTradeHandler.SaveSignals(true); + eaTradeHandler.SaveConditions(true); + + // + // Configure Alerts ... + eaTradeHandler.SetAlertPrefix(mTag); + eaTradeHandler.SetAlertEnableAlerts(eAEnableAlerts); + eaTradeHandler.SetAlertLogAlerts(eALogAlerts); + eaTradeHandler.SetAlertMailAlerts(eAMailAlerts); + eaTradeHandler.SetAlertPushAlerts(eAPushAlerts); + eaTradeHandler.SetAlertTerminalAlerts(eATerminalAlerts); + + // + // Configure Trade Management ... + eaTradeHandler.AllowLong(eaAllowLong); + eaTradeHandler.AllowShort(eaAllowShort); + eaTradeHandler.MaxAllowedLongs(eaMaxAllowedLongs); + eaTradeHandler.MaxAllowedShorts(eaMaxAllowedShorts); + eaTradeHandler.UseMaxAllowedTradesPerSymbol(eaUseMaxAllowedTradesPerSymbol); + eaTradeHandler.MaxDrawdownPercentForOpenTrades(eaMaxDrawdownPercentForOpenTrades); + + // + // Configure Hedging ... + eaTradeHandler.AllowHedging(eaAllowHedging); + eaTradeHandler.HedgeVolumeFactor(eaHedgeVolumeFactor); + eaTradeHandler.MinTradesForHedge(eaMinTradesForHedge); + eaTradeHandler.HedgeMinProfitPerVolumeFactor(eaMinimumProfitPerVolumeForHedging); + + // + // Configure Trailing ... + eaTradeHandler.AllowTrailStops(eaAllowTrailStop); + eaTradeHandler.TrailBasedOnProfit(true); + eaTradeHandler.TrailStartInPoint(eaStartTrailInPoint); + eaTradeHandler.TrailStepInPoint(eaTrailStepInPoint); + eaTradeHandler.IgnoreTPOnTrail(eaIgnoreTPAfterTrail); + + // + // Configure Recovery ... + eaTradeHandler.AllowRecover(eaAllowRecovery); + eaTradeHandler.ForcePressuresInRecovery(false); + eaTradeHandler.RecoveryTPPoint(eaRecoveryTPPoint); + eaTradeHandler.RecoverySLPoint(eaRecoverySLPoint); + eaTradeHandler.MaxAllowedRecover(eaMaxAllowedRecoveryTrades); + eaTradeHandler.RecoveryVolumeMultiplier(eaRecoveryVolumeMultiplier); + eaTradeHandler.MaxAllowedRecoveryVolume(eaMaxAllowedRecoveryTradesVolume); + + // + // Single Symbol ... + if (!eaMultiSymbol) + { + // + // Create Class Instance ... + XSCXCHCHEStrategy *xchcheStrategy; + xchcheStrategy = new XSCXCHCHEStrategy( + _Symbol, + _Period, + PERIOD_H1, // Analyzing Period + eaVolume, + eaR2R, // R2R ... + eaSlippage, + eaMagicNumber, + true, // Ignore Signal Execution + eaUseFixedTPSLPoints, // Use TP SL Point + false, // Use Max + eaTPPoint, // TP + eaSLPoint, // SL + eaIgnoreTP, + eaIgnoreSL, + eaAllowLong, + eaAllowShort, + eaMaxAllowedLongs, // Max Longs + eaMaxAllowedShorts // Max Shorts + ); + + // + // Configuere Strategy ... + xchcheStrategy.DrawImportantAreas(false); + xchcheStrategy.AddXCHSignalEventHandler(OnSignalRecieved); + + // + // Configure Alerts ... + xchcheStrategy.SetAlertPrefix(mTag); + xchcheStrategy.SetAlertEnableAlerts(eAEnableAlerts); + xchcheStrategy.SetAlertLogAlerts(eALogAlerts); + xchcheStrategy.SetAlertMailAlerts(eAMailAlerts); + xchcheStrategy.SetAlertPushAlerts(eAPushAlerts); + xchcheStrategy.SetAlertTerminalAlerts(eATerminalAlerts); + + // + // Register Strategy ... + RegisterStrategy(xchcheStrategy); + } + // + // Multi Symbol ... + else + { + // + // Parse Symbols ... + string symbols[]; + int symbolsCount = SplitContent( + symbols, + eaSymbols // + ); + result = IsValidSize(symbolsCount); + if (!result) + { + return result; + } + + // + for (int i = 0; i < symbolsCount; i++) + { + // + // Select Symbol ... + string iSymbol = symbols[i]; + + // + // Create Class Instance ... + XSCXCHCHEStrategy *iStrategy; + iStrategy = new XSCXCHCHEStrategy( + iSymbol, + _Period, + PERIOD_H1, // Analyzing Period + eaVolume, + eaR2R, // R2R ... + eaSlippage, + eaMagicNumber, + true, // Ignore Signal Execution + eaUseFixedTPSLPoints, // Use TP SL Point + false, // Use Max + eaTPPoint, // TP + eaSLPoint, // SL + eaIgnoreTP, + eaIgnoreSL, + eaAllowLong, + eaAllowShort, + eaMaxAllowedLongs, // Max Longs + eaMaxAllowedShorts // Max Shorts + ); + + // + // Configuere Strategy ... + iStrategy.DrawImportantAreas(false); + iStrategy.AddXCHSignalEventHandler(OnSignalRecieved); + + // + // Configure Alerts ... + iStrategy.SetAlertPrefix(mTag); + iStrategy.SetAlertEnableAlerts(eAEnableAlerts); + iStrategy.SetAlertLogAlerts(eALogAlerts); + iStrategy.SetAlertMailAlerts(eAMailAlerts); + iStrategy.SetAlertPushAlerts(eAPushAlerts); + iStrategy.SetAlertTerminalAlerts(eATerminalAlerts); + + // + // Register Strategy ... + RegisterStrategy(iStrategy); + } + } + + // + return result; +} + +// +// Register Strategy ... +void RegisterStrategy(XSCBaseStrategy *strategy) +{ + // + if (strategy == NULL) + { + return; + } + + // + ArrayResize( + strategies, + ArraySize(strategies) + 1 // + ); + + // + strategies[ArraySize(strategies) - 1] = strategy; +} + +// +// Call All Registered Strategis Tick Handler Functions ... +void HandleStrategiesOnTick() +{ + // + int count = ArraySize(strategies); + if (!IsValidSize(count)) + { + return; + } + + // + for (int i = 0; i < count; i++) + { + // + // Call Tick Handler Function ... + strategies[i].HandleTick(); + } +} + +// +// Manage Trading States ... +void HandleTradeState() +{ + // + // Implement All Trade States here ... + eaTradeHandler.UpdateData(); + + // + // Do Protection Senarios ... + eaTradeHandler.HandleProtection(); +} + +// +// Time Reporting ... +void HandleTimeReport() +{ + // + // Monthly Report .... + if (eaAlertNewMonths && + eaTimeTracker.IsNewMonth()) + { + // + string msg = "New Month ..."; + + // + eaAlert.Alert(msg); + } + + // + // Weekly Report .... + if (eaAlertNewWeeks && + eaTimeTracker.IsNewWeek()) + { + // + string msg = "New Week ..."; + + // + eaAlert.Alert(msg); + } + + // + // Daily Report .... + if (eaAlertNewDays && + eaTimeTracker.IsNewDay()) + { + // + string msg = "New Day ..."; + + // + eaAlert.Alert(msg); + } + + // + // Hourly Report .... + if (eaAlertNewHours && + eaTimeTracker.IsNewHour()) + { + // + string msg = "New Hour ..."; + + // + eaAlert.Alert(msg); + } +} + +// +// SIGNAL EVENT Handlers ... +// + +// +// All Signals from Strategies Comming Here for Execution or +// Analyzing ... +void OnSignalRecieved( + XSignal &signal, + XCHStrategyConditions &conditions // +) +{ + // + // Check Signal and Conditions Validations ... + + // + if (!signal.IsValid()) + { + return; + } + + // + if (!conditions.IsValid()) + { + return; + } + + // + // Notify When a Raw (Unfiltered) Signal Recieved + // if it's Provided ... + if (eaAlertRawSignals) + { + // + string msg = "Raw " + (IsLong(signal.type) ? "Long" : "Short") + " Signal Recieved: (" + signal.provider + "," + signal.symbol + "," + ToString(signal.period) + ") ..."; + eaAlert.Alert(msg); + } + + // + // Prepare Signal Dynamic Volume + // if Provided ... + if (eaUseDynamicVolume && + eaDynamicVolumeStep > 0 && + eaDynamicVolumeBalanceFactor > 0) + { + // + double dVolume = eaTrader.GetDynamicVolume( + signal.symbol, + eaDynamicVolumeBalanceFactor, + eaDynamicVolumeStep // + ); + + // + if (dVolume > 0) + { + signal.volume = dVolume; + } + + // + eaTradeHandler.UpdateSignal(signal); + } + + // + // Since Signal Filtering done based on + // Strategy and it's not related to Public + // TradeHandler for Seperation of Concern issue, + // we do this here ... + XCHCHEStartegyConditionsParser parser; + bool isFiltered = parser.IsFiltered( + signal, + conditions // + ); + if (isFiltered) + { + // + eaTradeHandler.RemoveSignal(signal); + return; + } + + // // + // // Here we Can Increase Signal Volume if + // // it is not force Filtered ... + // bool isForceFiltered = parser.IsFiltered( + // signal, + // conditions, + // true // + // ); + // if (!isForceFiltered) + // { + // // + // // TODO: + // // Implement Strong Signals Conditions + // // Senarios ... + // forceSignalsCount++; + + // // + // // Alert Froce Strong Signals + // // if Provided ... + // if (eaAlertStrongSignals) + // { + // // + // string msg = "Foce Strong " + (IsLong(signal.type) ? "Long" : "Short") + " Signal Recieved: (" + signal.provider + "," + signal.symbol + "," + ToString(signal.period) + ") ..."; + // eaAlert.Alert(msg); + // } + // } + + // + // Attach Conditions Summary to Signal ... + string conditionsSummary = conditions.GenerateSummary( + false, + false, + true, + false // + ); + + // + signal.conditions = parser.GenerateSignalConditions( + signal, + conditions // + ); // conditionsSummary; + + // + // Execute Signal Using Trade Handler ... + ENUM_X_SIGNAL_EXECUTION_RESULT state; + bool isExecuted = eaTradeHandler.ExecuteSignal( + signal, + state // + ); +} + +// +// Handle StopLoss Triggered Positions ... +void OnStopLossTriggered(const XDeal &deal) +{ + // + // Finish ... + eaTradeHandler.Finish(deal); + + // + ReportBalance(); +} + +// +// Handle Take Profit Triggered Positions ... +void OnTakeProfitTriggered(const XDeal &deal) +{ + // + // Finish ... + eaTradeHandler.Finish(deal); + + // + ReportBalance(); +} + +// +// Handle Force Close a Position ... +void OnPositionForceClosed( + const ulong ticket, + const XPosition &position, + const string comment // +) +{ + // + // Finish ... + eaTradeHandler.Finish( + ticket, + position, + comment // + ); + + // + ReportBalance(); +} + +// +// Report Account Balance ... +void ReportBalance() +{ + // + if (!IsRunningOnTestMode()) + { + return; + } + + // + string msg = "Balance: " + ToString(eaTrader.mAccount.GetBalance()); + eaAlert.Log(msg); +} + +// \ No newline at end of file diff --git a/Parsers/x-saherelm.xch.che.parser.mq5 b/Parsers/x-saherelm.xch.che.parser.mq5 new file mode 100644 index 00000000..5173cf94 --- /dev/null +++ b/Parsers/x-saherelm.xch.che.parser.mq5 @@ -0,0 +1,1025 @@ +/////////////////////////////////////////////////////// +// +// SaherElm IT Center MQL5 Strategy Parser Library +// ------------------------------------------------ +// Name: XCHCHEStartegyConditionsParser +// Description: provide all conditions parsing +// for XCH Strategy ... +// +// +// Maintainer: +// ------------ +// Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com) +// +////////////////////////////////////////////////////// +// +// Global Properties ... +#property library +#property copyright "Copyright 2023, SaherElm IT Center" +#property link "https://www.saherelm.ir" +#property version "1.00" +#property strict + +// +// Imports ... +#include "../Strategies/x-saherelm.xch.che.strategy.mq5" + +// +// Conditions Parser ... +struct XCHCHEStartegyConditionsParser +{ + // + string _version; + + // + // Parsers ... + + // + XSCAccount _account; + XMarketParser _marketParser; + + // + string GenerateSignalConditions( + XSignal &signal, + XCHStrategyConditions &conditions // + ) + { + // + // Calculate Score ... + double bullishScore = 0; + double bearishScore = 0; + conditions.GenerateScore( + bullishScore, + bearishScore // + ); + + // + // Generate Signal Parser Structured Conditions ... + string result = + "(" + + "\n" + + "// Symbol: " + signal.symbol + "\n" + + "// ---------------" + "\n" + + "// Scores:" + "\n" + + "// ---------------" + "\n" + + "// Bullish: " + ToString(bullishScore) + "\n" + + "// Bearish: " + ToString(bearishScore) + "\n" + + "// ---------------" + "\n" + + "// Time: " + ToString(TimeCurrent()) + "\n" + + "// ---------------" + "\n" + + "//" + "\n" + + "// XPV ..." + "\n" + + "//" + "\n" + + // + // True(s) ... + (conditions.pvConditions.isNewPeak ? "conditions.pvConditions.isNewPeak &&" + "\n" : "") + + (conditions.pvConditions.isNewPeakOverLast ? "conditions.pvConditions.isNewPeakOverLast &&" + "\n" : "") + + (conditions.pvConditions.isNewPeakUnderLast ? "conditions.pvConditions.isNewPeakUnderLast &&" + "\n" : "") + + (conditions.pvConditions.isNewVale ? "conditions.pvConditions.isNewVale &&" + "\n" : "") + + (conditions.pvConditions.isNewValeOverLast ? "conditions.pvConditions.isNewValeOverLast &&" + "\n" : "") + + (conditions.pvConditions.isNewValeUnderLast ? "conditions.pvConditions.isNewValeUnderLast &&" + "\n" : "") + + (conditions.pvConditions.isFiboIncreased ? "conditions.pvConditions.isFiboIncreased &&" + "\n" : "") + + (conditions.pvConditions.isFiboDecreased ? "conditions.pvConditions.isFiboDecreased &&" + "\n" : "") + + (conditions.pvConditions.isFiboSectionChanged ? "conditions.pvConditions.isFiboSectionChanged &&" + "\n" : "") + + (conditions.pvConditions.isCloseOverFib1 ? "conditions.pvConditions.isCloseOverFib1 &&" + "\n" : "") + + (conditions.pvConditions.isCloseOverFib2 ? "conditions.pvConditions.isCloseOverFib2 &&" + "\n" : "") + + (conditions.pvConditions.isCloseOverFib3 ? "conditions.pvConditions.isCloseOverFib3 &&" + "\n" : "") + + (conditions.pvConditions.isCloseOverFib4 ? "conditions.pvConditions.isCloseOverFib4 &&" + "\n" : "") + + (conditions.pvConditions.isCloseOverFib5 ? "conditions.pvConditions.isCloseOverFib5 &&" + "\n" : "") + + (conditions.pvConditions.isCloseUnderFib1 ? "conditions.pvConditions.isCloseUnderFib1 &&" + "\n" : "") + + (conditions.pvConditions.isCloseUnderFib2 ? "conditions.pvConditions.isCloseUnderFib2 &&" + "\n" : "") + + (conditions.pvConditions.isCloseUnderFib3 ? "conditions.pvConditions.isCloseUnderFib3 &&" + "\n" : "") + + (conditions.pvConditions.isCloseUnderFib4 ? "conditions.pvConditions.isCloseUnderFib4 &&" + "\n" : "") + + (conditions.pvConditions.isCloseUnderFib5 ? "conditions.pvConditions.isCloseUnderFib5 &&" + "\n" : "") + + (conditions.pvConditions.isCloseCrossedOverFib1 ? "conditions.pvConditions.isCloseCrossedOverFib1 &&" + "\n" : "") + + (conditions.pvConditions.isCloseCrossedOverFib2 ? "conditions.pvConditions.isCloseCrossedOverFib2 &&" + "\n" : "") + + (conditions.pvConditions.isCloseCrossedOverFib3 ? "conditions.pvConditions.isCloseCrossedOverFib3 &&" + "\n" : "") + + (conditions.pvConditions.isCloseCrossedOverFib4 ? "conditions.pvConditions.isCloseCrossedOverFib4 &&" + "\n" : "") + + (conditions.pvConditions.isCloseCrossedOverFib5 ? "conditions.pvConditions.isCloseCrossedOverFib5 &&" + "\n" : "") + + (conditions.pvConditions.isCloseCrossedUnderFib1 ? "conditions.pvConditions.isCloseCrossedUnderFib1 &&" + "\n" : "") + + (conditions.pvConditions.isCloseCrossedUnderFib2 ? "conditions.pvConditions.isCloseCrossedUnderFib2 &&" + "\n" : "") + + (conditions.pvConditions.isCloseCrossedUnderFib3 ? "conditions.pvConditions.isCloseCrossedUnderFib3 &&" + "\n" : "") + + (conditions.pvConditions.isCloseCrossedUnderFib4 ? "conditions.pvConditions.isCloseCrossedUnderFib4 &&" + "\n" : "") + + (conditions.pvConditions.isCloseCrossedUnderFib5 ? "conditions.pvConditions.isCloseCrossedUnderFib5 &&" + "\n" : "") + + (conditions.pvConditions.isSCBullish ? "conditions.pvConditions.isSCBullish &&" + "\n" : "") + + (conditions.pvConditions.isSCHHBullish ? "conditions.pvConditions.isSCHHBullish &&" + "\n" : "") + + (conditions.pvConditions.isSCLLBullish ? "conditions.pvConditions.isSCLLBullish &&" + "\n" : "") + + (conditions.pvConditions.isSCSwitchedToBullish ? "conditions.pvConditions.isSCSwitchedToBullish &&" + "\n" : "") + + (conditions.pvConditions.isSCHHSwitchedToBullish ? "conditions.pvConditions.isSCHHSwitchedToBullish &&" + "\n" : "") + + (conditions.pvConditions.isSCLLSwitchedToBullish ? "conditions.pvConditions.isSCLLSwitchedToBullish &&" + "\n" : "") + + (conditions.pvConditions.isSCBearish ? "conditions.pvConditions.isSCBearish &&" + "\n" : "") + + (conditions.pvConditions.isSCHHBearish ? "conditions.pvConditions.isSCHHBearish &&" + "\n" : "") + + (conditions.pvConditions.isSCLLBearish ? "conditions.pvConditions.isSCLLBearish &&" + "\n" : "") + + (conditions.pvConditions.isSCSwitchedToBearish ? "conditions.pvConditions.isSCSwitchedToBearish &&" + "\n" : "") + + (conditions.pvConditions.isSCHHSwitchedToBearish ? "conditions.pvConditions.isSCHHSwitchedToBearish &&" + "\n" : "") + + (conditions.pvConditions.isSCLLSwitchedToBeraish ? "conditions.pvConditions.isSCLLSwitchedToBeraish &&" + "\n" : "") + + (conditions.pvConditions.isMCBullish ? "conditions.pvConditions.isMCBullish &&" + "\n" : "") + + (conditions.pvConditions.isMCHHBullish ? "conditions.pvConditions.isMCHHBullish &&" + "\n" : "") + + (conditions.pvConditions.isMCLLBullish ? "conditions.pvConditions.isMCLLBullish &&" + "\n" : "") + + (conditions.pvConditions.isMCSwitchedToBullish ? "conditions.pvConditions.isMCSwitchedToBullish &&" + "\n" : "") + + (conditions.pvConditions.isMCHHSwitchedToBullish ? "conditions.pvConditions.isMCHHSwitchedToBullish &&" + "\n" : "") + + (conditions.pvConditions.isMCLLSwitchedToBullish ? "conditions.pvConditions.isMCLLSwitchedToBullish &&" + "\n" : "") + + (conditions.pvConditions.isMCBearish ? "conditions.pvConditions.isMCBearish &&" + "\n" : "") + + (conditions.pvConditions.isMCHHBearish ? "conditions.pvConditions.isMCHHBearish &&" + "\n" : "") + + (conditions.pvConditions.isMCLLBearish ? "conditions.pvConditions.isMCLLBearish &&" + "\n" : "") + + (conditions.pvConditions.isMCSwitchedToBearish ? "conditions.pvConditions.isMCSwitchedToBearish &&" + "\n" : "") + + (conditions.pvConditions.isMCHHSwitchedToBearish ? "conditions.pvConditions.isMCHHSwitchedToBearish &&" + "\n" : "") + + (conditions.pvConditions.isMCLLSwitchedToBeraish ? "conditions.pvConditions.isMCLLSwitchedToBeraish &&" + "\n" : "") + + (conditions.pvConditions.isLCBullish ? "conditions.pvConditions.isLCBullish &&" + "\n" : "") + + (conditions.pvConditions.isLCHHBullish ? "conditions.pvConditions.isLCHHBullish &&" + "\n" : "") + + (conditions.pvConditions.isLCLLBullish ? "conditions.pvConditions.isLCLLBullish &&" + "\n" : "") + + (conditions.pvConditions.isLCSwitchedToBullish ? "conditions.pvConditions.isLCSwitchedToBullish &&" + "\n" : "") + + (conditions.pvConditions.isLCHHSwitchedToBullish ? "conditions.pvConditions.isLCHHSwitchedToBullish &&" + "\n" : "") + + (conditions.pvConditions.isLCLLSwitchedToBullish ? "conditions.pvConditions.isLCLLSwitchedToBullish &&" + "\n" : "") + + (conditions.pvConditions.isLCBearish ? "conditions.pvConditions.isLCBearish &&" + "\n" : "") + + (conditions.pvConditions.isLCHHBearish ? "conditions.pvConditions.isLCHHBearish &&" + "\n" : "") + + (conditions.pvConditions.isLCLLBearish ? "conditions.pvConditions.isLCLLBearish &&" + "\n" : "") + + (conditions.pvConditions.isLCSwitchedToBearish ? "conditions.pvConditions.isLCSwitchedToBearish &&" + "\n" : "") + + (conditions.pvConditions.isLCHHSwitchedToBearish ? "conditions.pvConditions.isLCHHSwitchedToBearish &&" + "\n" : "") + + (conditions.pvConditions.isLCLLSwitchedToBeraish ? "conditions.pvConditions.isLCLLSwitchedToBeraish &&" + "\n" : "") + + (conditions.pvConditions.isHCBullish ? "conditions.pvConditions.isHCBullish &&" + "\n" : "") + + (conditions.pvConditions.isHCHHBullish ? "conditions.pvConditions.isHCHHBullish &&" + "\n" : "") + + (conditions.pvConditions.isHCLLBullish ? "conditions.pvConditions.isHCLLBullish &&" + "\n" : "") + + (conditions.pvConditions.isHCSwitchedToBullish ? "conditions.pvConditions.isHCSwitchedToBullish &&" + "\n" : "") + + (conditions.pvConditions.isHCHHSwitchedToBullish ? "conditions.pvConditions.isHCHHSwitchedToBullish &&" + "\n" : "") + + (conditions.pvConditions.isHCLLSwitchedToBullish ? "conditions.pvConditions.isHCLLSwitchedToBullish &&" + "\n" : "") + + (conditions.pvConditions.isHCBearish ? "conditions.pvConditions.isHCBearish &&" + "\n" : "") + + (conditions.pvConditions.isHCHHBearish ? "conditions.pvConditions.isHCHHBearish &&" + "\n" : "") + + (conditions.pvConditions.isHCLLBearish ? "conditions.pvConditions.isHCLLBearish &&" + "\n" : "") + + (conditions.pvConditions.isHCSwitchedToBearish ? "conditions.pvConditions.isHCSwitchedToBearish &&" + "\n" : "") + + (conditions.pvConditions.isHCHHSwitchedToBearish ? "conditions.pvConditions.isHCHHSwitchedToBearish &&" + "\n" : "") + + (conditions.pvConditions.isHCLLSwitchedToBeraish ? "conditions.pvConditions.isHCLLSwitchedToBeraish &&" + "\n" : "") + + // "//" + "\n" + + // // + // // False(s) ... + // (!conditions.pvConditions.isNewPeak ? "!conditions.pvConditions.isNewPeak &&" + "\n" : "") + + // (!conditions.pvConditions.isNewPeakOverLast ? "!conditions.pvConditions.isNewPeakOverLast &&" + "\n" : "") + + // (!conditions.pvConditions.isNewPeakUnderLast ? "!conditions.pvConditions.isNewPeakUnderLast &&" + "\n" : "") + + // (!conditions.pvConditions.isNewVale ? "!conditions.pvConditions.isNewVale &&" + "\n" : "") + + // (!conditions.pvConditions.isNewValeOverLast ? "!conditions.pvConditions.isNewValeOverLast &&" + "\n" : "") + + // (!conditions.pvConditions.isNewValeUnderLast ? "!conditions.pvConditions.isNewValeUnderLast &&" + "\n" : "") + + // (!conditions.pvConditions.isFiboIncreased ? "!conditions.pvConditions.isFiboIncreased &&" + "\n" : "") + + // (!conditions.pvConditions.isFiboDecreased ? "!conditions.pvConditions.isFiboDecreased &&" + "\n" : "") + + // (!conditions.pvConditions.isFiboSectionChanged ? "!conditions.pvConditions.isFiboSectionChanged &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseOverFib1 ? "!conditions.pvConditions.isCloseOverFib1 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseOverFib2 ? "!conditions.pvConditions.isCloseOverFib2 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseOverFib3 ? "!conditions.pvConditions.isCloseOverFib3 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseOverFib4 ? "!conditions.pvConditions.isCloseOverFib4 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseOverFib5 ? "!conditions.pvConditions.isCloseOverFib5 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseUnderFib1 ? "!conditions.pvConditions.isCloseUnderFib1 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseUnderFib2 ? "!conditions.pvConditions.isCloseUnderFib2 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseUnderFib3 ? "!conditions.pvConditions.isCloseUnderFib3 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseUnderFib4 ? "!conditions.pvConditions.isCloseUnderFib4 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseUnderFib5 ? "!conditions.pvConditions.isCloseUnderFib5 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseCrossedOverFib1 ? "!conditions.pvConditions.isCloseCrossedOverFib1 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseCrossedOverFib2 ? "!conditions.pvConditions.isCloseCrossedOverFib2 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseCrossedOverFib3 ? "!conditions.pvConditions.isCloseCrossedOverFib3 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseCrossedOverFib4 ? "!conditions.pvConditions.isCloseCrossedOverFib4 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseCrossedOverFib5 ? "!conditions.pvConditions.isCloseCrossedOverFib5 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseCrossedUnderFib1 ? "!conditions.pvConditions.isCloseCrossedUnderFib1 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseCrossedUnderFib2 ? "!conditions.pvConditions.isCloseCrossedUnderFib2 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseCrossedUnderFib3 ? "!conditions.pvConditions.isCloseCrossedUnderFib3 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseCrossedUnderFib4 ? "!conditions.pvConditions.isCloseCrossedUnderFib4 &&" + "\n" : "") + + // (!conditions.pvConditions.isCloseCrossedUnderFib5 ? "!conditions.pvConditions.isCloseCrossedUnderFib5 &&" + "\n" : "") + + // (!conditions.pvConditions.isSCBullish ? "!conditions.pvConditions.isSCBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isSCHHBullish ? "!conditions.pvConditions.isSCHHBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isSCLLBullish ? "!conditions.pvConditions.isSCLLBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isSCSwitchedToBullish ? "!conditions.pvConditions.isSCSwitchedToBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isSCHHSwitchedToBullish ? "!conditions.pvConditions.isSCHHSwitchedToBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isSCLLSwitchedToBullish ? "!conditions.pvConditions.isSCLLSwitchedToBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isSCBearish ? "!conditions.pvConditions.isSCBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isSCHHBearish ? "!conditions.pvConditions.isSCHHBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isSCLLBearish ? "!conditions.pvConditions.isSCLLBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isSCSwitchedToBearish ? "!conditions.pvConditions.isSCSwitchedToBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isSCHHSwitchedToBearish ? "!conditions.pvConditions.isSCHHSwitchedToBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isSCLLSwitchedToBeraish ? "!conditions.pvConditions.isSCLLSwitchedToBeraish &&" + "\n" : "") + + // (!conditions.pvConditions.isMCBullish ? "!conditions.pvConditions.isMCBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isMCHHBullish ? "!conditions.pvConditions.isMCHHBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isMCLLBullish ? "!conditions.pvConditions.isMCLLBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isMCSwitchedToBullish ? "!conditions.pvConditions.isMCSwitchedToBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isMCHHSwitchedToBullish ? "!conditions.pvConditions.isMCHHSwitchedToBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isMCLLSwitchedToBullish ? "!conditions.pvConditions.isMCLLSwitchedToBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isMCBearish ? "!conditions.pvConditions.isMCBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isMCHHBearish ? "!conditions.pvConditions.isMCHHBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isMCLLBearish ? "!conditions.pvConditions.isMCLLBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isMCSwitchedToBearish ? "!conditions.pvConditions.isMCSwitchedToBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isMCHHSwitchedToBearish ? "!conditions.pvConditions.isMCHHSwitchedToBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isMCLLSwitchedToBeraish ? "!conditions.pvConditions.isMCLLSwitchedToBeraish &&" + "\n" : "") + + // (!conditions.pvConditions.isLCBullish ? "!conditions.pvConditions.isLCBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isLCHHBullish ? "!conditions.pvConditions.isLCHHBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isLCLLBullish ? "!conditions.pvConditions.isLCLLBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isLCSwitchedToBullish ? "!conditions.pvConditions.isLCSwitchedToBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isLCHHSwitchedToBullish ? "!conditions.pvConditions.isLCHHSwitchedToBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isLCLLSwitchedToBullish ? "!conditions.pvConditions.isLCLLSwitchedToBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isLCBearish ? "!conditions.pvConditions.isLCBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isLCHHBearish ? "!conditions.pvConditions.isLCHHBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isLCLLBearish ? "!conditions.pvConditions.isLCLLBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isLCSwitchedToBearish ? "!conditions.pvConditions.isLCSwitchedToBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isLCHHSwitchedToBearish ? "!conditions.pvConditions.isLCHHSwitchedToBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isLCLLSwitchedToBeraish ? "!conditions.pvConditions.isLCLLSwitchedToBeraish &&" + "\n" : "") + + // (!conditions.pvConditions.isHCBullish ? "!conditions.pvConditions.isHCBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isHCHHBullish ? "!conditions.pvConditions.isHCHHBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isHCLLBullish ? "!conditions.pvConditions.isHCLLBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isHCSwitchedToBullish ? "!conditions.pvConditions.isHCSwitchedToBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isHCHHSwitchedToBullish ? "!conditions.pvConditions.isHCHHSwitchedToBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isHCLLSwitchedToBullish ? "!conditions.pvConditions.isHCLLSwitchedToBullish &&" + "\n" : "") + + // (!conditions.pvConditions.isHCBearish ? "!conditions.pvConditions.isHCBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isHCHHBearish ? "!conditions.pvConditions.isHCHHBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isHCLLBearish ? "!conditions.pvConditions.isHCLLBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isHCSwitchedToBearish ? "!conditions.pvConditions.isHCSwitchedToBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isHCHHSwitchedToBearish ? "!conditions.pvConditions.isHCHHSwitchedToBearish &&" + "\n" : "") + + // (!conditions.pvConditions.isHCLLSwitchedToBeraish ? "!conditions.pvConditions.isHCLLSwitchedToBeraish &&" + "\n" : "") + + "//" + "\n" + + "// XCHM ..." + "\n" + + "//" + "\n" + + (conditions.chmConditions.hasBullishPower ? "conditions.chmConditions.hasBullishPower &&" + "\n" : "") + + (conditions.chmConditions.hasBearishPower ? "conditions.chmConditions.hasBearishPower &&" + "\n" : "") + + (conditions.chmConditions.isBullishPowerUp ? "conditions.chmConditions.isBullishPowerUp &&" + "\n" : "") + + (conditions.chmConditions.isBearishPowerUp ? "conditions.chmConditions.isBearishPowerUp &&" + "\n" : "") + + (conditions.chmConditions.isBullishPowerIncreasing ? "conditions.chmConditions.isBullishPowerIncreasing &&" + "\n" : "") + + (conditions.chmConditions.isBullishPowerDecreasing ? "conditions.chmConditions.isBullishPowerDecreasing &&" + "\n" : "") + + (conditions.chmConditions.isBearishPowerIncreasing ? "conditions.chmConditions.isBearishPowerIncreasing &&" + "\n" : "") + + (conditions.chmConditions.isBearishPowerDecreasing ? "conditions.chmConditions.isBearishPowerDecreasing &&" + "\n" : "") + + (conditions.chmConditions.isFastOverSlow ? "conditions.chmConditions.isFastOverSlow &&" + "\n" : "") + + (conditions.chmConditions.isFastUnderSlow ? "conditions.chmConditions.isFastUnderSlow &&" + "\n" : "") + + (conditions.chmConditions.isFastCrossedOverSlow ? "conditions.chmConditions.isFastCrossedOverSlow &&" + "\n" : "") + + (conditions.chmConditions.isFastCrossedUnderSlow ? "conditions.chmConditions.isFastCrossedUnderSlow &&" + "\n" : "") + + (conditions.chmConditions.isClosedOverFast ? "conditions.chmConditions.isClosedOverFast &&" + "\n" : "") + + (conditions.chmConditions.isClosedUnderFast ? "conditions.chmConditions.isClosedUnderFast &&" + "\n" : "") + + (conditions.chmConditions.isCFastOverSlow ? "conditions.chmConditions.isCFastOverSlow &&" + "\n" : "") + + (conditions.chmConditions.isCFastUnderSlow ? "conditions.chmConditions.isCFastUnderSlow &&" + "\n" : "") + + (conditions.chmConditions.isCFastCrossedOverSlow ? "conditions.chmConditions.isCFastCrossedOverSlow &&" + "\n" : "") + + (conditions.chmConditions.isCFastCrossedUnderSlow ? "conditions.chmConditions.isCFastCrossedUnderSlow &&" + "\n" : "") + + (conditions.chmConditions.isClosedOverCFast ? "conditions.chmConditions.isClosedOverCFast &&" + "\n" : "") + + (conditions.chmConditions.isClosedUnderCFast ? "conditions.chmConditions.isClosedUnderCFast &&" + "\n" : "") + + (conditions.chmConditions.isSFastOverSlow ? "conditions.chmConditions.isSFastOverSlow &&" + "\n" : "") + + (conditions.chmConditions.isSFastUnderSlow ? "conditions.chmConditions.isSFastUnderSlow &&" + "\n" : "") + + (conditions.chmConditions.isSFastCrossedOverSlow ? "conditions.chmConditions.isSFastCrossedOverSlow &&" + "\n" : "") + + (conditions.chmConditions.isSFastCrossedUnderSlow ? "conditions.chmConditions.isSFastCrossedUnderSlow &&" + "\n" : "") + + (conditions.chmConditions.isClosedOverSFast ? "conditions.chmConditions.isClosedOverSFast &&" + "\n" : "") + + (conditions.chmConditions.isClosedUnderSFast ? "conditions.chmConditions.isClosedUnderSFast &&" + "\n" : "") + + (conditions.chmConditions.isMFastOverSlow ? "conditions.chmConditions.isMFastOverSlow &&" + "\n" : "") + + (conditions.chmConditions.isMFastUnderSlow ? "conditions.chmConditions.isMFastUnderSlow &&" + "\n" : "") + + (conditions.chmConditions.isMFastCrossedOverSlow ? "conditions.chmConditions.isMFastCrossedOverSlow &&" + "\n" : "") + + (conditions.chmConditions.isMFastCrossedUnderSlow ? "conditions.chmConditions.isMFastCrossedUnderSlow &&" + "\n" : "") + + (conditions.chmConditions.isClosedOverMFast ? "conditions.chmConditions.isClosedOverMFast &&" + "\n" : "") + + (conditions.chmConditions.isClosedUnderMFast ? "conditions.chmConditions.isClosedUnderMFast &&" + "\n" : "") + + (conditions.chmConditions.isLFastOverSlow ? "conditions.chmConditions.isLFastOverSlow &&" + "\n" : "") + + (conditions.chmConditions.isLFastUnderSlow ? "conditions.chmConditions.isLFastUnderSlow &&" + "\n" : "") + + (conditions.chmConditions.isLFastCrossedOverSlow ? "conditions.chmConditions.isLFastCrossedOverSlow &&" + "\n" : "") + + (conditions.chmConditions.isLFastCrossedUnderSlow ? "conditions.chmConditions.isLFastCrossedUnderSlow &&" + "\n" : "") + + (conditions.chmConditions.isClosedOverLFast ? "conditions.chmConditions.isClosedOverLFast &&" + "\n" : "") + + (conditions.chmConditions.isClosedUnderLFast ? "conditions.chmConditions.isClosedUnderLFast &&" + "\n" : "") + + (conditions.chmConditions.isHFastOverSlow ? "conditions.chmConditions.isHFastOverSlow &&" + "\n" : "") + + (conditions.chmConditions.isHFastUnderSlow ? "conditions.chmConditions.isHFastUnderSlow &&" + "\n" : "") + + (conditions.chmConditions.isHFastCrossedOverSlow ? "conditions.chmConditions.isHFastCrossedOverSlow &&" + "\n" : "") + + (conditions.chmConditions.isHFastCrossedUnderSlow ? "conditions.chmConditions.isHFastCrossedUnderSlow &&" + "\n" : "") + + (conditions.chmConditions.isClosedOverHFast ? "conditions.chmConditions.isClosedOverHFast &&" + "\n" : "") + + (conditions.chmConditions.isClosedUnderHFast ? "conditions.chmConditions.isClosedUnderHFast &&" + "\n" : "") + + // "//" + "\n" + + // (!conditions.chmConditions.hasBullishPower ? "!conditions.chmConditions.hasBullishPower &&" + "\n" : "") + + // (!conditions.chmConditions.hasBearishPower ? "!conditions.chmConditions.hasBearishPower &&" + "\n" : "") + + // (!conditions.chmConditions.isBullishPowerUp ? "!conditions.chmConditions.isBullishPowerUp &&" + "\n" : "") + + // (!conditions.chmConditions.isBearishPowerUp ? "!conditions.chmConditions.isBearishPowerUp &&" + "\n" : "") + + // (!conditions.chmConditions.isBullishPowerIncreasing ? "!conditions.chmConditions.isBullishPowerIncreasing &&" + "\n" : "") + + // (!conditions.chmConditions.isBullishPowerDecreasing ? "!conditions.chmConditions.isBullishPowerDecreasing &&" + "\n" : "") + + // (!conditions.chmConditions.isBearishPowerIncreasing ? "!conditions.chmConditions.isBearishPowerIncreasing &&" + "\n" : "") + + // (!conditions.chmConditions.isBearishPowerDecreasing ? "!conditions.chmConditions.isBearishPowerDecreasing &&" + "\n" : "") + + // (!conditions.chmConditions.isFastOverSlow ? "!conditions.chmConditions.isFastOverSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isFastUnderSlow ? "!conditions.chmConditions.isFastUnderSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isFastCrossedOverSlow ? "!conditions.chmConditions.isFastCrossedOverSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isFastCrossedUnderSlow ? "!conditions.chmConditions.isFastCrossedUnderSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isClosedOverFast ? "!conditions.chmConditions.isClosedOverFast &&" + "\n" : "") + + // (!conditions.chmConditions.isClosedUnderFast ? "!conditions.chmConditions.isClosedUnderFast &&" + "\n" : "") + + // (!conditions.chmConditions.isCFastOverSlow ? "!conditions.chmConditions.isCFastOverSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isCFastUnderSlow ? "!conditions.chmConditions.isCFastUnderSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isCFastCrossedOverSlow ? "!conditions.chmConditions.isCFastCrossedOverSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isCFastCrossedUnderSlow ? "!conditions.chmConditions.isCFastCrossedUnderSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isClosedOverCFast ? "!conditions.chmConditions.isClosedOverCFast &&" + "\n" : "") + + // (!conditions.chmConditions.isClosedUnderCFast ? "!conditions.chmConditions.isClosedUnderCFast &&" + "\n" : "") + + // (!conditions.chmConditions.isSFastOverSlow ? "!conditions.chmConditions.isSFastOverSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isSFastUnderSlow ? "!conditions.chmConditions.isSFastUnderSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isSFastCrossedOverSlow ? "!conditions.chmConditions.isSFastCrossedOverSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isSFastCrossedUnderSlow ? "!conditions.chmConditions.isSFastCrossedUnderSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isClosedOverSFast ? "!conditions.chmConditions.isClosedOverSFast &&" + "\n" : "") + + // (!conditions.chmConditions.isClosedUnderSFast ? "!conditions.chmConditions.isClosedUnderSFast &&" + "\n" : "") + + // (!conditions.chmConditions.isMFastOverSlow ? "!conditions.chmConditions.isMFastOverSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isMFastUnderSlow ? "!conditions.chmConditions.isMFastUnderSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isMFastCrossedOverSlow ? "!conditions.chmConditions.isMFastCrossedOverSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isMFastCrossedUnderSlow ? "!conditions.chmConditions.isMFastCrossedUnderSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isClosedOverMFast ? "!conditions.chmConditions.isClosedOverMFast &&" + "\n" : "") + + // (!conditions.chmConditions.isClosedUnderMFast ? "!conditions.chmConditions.isClosedUnderMFast &&" + "\n" : "") + + // (!conditions.chmConditions.isLFastOverSlow ? "!conditions.chmConditions.isLFastOverSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isLFastUnderSlow ? "!conditions.chmConditions.isLFastUnderSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isLFastCrossedOverSlow ? "!conditions.chmConditions.isLFastCrossedOverSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isLFastCrossedUnderSlow ? "!conditions.chmConditions.isLFastCrossedUnderSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isClosedOverLFast ? "!conditions.chmConditions.isClosedOverLFast &&" + "\n" : "") + + // (!conditions.chmConditions.isClosedUnderLFast ? "!conditions.chmConditions.isClosedUnderLFast &&" + "\n" : "") + + // (!conditions.chmConditions.isHFastOverSlow ? "!conditions.chmConditions.isHFastOverSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isHFastUnderSlow ? "!conditions.chmConditions.isHFastUnderSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isHFastCrossedOverSlow ? "!conditions.chmConditions.isHFastCrossedOverSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isHFastCrossedUnderSlow ? "!conditions.chmConditions.isHFastCrossedUnderSlow &&" + "\n" : "") + + // (!conditions.chmConditions.isClosedOverHFast ? "!conditions.chmConditions.isClosedOverHFast &&" + "\n" : "") + + // (!conditions.chmConditions.isClosedUnderHFast ? "!conditions.chmConditions.isClosedUnderHFast &&" + "\n" : "") + + "//" + "\n" + + "// XCHHK ..." + "\n" + + "//" + "\n" + + (conditions.chhkConditions.hasBullishPower ? "conditions.chhkConditions.hasBullishPower &&" + "\n" : "") + + (conditions.chhkConditions.hasBearishPower ? "conditions.chhkConditions.hasBearishPower &&" + "\n" : "") + + (conditions.chhkConditions.isBullishPowerUp ? "conditions.chhkConditions.isBullishPowerUp &&" + "\n" : "") + + (conditions.chhkConditions.isBearishPowerUp ? "conditions.chhkConditions.isBearishPowerUp &&" + "\n" : "") + + (conditions.chhkConditions.isBullishPowerIncreasing ? "conditions.chhkConditions.isBullishPowerIncreasing &&" + "\n" : "") + + (conditions.chhkConditions.isBullishPowerDecreasing ? "conditions.chhkConditions.isBullishPowerDecreasing &&" + "\n" : "") + + (conditions.chhkConditions.isBearishPowerIncreasing ? "conditions.chhkConditions.isBearishPowerIncreasing &&" + "\n" : "") + + (conditions.chhkConditions.isBearishPowerDecreasing ? "conditions.chhkConditions.isBearishPowerDecreasing &&" + "\n" : "") + + (conditions.chhkConditions.isCBullish ? "conditions.chhkConditions.isCBullish &&" + "\n" : "") + + (conditions.chhkConditions.isCSwitchedToBullish ? "conditions.chhkConditions.isCSwitchedToBullish &&" + "\n" : "") + + (conditions.chhkConditions.isCBearish ? "conditions.chhkConditions.isCBearish &&" + "\n" : "") + + (conditions.chhkConditions.isCSwitchedToBearish ? "conditions.chhkConditions.isCSwitchedToBearish &&" + "\n" : "") + + (conditions.chhkConditions.isCloseOverCHigh ? "conditions.chhkConditions.isCloseOverCHigh &&" + "\n" : "") + + (conditions.chhkConditions.isCloseUnderCLow ? "conditions.chhkConditions.isCloseUnderCLow &&" + "\n" : "") + + (conditions.chhkConditions.isSBullish ? "conditions.chhkConditions.isSBullish &&" + "\n" : "") + + (conditions.chhkConditions.isSSwitchedToBullish ? "conditions.chhkConditions.isSSwitchedToBullish &&" + "\n" : "") + + (conditions.chhkConditions.isSBearish ? "conditions.chhkConditions.isSBearish &&" + "\n" : "") + + (conditions.chhkConditions.isSSwitchedToBearish ? "conditions.chhkConditions.isSSwitchedToBearish &&" + "\n" : "") + + (conditions.chhkConditions.isCloseOverSHigh ? "conditions.chhkConditions.isCloseOverSHigh &&" + "\n" : "") + + (conditions.chhkConditions.isCloseUnderSLow ? "conditions.chhkConditions.isCloseUnderSLow &&" + "\n" : "") + + (conditions.chhkConditions.isMBullish ? "conditions.chhkConditions.isMBullish &&" + "\n" : "") + + (conditions.chhkConditions.isMSwitchedToBullish ? "conditions.chhkConditions.isMSwitchedToBullish &&" + "\n" : "") + + (conditions.chhkConditions.isMBearish ? "conditions.chhkConditions.isMBearish &&" + "\n" : "") + + (conditions.chhkConditions.isMSwitchedToBearish ? "conditions.chhkConditions.isMSwitchedToBearish &&" + "\n" : "") + + (conditions.chhkConditions.isCloseOverMHigh ? "conditions.chhkConditions.isCloseOverMHigh &&" + "\n" : "") + + (conditions.chhkConditions.isCloseUnderMLow ? "conditions.chhkConditions.isCloseUnderMLow &&" + "\n" : "") + + (conditions.chhkConditions.isLBullish ? "conditions.chhkConditions.isLBullish &&" + "\n" : "") + + (conditions.chhkConditions.isLSwitchedToBullish ? "conditions.chhkConditions.isLSwitchedToBullish &&" + "\n" : "") + + (conditions.chhkConditions.isLBearish ? "conditions.chhkConditions.isLBearish &&" + "\n" : "") + + (conditions.chhkConditions.isLSwitchedToBearish ? "conditions.chhkConditions.isLSwitchedToBearish &&" + "\n" : "") + + (conditions.chhkConditions.isCloseOverLHigh ? "conditions.chhkConditions.isCloseOverLHigh &&" + "\n" : "") + + (conditions.chhkConditions.isCloseUnderLLow ? "conditions.chhkConditions.isCloseUnderLLow &&" + "\n" : "") + + (conditions.chhkConditions.isHBullish ? "conditions.chhkConditions.isHBullish &&" + "\n" : "") + + (conditions.chhkConditions.isHSwitchedToBullish ? "conditions.chhkConditions.isHSwitchedToBullish &&" + "\n" : "") + + (conditions.chhkConditions.isHBearish ? "conditions.chhkConditions.isHBearish &&" + "\n" : "") + + (conditions.chhkConditions.isHSwitchedToBearish ? "conditions.chhkConditions.isHSwitchedToBearish &&" + "\n" : "") + + (conditions.chhkConditions.isCloseOverHHigh ? "conditions.chhkConditions.isCloseOverHHigh &&" + "\n" : "") + + (conditions.chhkConditions.isCloseUnderHLow ? "conditions.chhkConditions.isCloseUnderHLow &&" + "\n" : "") + + // "//" + "\n" + + // (!conditions.chhkConditions.hasBullishPower ? "!conditions.chhkConditions.hasBullishPower && " + "\n" : "") + + // (!conditions.chhkConditions.hasBearishPower ? "!conditions.chhkConditions.hasBearishPower && " + "\n" : "") + + // (!conditions.chhkConditions.isBullishPowerUp ? "!conditions.chhkConditions.isBullishPowerUp && " + "\n" : "") + + // (!conditions.chhkConditions.isBearishPowerUp ? "!conditions.chhkConditions.isBearishPowerUp && " + "\n" : "") + + // (!conditions.chhkConditions.isBullishPowerIncreasing ? "!conditions.chhkConditions.isBullishPowerIncreasing && " + "\n" : "") + + // (!conditions.chhkConditions.isBullishPowerDecreasing ? "!conditions.chhkConditions.isBullishPowerDecreasing && " + "\n" : "") + + // (!conditions.chhkConditions.isBearishPowerIncreasing ? "!conditions.chhkConditions.isBearishPowerIncreasing && " + "\n" : "") + + // (!conditions.chhkConditions.isBearishPowerDecreasing ? "!conditions.chhkConditions.isBearishPowerDecreasing && " + "\n" : "") + + // (!conditions.chhkConditions.isCBullish ? "!conditions.chhkConditions.isCBullish && " + "\n" : "") + + // (!conditions.chhkConditions.isCSwitchedToBullish ? "!conditions.chhkConditions.isCSwitchedToBullish && " + "\n" : "") + + // (!conditions.chhkConditions.isCBearish ? "!conditions.chhkConditions.isCBearish && " + "\n" : "") + + // (!conditions.chhkConditions.isCSwitchedToBearish ? "!conditions.chhkConditions.isCSwitchedToBearish && " + "\n" : "") + + // (!conditions.chhkConditions.isCloseOverCHigh ? "!conditions.chhkConditions.isCloseOverCHigh && " + "\n" : "") + + // (!conditions.chhkConditions.isCloseUnderCLow ? "!conditions.chhkConditions.isCloseUnderCLow && " + "\n" : "") + + // (!conditions.chhkConditions.isSBullish ? "!conditions.chhkConditions.isSBullish && " + "\n" : "") + + // (!conditions.chhkConditions.isSSwitchedToBullish ? "!conditions.chhkConditions.isSSwitchedToBullish && " + "\n" : "") + + // (!conditions.chhkConditions.isSBearish ? "!conditions.chhkConditions.isSBearish && " + "\n" : "") + + // (!conditions.chhkConditions.isSSwitchedToBearish ? "!conditions.chhkConditions.isSSwitchedToBearish && " + "\n" : "") + + // (!conditions.chhkConditions.isCloseOverSHigh ? "!conditions.chhkConditions.isCloseOverSHigh && " + "\n" : "") + + // (!conditions.chhkConditions.isCloseUnderSLow ? "!conditions.chhkConditions.isCloseUnderSLow && " + "\n" : "") + + // (!conditions.chhkConditions.isMBullish ? "!conditions.chhkConditions.isMBullish && " + "\n" : "") + + // (!conditions.chhkConditions.isMSwitchedToBullish ? "!conditions.chhkConditions.isMSwitchedToBullish && " + "\n" : "") + + // (!conditions.chhkConditions.isMBearish ? "!conditions.chhkConditions.isMBearish && " + "\n" : "") + + // (!conditions.chhkConditions.isMSwitchedToBearish ? "!conditions.chhkConditions.isMSwitchedToBearish && " + "\n" : "") + + // (!conditions.chhkConditions.isCloseOverMHigh ? "!conditions.chhkConditions.isCloseOverMHigh && " + "\n" : "") + + // (!conditions.chhkConditions.isCloseUnderMLow ? "!conditions.chhkConditions.isCloseUnderMLow && " + "\n" : "") + + // (!conditions.chhkConditions.isLBullish ? "!conditions.chhkConditions.isLBullish && " + "\n" : "") + + // (!conditions.chhkConditions.isLSwitchedToBullish ? "!conditions.chhkConditions.isLSwitchedToBullish && " + "\n" : "") + + // (!conditions.chhkConditions.isLBearish ? "!conditions.chhkConditions.isLBearish && " + "\n" : "") + + // (!conditions.chhkConditions.isLSwitchedToBearish ? "!conditions.chhkConditions.isLSwitchedToBearish && " + "\n" : "") + + // (!conditions.chhkConditions.isCloseOverLHigh ? "!conditions.chhkConditions.isCloseOverLHigh && " + "\n" : "") + + // (!conditions.chhkConditions.isCloseUnderLLow ? "!conditions.chhkConditions.isCloseUnderLLow && " + "\n" : "") + + // (!conditions.chhkConditions.isHBullish ? "!conditions.chhkConditions.isHBullish && " + "\n" : "") + + // (!conditions.chhkConditions.isHSwitchedToBullish ? "!conditions.chhkConditions.isHSwitchedToBullish && " + "\n" : "") + + // (!conditions.chhkConditions.isHBearish ? "!conditions.chhkConditions.isHBearish && " + "\n" : "") + + // (!conditions.chhkConditions.isHSwitchedToBearish ? "!conditions.chhkConditions.isHSwitchedToBearish && " + "\n" : "") + + // (!conditions.chhkConditions.isCloseOverHHigh ? "!conditions.chhkConditions.isCloseOverHHigh && " + "\n" : "") + + // (!conditions.chhkConditions.isCloseUnderHLow ? "!conditions.chhkConditions.isCloseUnderHLow && " + "\n" : "") + + "//" + "\n" + + "// XCHTD ..." + "\n" + + "//" + "\n" + + (conditions.chtdConditions.hasBullishPower ? "conditions.chtdConditions.hasBullishPower &&" + "\n" : "") + + (conditions.chtdConditions.hasBearishPower ? "conditions.chtdConditions.hasBearishPower &&" + "\n" : "") + + (conditions.chtdConditions.isBullishPowerUp ? "conditions.chtdConditions.isBullishPowerUp &&" + "\n" : "") + + (conditions.chtdConditions.isBearishPowerUp ? "conditions.chtdConditions.isBearishPowerUp &&" + "\n" : "") + + (conditions.chtdConditions.isBullishPowerIncreasing ? "conditions.chtdConditions.isBullishPowerIncreasing &&" + "\n" : "") + + (conditions.chtdConditions.isBullishPowerDecreasing ? "conditions.chtdConditions.isBullishPowerDecreasing &&" + "\n" : "") + + (conditions.chtdConditions.isBearishPowerIncreasing ? "conditions.chtdConditions.isBearishPowerIncreasing &&" + "\n" : "") + + (conditions.chtdConditions.isBearishPowerDecreasing ? "conditions.chtdConditions.isBearishPowerDecreasing &&" + "\n" : "") + + (conditions.chtdConditions.isCBullish ? "conditions.chtdConditions.isCBullish &&" + "\n" : "") + + (conditions.chtdConditions.isCBearish ? "conditions.chtdConditions.isCBearish &&" + "\n" : "") + + (conditions.chtdConditions.isCSwitchedToBullish ? "conditions.chtdConditions.isCSwitchedToBullish &&" + "\n" : "") + + (conditions.chtdConditions.isCSwitchedToBearish ? "conditions.chtdConditions.isCSwitchedToBearish &&" + "\n" : "") + + (conditions.chtdConditions.isSBullish ? "conditions.chtdConditions.isSBullish &&" + "\n" : "") + + (conditions.chtdConditions.isSBearish ? "conditions.chtdConditions.isSBearish &&" + "\n" : "") + + (conditions.chtdConditions.isSSwitchedToBullish ? "conditions.chtdConditions.isSSwitchedToBullish &&" + "\n" : "") + + (conditions.chtdConditions.isSSwitchedToBearish ? "conditions.chtdConditions.isSSwitchedToBearish &&" + "\n" : "") + + (conditions.chtdConditions.isMBullish ? "conditions.chtdConditions.isMBullish &&" + "\n" : "") + + (conditions.chtdConditions.isMBearish ? "conditions.chtdConditions.isMBearish &&" + "\n" : "") + + (conditions.chtdConditions.isMSwitchedToBullish ? "conditions.chtdConditions.isMSwitchedToBullish &&" + "\n" : "") + + (conditions.chtdConditions.isMSwitchedToBearish ? "conditions.chtdConditions.isMSwitchedToBearish &&" + "\n" : "") + + (conditions.chtdConditions.isLBullish ? "conditions.chtdConditions.isLBullish &&" + "\n" : "") + + (conditions.chtdConditions.isLBearish ? "conditions.chtdConditions.isLBearish &&" + "\n" : "") + + (conditions.chtdConditions.isLSwitchedToBullish ? "conditions.chtdConditions.isLSwitchedToBullish &&" + "\n" : "") + + (conditions.chtdConditions.isLSwitchedToBearish ? "conditions.chtdConditions.isLSwitchedToBearish &&" + "\n" : "") + + (conditions.chtdConditions.isHBullish ? "conditions.chtdConditions.isHBullish &&" + "\n" : "") + + (conditions.chtdConditions.isHBearish ? "conditions.chtdConditions.isHBearish &&" + "\n" : "") + + (conditions.chtdConditions.isHSwitchedToBullish ? "conditions.chtdConditions.isHSwitchedToBullish &&" + "\n" : "") + + (conditions.chtdConditions.isHSwitchedToBearish ? "conditions.chtdConditions.isHSwitchedToBearish &&" + "\n" : "") + + // "//" + "\n" + + // (!conditions.chtdConditions.hasBullishPower ? "!conditions.chtdConditions.hasBullishPower &&" + "\n" : "") + + // (!conditions.chtdConditions.hasBearishPower ? "!conditions.chtdConditions.hasBearishPower &&" + "\n" : "") + + // (!conditions.chtdConditions.isBullishPowerUp ? "!conditions.chtdConditions.isBullishPowerUp &&" + "\n" : "") + + // (!conditions.chtdConditions.isBearishPowerUp ? "!conditions.chtdConditions.isBearishPowerUp &&" + "\n" : "") + + // (!conditions.chtdConditions.isBullishPowerIncreasing ? "!conditions.chtdConditions.isBullishPowerIncreasing &&" + "\n" : "") + + // (!conditions.chtdConditions.isBullishPowerDecreasing ? "!conditions.chtdConditions.isBullishPowerDecreasing &&" + "\n" : "") + + // (!conditions.chtdConditions.isBearishPowerIncreasing ? "!conditions.chtdConditions.isBearishPowerIncreasing &&" + "\n" : "") + + // (!conditions.chtdConditions.isBearishPowerDecreasing ? "!conditions.chtdConditions.isBearishPowerDecreasing &&" + "\n" : "") + + // (!conditions.chtdConditions.isCBullish ? "!conditions.chtdConditions.isCBullish &&" + "\n" : "") + + // (!conditions.chtdConditions.isCBearish ? "!conditions.chtdConditions.isCBearish &&" + "\n" : "") + + // (!conditions.chtdConditions.isCSwitchedToBullish ? "!conditions.chtdConditions.isCSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chtdConditions.isCSwitchedToBearish ? "!conditions.chtdConditions.isCSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chtdConditions.isSBullish ? "!conditions.chtdConditions.isSBullish &&" + "\n" : "") + + // (!conditions.chtdConditions.isSBearish ? "!conditions.chtdConditions.isSBearish &&" + "\n" : "") + + // (!conditions.chtdConditions.isSSwitchedToBullish ? "!conditions.chtdConditions.isSSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chtdConditions.isSSwitchedToBearish ? "!conditions.chtdConditions.isSSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chtdConditions.isMBullish ? "!conditions.chtdConditions.isMBullish &&" + "\n" : "") + + // (!conditions.chtdConditions.isMBearish ? "!conditions.chtdConditions.isMBearish &&" + "\n" : "") + + // (!conditions.chtdConditions.isMSwitchedToBullish ? "!conditions.chtdConditions.isMSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chtdConditions.isMSwitchedToBearish ? "!conditions.chtdConditions.isMSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chtdConditions.isLBullish ? "!conditions.chtdConditions.isLBullish &&" + "\n" : "") + + // (!conditions.chtdConditions.isLBearish ? "!conditions.chtdConditions.isLBearish &&" + "\n" : "") + + // (!conditions.chtdConditions.isLSwitchedToBullish ? "!conditions.chtdConditions.isLSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chtdConditions.isLSwitchedToBearish ? "!conditions.chtdConditions.isLSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chtdConditions.isHBullish ? "!conditions.chtdConditions.isHBullish &&" + "\n" : "") + + // (!conditions.chtdConditions.isHBearish ? "!conditions.chtdConditions.isHBearish &&" + "\n" : "") + + // (!conditions.chtdConditions.isHSwitchedToBullish ? "!conditions.chtdConditions.isHSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chtdConditions.isHSwitchedToBearish ? "!conditions.chtdConditions.isHSwitchedToBearish &&" + "\n" : "") + + "//" + "\n" + + "// XCHCHE ..." + "\n" + + "//" + "\n" + + (conditions.chcheConditions.hasBullishPower ? "conditions.chcheConditions.hasBullishPower &&" + "\n" : "") + + (conditions.chcheConditions.hasBearishPower ? "conditions.chcheConditions.hasBearishPower &&" + "\n" : "") + + (conditions.chcheConditions.isBullishPowerUp ? "conditions.chcheConditions.isBullishPowerUp &&" + "\n" : "") + + (conditions.chcheConditions.isBearishPowerUp ? "conditions.chcheConditions.isBearishPowerUp &&" + "\n" : "") + + (conditions.chcheConditions.isBullishPowerIncreasing ? "conditions.chcheConditions.isBullishPowerIncreasing &&" + "\n" : "") + + (conditions.chcheConditions.isBullishPowerDecreasing ? "conditions.chcheConditions.isBullishPowerDecreasing &&" + "\n" : "") + + (conditions.chcheConditions.isBearishPowerIncreasing ? "conditions.chcheConditions.isBearishPowerIncreasing &&" + "\n" : "") + + (conditions.chcheConditions.isBearishPowerDecreasing ? "conditions.chcheConditions.isBearishPowerDecreasing &&" + "\n" : "") + + (conditions.chcheConditions.isCBullish ? "conditions.chcheConditions.isCBullish &&" + "\n" : "") + + (conditions.chcheConditions.isCBearish ? "conditions.chcheConditions.isCBearish &&" + "\n" : "") + + (conditions.chcheConditions.isCStrongBullish ? "conditions.chcheConditions.isCStrongBullish &&" + "\n" : "") + + (conditions.chcheConditions.isCStrongBearish ? "conditions.chcheConditions.isCStrongBearish &&" + "\n" : "") + + (conditions.chcheConditions.isCSwitchedToBullish ? "conditions.chcheConditions.isCSwitchedToBullish &&" + "\n" : "") + + (conditions.chcheConditions.isCSwitchedToBearish ? "conditions.chcheConditions.isCSwitchedToBearish &&" + "\n" : "") + + (conditions.chcheConditions.isCStrongSwitchedToBullish ? "conditions.chcheConditions.isCStrongSwitchedToBullish &&" + "\n" : "") + + (conditions.chcheConditions.isCStrongSwitchedToBearish ? "conditions.chcheConditions.isCStrongSwitchedToBearish &&" + "\n" : "") + + (conditions.chcheConditions.isSBullish ? "conditions.chcheConditions.isSBullish &&" + "\n" : "") + + (conditions.chcheConditions.isSBearish ? "conditions.chcheConditions.isSBearish &&" + "\n" : "") + + (conditions.chcheConditions.isSStrongBullish ? "conditions.chcheConditions.isSStrongBullish &&" + "\n" : "") + + (conditions.chcheConditions.isSStrongBearish ? "conditions.chcheConditions.isSStrongBearish &&" + "\n" : "") + + (conditions.chcheConditions.isSSwitchedToBullish ? "conditions.chcheConditions.isSSwitchedToBullish &&" + "\n" : "") + + (conditions.chcheConditions.isSSwitchedToBearish ? "conditions.chcheConditions.isSSwitchedToBearish &&" + "\n" : "") + + (conditions.chcheConditions.isSStrongSwitchedToBullish ? "conditions.chcheConditions.isSStrongSwitchedToBullish &&" + "\n" : "") + + (conditions.chcheConditions.isSStrongSwitchedToBearish ? "conditions.chcheConditions.isSStrongSwitchedToBearish &&" + "\n" : "") + + (conditions.chcheConditions.isMBullish ? "conditions.chcheConditions.isMBullish &&" + "\n" : "") + + (conditions.chcheConditions.isMBearish ? "conditions.chcheConditions.isMBearish &&" + "\n" : "") + + (conditions.chcheConditions.isMStrongBullish ? "conditions.chcheConditions.isMStrongBullish &&" + "\n" : "") + + (conditions.chcheConditions.isMStrongBearish ? "conditions.chcheConditions.isMStrongBearish &&" + "\n" : "") + + (conditions.chcheConditions.isMSwitchedToBullish ? "conditions.chcheConditions.isMSwitchedToBullish &&" + "\n" : "") + + (conditions.chcheConditions.isMSwitchedToBearish ? "conditions.chcheConditions.isMSwitchedToBearish &&" + "\n" : "") + + (conditions.chcheConditions.isMStrongSwitchedToBullish ? "conditions.chcheConditions.isMStrongSwitchedToBullish &&" + "\n" : "") + + (conditions.chcheConditions.isMStrongSwitchedToBearish ? "conditions.chcheConditions.isMStrongSwitchedToBearish &&" + "\n" : "") + + (conditions.chcheConditions.isLBullish ? "conditions.chcheConditions.isLBullish &&" + "\n" : "") + + (conditions.chcheConditions.isLBearish ? "conditions.chcheConditions.isLBearish &&" + "\n" : "") + + (conditions.chcheConditions.isLStrongBullish ? "conditions.chcheConditions.isLStrongBullish &&" + "\n" : "") + + (conditions.chcheConditions.isLStrongBearish ? "conditions.chcheConditions.isLStrongBearish &&" + "\n" : "") + + (conditions.chcheConditions.isLSwitchedToBullish ? "conditions.chcheConditions.isLSwitchedToBullish &&" + "\n" : "") + + (conditions.chcheConditions.isLSwitchedToBearish ? "conditions.chcheConditions.isLSwitchedToBearish &&" + "\n" : "") + + (conditions.chcheConditions.isLStrongSwitchedToBullish ? "conditions.chcheConditions.isLStrongSwitchedToBullish &&" + "\n" : "") + + (conditions.chcheConditions.isLStrongSwitchedToBearish ? "conditions.chcheConditions.isLStrongSwitchedToBearish &&" + "\n" : "") + + (conditions.chcheConditions.isHBullish ? "conditions.chcheConditions.isHBullish &&" + "\n" : "") + + (conditions.chcheConditions.isHBearish ? "conditions.chcheConditions.isHBearish &&" + "\n" : "") + + (conditions.chcheConditions.isHStrongBullish ? "conditions.chcheConditions.isHStrongBullish &&" + "\n" : "") + + (conditions.chcheConditions.isHStrongBearish ? "conditions.chcheConditions.isHStrongBearish &&" + "\n" : "") + + (conditions.chcheConditions.isHSwitchedToBullish ? "conditions.chcheConditions.isHSwitchedToBullish &&" + "\n" : "") + + (conditions.chcheConditions.isHSwitchedToBearish ? "conditions.chcheConditions.isHSwitchedToBearish &&" + "\n" : "") + + (conditions.chcheConditions.isHStrongSwitchedToBullish ? "conditions.chcheConditions.isHStrongSwitchedToBullish &&" + "\n" : "") + + (conditions.chcheConditions.isHStrongSwitchedToBearish ? "conditions.chcheConditions.isHStrongSwitchedToBearish &&" + "\n" : "") + + // "//" + "\n" + + // (!conditions.chcheConditions.hasBullishPower ? "!conditions.chcheConditions.hasBullishPower &&" + "\n" : "") + + // (!conditions.chcheConditions.hasBearishPower ? "!conditions.chcheConditions.hasBearishPower &&" + "\n" : "") + + // (!conditions.chcheConditions.isBullishPowerUp ? "!conditions.chcheConditions.isBullishPowerUp &&" + "\n" : "") + + // (!conditions.chcheConditions.isBearishPowerUp ? "!conditions.chcheConditions.isBearishPowerUp &&" + "\n" : "") + + // (!conditions.chcheConditions.isBullishPowerIncreasing ? "!conditions.chcheConditions.isBullishPowerIncreasing &&" + "\n" : "") + + // (!conditions.chcheConditions.isBullishPowerDecreasing ? "!conditions.chcheConditions.isBullishPowerDecreasing &&" + "\n" : "") + + // (!conditions.chcheConditions.isBearishPowerIncreasing ? "!conditions.chcheConditions.isBearishPowerIncreasing &&" + "\n" : "") + + // (!conditions.chcheConditions.isBearishPowerDecreasing ? "!conditions.chcheConditions.isBearishPowerDecreasing &&" + "\n" : "") + + // (!conditions.chcheConditions.isCBullish ? "!conditions.chcheConditions.isCBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isCBearish ? "!conditions.chcheConditions.isCBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isCStrongBullish ? "!conditions.chcheConditions.isCStrongBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isCStrongBearish ? "!conditions.chcheConditions.isCStrongBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isCSwitchedToBullish ? "!conditions.chcheConditions.isCSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isCSwitchedToBearish ? "!conditions.chcheConditions.isCSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isCStrongSwitchedToBullish ? "!conditions.chcheConditions.isCStrongSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isCStrongSwitchedToBearish ? "!conditions.chcheConditions.isCStrongSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isSBullish ? "!conditions.chcheConditions.isSBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isSBearish ? "!conditions.chcheConditions.isSBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isSStrongBullish ? "!conditions.chcheConditions.isSStrongBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isSStrongBearish ? "!conditions.chcheConditions.isSStrongBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isSSwitchedToBullish ? "!conditions.chcheConditions.isSSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isSSwitchedToBearish ? "!conditions.chcheConditions.isSSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isSStrongSwitchedToBullish ? "!conditions.chcheConditions.isSStrongSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isSStrongSwitchedToBearish ? "!conditions.chcheConditions.isSStrongSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isMBullish ? "!conditions.chcheConditions.isMBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isMBearish ? "!conditions.chcheConditions.isMBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isMStrongBullish ? "!conditions.chcheConditions.isMStrongBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isMStrongBearish ? "!conditions.chcheConditions.isMStrongBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isMSwitchedToBullish ? "!conditions.chcheConditions.isMSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isMSwitchedToBearish ? "!conditions.chcheConditions.isMSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isMStrongSwitchedToBullish ? "!conditions.chcheConditions.isMStrongSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isMStrongSwitchedToBearish ? "!conditions.chcheConditions.isMStrongSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isLBullish ? "!conditions.chcheConditions.isLBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isLBearish ? "!conditions.chcheConditions.isLBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isLStrongBullish ? "!conditions.chcheConditions.isLStrongBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isLStrongBearish ? "!conditions.chcheConditions.isLStrongBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isLSwitchedToBullish ? "!conditions.chcheConditions.isLSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isLSwitchedToBearish ? "!conditions.chcheConditions.isLSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isLStrongSwitchedToBullish ? "!conditions.chcheConditions.isLStrongSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isLStrongSwitchedToBearish ? "!conditions.chcheConditions.isLStrongSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isHBullish ? "!conditions.chcheConditions.isHBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isHBearish ? "!conditions.chcheConditions.isHBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isHStrongBullish ? "!conditions.chcheConditions.isHStrongBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isHStrongBearish ? "!conditions.chcheConditions.isHStrongBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isHSwitchedToBullish ? "!conditions.chcheConditions.isHSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isHSwitchedToBearish ? "!conditions.chcheConditions.isHSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chcheConditions.isHStrongSwitchedToBullish ? "!conditions.chcheConditions.isHStrongSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chcheConditions.isHStrongSwitchedToBearish ? "!conditions.chcheConditions.isHStrongSwitchedToBearish &&" + "\n" : "") + + "//" + "\n" + + "// XCHSTR ..." + "\n" + + "//" + "\n" + + (conditions.chstrConditions.hasBullishPower ? "conditions.chstrConditions.hasBullishPower &&" + "\n" : "") + + (conditions.chstrConditions.hasBearishPower ? "conditions.chstrConditions.hasBearishPower &&" + "\n" : "") + + (conditions.chstrConditions.isBullishPowerUp ? "conditions.chstrConditions.isBullishPowerUp &&" + "\n" : "") + + (conditions.chstrConditions.isBearishPowerUp ? "conditions.chstrConditions.isBearishPowerUp &&" + "\n" : "") + + (conditions.chstrConditions.isBullishPowerIncreasing ? "conditions.chstrConditions.isBullishPowerIncreasing &&" + "\n" : "") + + (conditions.chstrConditions.isBullishPowerDecreasing ? "conditions.chstrConditions.isBullishPowerDecreasing &&" + "\n" : "") + + (conditions.chstrConditions.isBearishPowerIncreasing ? "conditions.chstrConditions.isBearishPowerIncreasing &&" + "\n" : "") + + (conditions.chstrConditions.isBearishPowerDecreasing ? "conditions.chstrConditions.isBearishPowerDecreasing &&" + "\n" : "") + + (conditions.chstrConditions.isCBullish ? "conditions.chstrConditions.isCBullish &&" + "\n" : "") + + (conditions.chstrConditions.isCBearish ? "conditions.chstrConditions.isCBearish &&" + "\n" : "") + + (conditions.chstrConditions.isCSwitchedToBullish ? "conditions.chstrConditions.isCSwitchedToBullish &&" + "\n" : "") + + (conditions.chstrConditions.isCSwitchedToBearish ? "conditions.chstrConditions.isCSwitchedToBearish &&" + "\n" : "") + + (conditions.chstrConditions.isSBullish ? "conditions.chstrConditions.isSBullish &&" + "\n" : "") + + (conditions.chstrConditions.isSBearish ? "conditions.chstrConditions.isSBearish &&" + "\n" : "") + + (conditions.chstrConditions.isSSwitchedToBullish ? "conditions.chstrConditions.isSSwitchedToBullish &&" + "\n" : "") + + (conditions.chstrConditions.isSSwitchedToBearish ? "conditions.chstrConditions.isSSwitchedToBearish &&" + "\n" : "") + + (conditions.chstrConditions.isMBullish ? "conditions.chstrConditions.isMBullish &&" + "\n" : "") + + (conditions.chstrConditions.isMBearish ? "conditions.chstrConditions.isMBearish &&" + "\n" : "") + + (conditions.chstrConditions.isMSwitchedToBullish ? "conditions.chstrConditions.isMSwitchedToBullish &&" + "\n" : "") + + (conditions.chstrConditions.isMSwitchedToBearish ? "conditions.chstrConditions.isMSwitchedToBearish &&" + "\n" : "") + + (conditions.chstrConditions.isLBullish ? "conditions.chstrConditions.isLBullish &&" + "\n" : "") + + (conditions.chstrConditions.isLBearish ? "conditions.chstrConditions.isLBearish &&" + "\n" : "") + + (conditions.chstrConditions.isLSwitchedToBullish ? "conditions.chstrConditions.isLSwitchedToBullish &&" + "\n" : "") + + (conditions.chstrConditions.isLSwitchedToBearish ? "conditions.chstrConditions.isLSwitchedToBearish &&" + "\n" : "") + + (conditions.chstrConditions.isHBullish ? "conditions.chstrConditions.isHBullish &&" + "\n" : "") + + (conditions.chstrConditions.isHBearish ? "conditions.chstrConditions.isHBearish &&" + "\n" : "") + + (conditions.chstrConditions.isHSwitchedToBullish ? "conditions.chstrConditions.isHSwitchedToBullish &&" + "\n" : "") + + (conditions.chstrConditions.isHSwitchedToBearish ? "conditions.chstrConditions.isHSwitchedToBearish &&" + "\n" : "") + + // "//" + "\n" + + // (!conditions.chstrConditions.hasBullishPower ? "!conditions.chstrConditions.hasBullishPower &&" + "\n" : "") + + // (!conditions.chstrConditions.hasBearishPower ? "!conditions.chstrConditions.hasBearishPower &&" + "\n" : "") + + // (!conditions.chstrConditions.isBullishPowerUp ? "!conditions.chstrConditions.isBullishPowerUp &&" + "\n" : "") + + // (!conditions.chstrConditions.isBearishPowerUp ? "!conditions.chstrConditions.isBearishPowerUp &&" + "\n" : "") + + // (!conditions.chstrConditions.isBullishPowerIncreasing ? "!conditions.chstrConditions.isBullishPowerIncreasing &&" + "\n" : "") + + // (!conditions.chstrConditions.isBullishPowerDecreasing ? "!conditions.chstrConditions.isBullishPowerDecreasing &&" + "\n" : "") + + // (!conditions.chstrConditions.isBearishPowerIncreasing ? "!conditions.chstrConditions.isBearishPowerIncreasing &&" + "\n" : "") + + // (!conditions.chstrConditions.isBearishPowerDecreasing ? "!conditions.chstrConditions.isBearishPowerDecreasing &&" + "\n" : "") + + // (!conditions.chstrConditions.isCBullish ? "!conditions.chstrConditions.isCBullish &&" + "\n" : "") + + // (!conditions.chstrConditions.isCBearish ? "!conditions.chstrConditions.isCBearish &&" + "\n" : "") + + // (!conditions.chstrConditions.isCSwitchedToBullish ? "!conditions.chstrConditions.isCSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chstrConditions.isCSwitchedToBearish ? "!conditions.chstrConditions.isCSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chstrConditions.isSBullish ? "!conditions.chstrConditions.isSBullish &&" + "\n" : "") + + // (!conditions.chstrConditions.isSBearish ? "!conditions.chstrConditions.isSBearish &&" + "\n" : "") + + // (!conditions.chstrConditions.isSSwitchedToBullish ? "!conditions.chstrConditions.isSSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chstrConditions.isSSwitchedToBearish ? "!conditions.chstrConditions.isSSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chstrConditions.isMBullish ? "!conditions.chstrConditions.isMBullish &&" + "\n" : "") + + // (!conditions.chstrConditions.isMBearish ? "!conditions.chstrConditions.isMBearish &&" + "\n" : "") + + // (!conditions.chstrConditions.isMSwitchedToBullish ? "!conditions.chstrConditions.isMSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chstrConditions.isMSwitchedToBearish ? "!conditions.chstrConditions.isMSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chstrConditions.isLBullish ? "!conditions.chstrConditions.isLBullish &&" + "\n" : "") + + // (!conditions.chstrConditions.isLBearish ? "!conditions.chstrConditions.isLBearish &&" + "\n" : "") + + // (!conditions.chstrConditions.isLSwitchedToBullish ? "!conditions.chstrConditions.isLSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chstrConditions.isLSwitchedToBearish ? "!conditions.chstrConditions.isLSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chstrConditions.isHBullish ? "!conditions.chstrConditions.isHBullish &&" + "\n" : "") + + // (!conditions.chstrConditions.isHBearish ? "!conditions.chstrConditions.isHBearish &&" + "\n" : "") + + // (!conditions.chstrConditions.isHSwitchedToBullish ? "!conditions.chstrConditions.isHSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chstrConditions.isHSwitchedToBearish ? "!conditions.chstrConditions.isHSwitchedToBearish &&" + "\n" : "") + + "//" + "\n" + + "// XCHVLM ..." + "\n" + + "//" + "\n" + + (conditions.chvlmConditions.hasBullishPower ? "conditions.chvlmConditions.hasBullishPower &&" + "\n" : "") + + (conditions.chvlmConditions.hasBearishPower ? "conditions.chvlmConditions.hasBearishPower &&" + "\n" : "") + + (conditions.chvlmConditions.isBullishPowerUp ? "conditions.chvlmConditions.isBullishPowerUp &&" + "\n" : "") + + (conditions.chvlmConditions.isBearishPowerUp ? "conditions.chvlmConditions.isBearishPowerUp &&" + "\n" : "") + + (conditions.chvlmConditions.isBullishPowerIncreasing ? "conditions.chvlmConditions.isBullishPowerIncreasing &&" + "\n" : "") + + (conditions.chvlmConditions.isBullishPowerDecreasing ? "conditions.chvlmConditions.isBullishPowerDecreasing &&" + "\n" : "") + + (conditions.chvlmConditions.isBearishPowerIncreasing ? "conditions.chvlmConditions.isBearishPowerIncreasing &&" + "\n" : "") + + (conditions.chvlmConditions.isBearishPowerDecreasing ? "conditions.chvlmConditions.isBearishPowerDecreasing &&" + "\n" : "") + + (conditions.chvlmConditions.isCBullish ? "conditions.chvlmConditions.isCBullish &&" + "\n" : "") + + (conditions.chvlmConditions.isCBearish ? "conditions.chvlmConditions.isCBearish &&" + "\n" : "") + + (conditions.chvlmConditions.isCSwitchedToBullish ? "conditions.chvlmConditions.isCSwitchedToBullish &&" + "\n" : "") + + (conditions.chvlmConditions.isCSwitchedToBearish ? "conditions.chvlmConditions.isCSwitchedToBearish &&" + "\n" : "") + + (conditions.chvlmConditions.isSBullish ? "conditions.chvlmConditions.isSBullish &&" + "\n" : "") + + (conditions.chvlmConditions.isSBearish ? "conditions.chvlmConditions.isSBearish &&" + "\n" : "") + + (conditions.chvlmConditions.isSSwitchedToBullish ? "conditions.chvlmConditions.isSSwitchedToBullish &&" + "\n" : "") + + (conditions.chvlmConditions.isSSwitchedToBearish ? "conditions.chvlmConditions.isSSwitchedToBearish &&" + "\n" : "") + + (conditions.chvlmConditions.isMBullish ? "conditions.chvlmConditions.isMBullish &&" + "\n" : "") + + (conditions.chvlmConditions.isMBearish ? "conditions.chvlmConditions.isMBearish &&" + "\n" : "") + + (conditions.chvlmConditions.isMSwitchedToBullish ? "conditions.chvlmConditions.isMSwitchedToBullish &&" + "\n" : "") + + (conditions.chvlmConditions.isMSwitchedToBearish ? "conditions.chvlmConditions.isMSwitchedToBearish &&" + "\n" : "") + + (conditions.chvlmConditions.isLBullish ? "conditions.chvlmConditions.isLBullish &&" + "\n" : "") + + (conditions.chvlmConditions.isLBearish ? "conditions.chvlmConditions.isLBearish &&" + "\n" : "") + + (conditions.chvlmConditions.isLSwitchedToBullish ? "conditions.chvlmConditions.isLSwitchedToBullish &&" + "\n" : "") + + (conditions.chvlmConditions.isLSwitchedToBearish ? "conditions.chvlmConditions.isLSwitchedToBearish &&" + "\n" : "") + + (conditions.chvlmConditions.isHBullish ? "conditions.chvlmConditions.isHBullish &&" + "\n" : "") + + (conditions.chvlmConditions.isHBearish ? "conditions.chvlmConditions.isHBearish &&" + "\n" : "") + + (conditions.chvlmConditions.isHSwitchedToBullish ? "conditions.chvlmConditions.isHSwitchedToBullish &&" + "\n" : "") + + (conditions.chvlmConditions.isHSwitchedToBearish ? "conditions.chvlmConditions.isHSwitchedToBearish &&" + "\n" : "") + + // "//" + "\n" + + // (!conditions.chvlmConditions.hasBullishPower ? "!conditions.chvlmConditions.hasBullishPower &&" + "\n" : "") + + // (!conditions.chvlmConditions.hasBearishPower ? "!conditions.chvlmConditions.hasBearishPower &&" + "\n" : "") + + // (!conditions.chvlmConditions.isBullishPowerUp ? "!conditions.chvlmConditions.isBullishPowerUp &&" + "\n" : "") + + // (!conditions.chvlmConditions.isBearishPowerUp ? "!conditions.chvlmConditions.isBearishPowerUp &&" + "\n" : "") + + // (!conditions.chvlmConditions.isBullishPowerIncreasing ? "!conditions.chvlmConditions.isBullishPowerIncreasing &&" + "\n" : "") + + // (!conditions.chvlmConditions.isBullishPowerDecreasing ? "!conditions.chvlmConditions.isBullishPowerDecreasing &&" + "\n" : "") + + // (!conditions.chvlmConditions.isBearishPowerIncreasing ? "!conditions.chvlmConditions.isBearishPowerIncreasing &&" + "\n" : "") + + // (!conditions.chvlmConditions.isBearishPowerDecreasing ? "!conditions.chvlmConditions.isBearishPowerDecreasing &&" + "\n" : "") + + // (!conditions.chvlmConditions.isCBullish ? "!conditions.chvlmConditions.isCBullish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isCBearish ? "!conditions.chvlmConditions.isCBearish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isCSwitchedToBullish ? "!conditions.chvlmConditions.isCSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isCSwitchedToBearish ? "!conditions.chvlmConditions.isCSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isSBullish ? "!conditions.chvlmConditions.isSBullish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isSBearish ? "!conditions.chvlmConditions.isSBearish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isSSwitchedToBullish ? "!conditions.chvlmConditions.isSSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isSSwitchedToBearish ? "!conditions.chvlmConditions.isSSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isMBullish ? "!conditions.chvlmConditions.isMBullish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isMBearish ? "!conditions.chvlmConditions.isMBearish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isMSwitchedToBullish ? "!conditions.chvlmConditions.isMSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isMSwitchedToBearish ? "!conditions.chvlmConditions.isMSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isLBullish ? "!conditions.chvlmConditions.isLBullish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isLBearish ? "!conditions.chvlmConditions.isLBearish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isLSwitchedToBullish ? "!conditions.chvlmConditions.isLSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isLSwitchedToBearish ? "!conditions.chvlmConditions.isLSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isHBullish ? "!conditions.chvlmConditions.isHBullish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isHBearish ? "!conditions.chvlmConditions.isHBearish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isHSwitchedToBullish ? "!conditions.chvlmConditions.isHSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chvlmConditions.isHSwitchedToBearish ? "!conditions.chvlmConditions.isHSwitchedToBearish &&" + "\n" : "") + + "//" + "\n" + + "// XCHVWAP ..." + "\n" + + "//" + "\n" + + (conditions.chvwapConditions.hasBullishPower ? "conditions.chvwapConditions.hasBullishPower &&" + "\n" : "") + + (conditions.chvwapConditions.hasBearishPower ? "conditions.chvwapConditions.hasBearishPower &&" + "\n" : "") + + (conditions.chvwapConditions.isBullishPowerUp ? "conditions.chvwapConditions.isBullishPowerUp &&" + "\n" : "") + + (conditions.chvwapConditions.isBearishPowerUp ? "conditions.chvwapConditions.isBearishPowerUp &&" + "\n" : "") + + (conditions.chvwapConditions.isBullishPowerIncreasing ? "conditions.chvwapConditions.isBullishPowerIncreasing &&" + "\n" : "") + + (conditions.chvwapConditions.isBullishPowerDecreasing ? "conditions.chvwapConditions.isBullishPowerDecreasing &&" + "\n" : "") + + (conditions.chvwapConditions.isBearishPowerIncreasing ? "conditions.chvwapConditions.isBearishPowerIncreasing &&" + "\n" : "") + + (conditions.chvwapConditions.isBearishPowerDecreasing ? "conditions.chvwapConditions.isBearishPowerDecreasing &&" + "\n" : "") + + (conditions.chvwapConditions.isSBullish ? "conditions.chvwapConditions.isSBullish &&" + "\n" : "") + + (conditions.chvwapConditions.isSBearish ? "conditions.chvwapConditions.isSBearish &&" + "\n" : "") + + (conditions.chvwapConditions.isSSwitchedToBullish ? "conditions.chvwapConditions.isSSwitchedToBullish &&" + "\n" : "") + + (conditions.chvwapConditions.isSSwitchedToBearish ? "conditions.chvwapConditions.isSSwitchedToBearish &&" + "\n" : "") + + (conditions.chvwapConditions.isMBullish ? "conditions.chvwapConditions.isMBullish &&" + "\n" : "") + + (conditions.chvwapConditions.isMBearish ? "conditions.chvwapConditions.isMBearish &&" + "\n" : "") + + (conditions.chvwapConditions.isMSwitchedToBullish ? "conditions.chvwapConditions.isMSwitchedToBullish &&" + "\n" : "") + + (conditions.chvwapConditions.isMSwitchedToBearish ? "conditions.chvwapConditions.isMSwitchedToBearish &&" + "\n" : "") + + (conditions.chvwapConditions.isLBullish ? "conditions.chvwapConditions.isLBullish &&" + "\n" : "") + + (conditions.chvwapConditions.isLBearish ? "conditions.chvwapConditions.isLBearish &&" + "\n" : "") + + (conditions.chvwapConditions.isLSwitchedToBullish ? "conditions.chvwapConditions.isLSwitchedToBullish &&" + "\n" : "") + + (conditions.chvwapConditions.isLSwitchedToBearish ? "conditions.chvwapConditions.isLSwitchedToBearish &&" + "\n" : "") + + (conditions.chvwapConditions.isHBullish ? "conditions.chvwapConditions.isHBullish &&" + "\n" : "") + + (conditions.chvwapConditions.isHBearish ? "conditions.chvwapConditions.isHBearish &&" + "\n" : "") + + (conditions.chvwapConditions.isHSwitchedToBullish ? "conditions.chvwapConditions.isHSwitchedToBullish &&" + "\n" : "") + + (conditions.chvwapConditions.isHSwitchedToBearish ? "conditions.chvwapConditions.isHSwitchedToBearish &&" + "\n" : "") + + // "//" + "\n" + + // (!conditions.chvwapConditions.hasBullishPower ? "!conditions.chvwapConditions.hasBullishPower &&" + "\n" : "") + + // (!conditions.chvwapConditions.hasBearishPower ? "!conditions.chvwapConditions.hasBearishPower &&" + "\n" : "") + + // (!conditions.chvwapConditions.isBullishPowerUp ? "!conditions.chvwapConditions.isBullishPowerUp &&" + "\n" : "") + + // (!conditions.chvwapConditions.isBearishPowerUp ? "!conditions.chvwapConditions.isBearishPowerUp &&" + "\n" : "") + + // (!conditions.chvwapConditions.isBullishPowerIncreasing ? "!conditions.chvwapConditions.isBullishPowerIncreasing &&" + "\n" : "") + + // (!conditions.chvwapConditions.isBullishPowerDecreasing ? "!conditions.chvwapConditions.isBullishPowerDecreasing &&" + "\n" : "") + + // (!conditions.chvwapConditions.isBearishPowerIncreasing ? "!conditions.chvwapConditions.isBearishPowerIncreasing &&" + "\n" : "") + + // (!conditions.chvwapConditions.isBearishPowerDecreasing ? "!conditions.chvwapConditions.isBearishPowerDecreasing &&" + "\n" : "") + + // (!conditions.chvwapConditions.isSBullish ? "!conditions.chvwapConditions.isSBullish &&" + "\n" : "") + + // (!conditions.chvwapConditions.isSBearish ? "!conditions.chvwapConditions.isSBearish &&" + "\n" : "") + + // (!conditions.chvwapConditions.isSSwitchedToBullish ? "!conditions.chvwapConditions.isSSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chvwapConditions.isSSwitchedToBearish ? "!conditions.chvwapConditions.isSSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chvwapConditions.isMBullish ? "!conditions.chvwapConditions.isMBullish &&" + "\n" : "") + + // (!conditions.chvwapConditions.isMBearish ? "!conditions.chvwapConditions.isMBearish &&" + "\n" : "") + + // (!conditions.chvwapConditions.isMSwitchedToBullish ? "!conditions.chvwapConditions.isMSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chvwapConditions.isMSwitchedToBearish ? "!conditions.chvwapConditions.isMSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chvwapConditions.isLBullish ? "!conditions.chvwapConditions.isLBullish &&" + "\n" : "") + + // (!conditions.chvwapConditions.isLBearish ? "!conditions.chvwapConditions.isLBearish &&" + "\n" : "") + + // (!conditions.chvwapConditions.isLSwitchedToBullish ? "!conditions.chvwapConditions.isLSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chvwapConditions.isLSwitchedToBearish ? "!conditions.chvwapConditions.isLSwitchedToBearish &&" + "\n" : "") + + // (!conditions.chvwapConditions.isHBullish ? "!conditions.chvwapConditions.isHBullish &&" + "\n" : "") + + // (!conditions.chvwapConditions.isHBearish ? "!conditions.chvwapConditions.isHBearish &&" + "\n" : "") + + // (!conditions.chvwapConditions.isHSwitchedToBullish ? "!conditions.chvwapConditions.isHSwitchedToBullish &&" + "\n" : "") + + // (!conditions.chvwapConditions.isHSwitchedToBearish ? "!conditions.chvwapConditions.isHSwitchedToBearish &&" + "\n" : "") + + "//" + "\n" + + "// XCHICH ..." + "\n" + + "//" + "\n" + + (conditions.chichConditions.isCClosedOverKijunSen ? "conditions.chichConditions.isCClosedOverKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isCClosedUnderKijunSen ? "conditions.chichConditions.isCClosedUnderKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isCTenkanSenOverKijunSen ? "conditions.chichConditions.isCTenkanSenOverKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isCTenkanSenUnderKijunSen ? "conditions.chichConditions.isCTenkanSenUnderKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isCTenkanSenCrossedOverKijunSen ? "conditions.chichConditions.isCTenkanSenCrossedOverKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isCTenkanSenCrossedUnderKijunSen ? "conditions.chichConditions.isCTenkanSenCrossedUnderKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isCSenkouSpanAOverB ? "conditions.chichConditions.isCSenkouSpanAOverB &&" + "\n" : "") + + (conditions.chichConditions.isCSenkouSpanAUnderB ? "conditions.chichConditions.isCSenkouSpanAUnderB &&" + "\n" : "") + + (conditions.chichConditions.isCSenkouSpanAOverLast ? "conditions.chichConditions.isCSenkouSpanAOverLast &&" + "\n" : "") + + (conditions.chichConditions.isCSenkouSpanAUnderLast ? "conditions.chichConditions.isCSenkouSpanAUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isCFutureSenkouSpanAOverB ? "conditions.chichConditions.isCFutureSenkouSpanAOverB &&" + "\n" : "") + + (conditions.chichConditions.isCFutureSenkouSpanAUnderB ? "conditions.chichConditions.isCFutureSenkouSpanAUnderB &&" + "\n" : "") + + (conditions.chichConditions.isCFutureSenkouSpanAOverLast ? "conditions.chichConditions.isCFutureSenkouSpanAOverLast &&" + "\n" : "") + + (conditions.chichConditions.isCFutureSenkouSpanAUnderLast ? "conditions.chichConditions.isCFutureSenkouSpanAUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isCSenkouSpanACrossedOverB ? "conditions.chichConditions.isCSenkouSpanACrossedOverB &&" + "\n" : "") + + (conditions.chichConditions.isCSenkouSpanACrossedUnderB ? "conditions.chichConditions.isCSenkouSpanACrossedUnderB &&" + "\n" : "") + + (conditions.chichConditions.isCSenkouSpanACrossedOverLast ? "conditions.chichConditions.isCSenkouSpanACrossedOverLast &&" + "\n" : "") + + (conditions.chichConditions.isCSenkouSpanACrossedUnderLast ? "conditions.chichConditions.isCSenkouSpanACrossedUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isCFutureSenkouSpanACrossedOverB ? "conditions.chichConditions.isCFutureSenkouSpanACrossedOverB &&" + "\n" : "") + + (conditions.chichConditions.isCFutureSenkouSpanACrossedUnderB ? "conditions.chichConditions.isCFutureSenkouSpanACrossedUnderB &&" + "\n" : "") + + (conditions.chichConditions.isCFutureSenkouSpanACrossedOverLast ? "conditions.chichConditions.isCFutureSenkouSpanACrossedOverLast &&" + "\n" : "") + + (conditions.chichConditions.isCFutureSenkouSpanACrossedUnderLast ? "conditions.chichConditions.isCFutureSenkouSpanACrossedUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isSClosedOverKijunSen ? "conditions.chichConditions.isSClosedOverKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isSClosedUnderKijunSen ? "conditions.chichConditions.isSClosedUnderKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isSTenkanSenOverKijunSen ? "conditions.chichConditions.isSTenkanSenOverKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isSTenkanSenUnderKijunSen ? "conditions.chichConditions.isSTenkanSenUnderKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isSTenkanSenCrossedOverKijunSen ? "conditions.chichConditions.isSTenkanSenCrossedOverKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isSTenkanSenCrossedUnderKijunSen ? "conditions.chichConditions.isSTenkanSenCrossedUnderKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isSSenkouSpanAOverB ? "conditions.chichConditions.isSSenkouSpanAOverB &&" + "\n" : "") + + (conditions.chichConditions.isSSenkouSpanAUnderB ? "conditions.chichConditions.isSSenkouSpanAUnderB &&" + "\n" : "") + + (conditions.chichConditions.isSSenkouSpanAOverLast ? "conditions.chichConditions.isSSenkouSpanAOverLast &&" + "\n" : "") + + (conditions.chichConditions.isSSenkouSpanAUnderLast ? "conditions.chichConditions.isSSenkouSpanAUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isSFutureSenkouSpanAOverB ? "conditions.chichConditions.isSFutureSenkouSpanAOverB &&" + "\n" : "") + + (conditions.chichConditions.isSFutureSenkouSpanAUnderB ? "conditions.chichConditions.isSFutureSenkouSpanAUnderB &&" + "\n" : "") + + (conditions.chichConditions.isSFutureSenkouSpanAOverLast ? "conditions.chichConditions.isSFutureSenkouSpanAOverLast &&" + "\n" : "") + + (conditions.chichConditions.isSFutureSenkouSpanAUnderLast ? "conditions.chichConditions.isSFutureSenkouSpanAUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isSSenkouSpanACrossedOverB ? "conditions.chichConditions.isSSenkouSpanACrossedOverB &&" + "\n" : "") + + (conditions.chichConditions.isSSenkouSpanACrossedUnderB ? "conditions.chichConditions.isSSenkouSpanACrossedUnderB &&" + "\n" : "") + + (conditions.chichConditions.isSSenkouSpanACrossedOverLast ? "conditions.chichConditions.isSSenkouSpanACrossedOverLast &&" + "\n" : "") + + (conditions.chichConditions.isSSenkouSpanACrossedUnderLast ? "conditions.chichConditions.isSSenkouSpanACrossedUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isSFutureSenkouSpanACrossedOverB ? "conditions.chichConditions.isSFutureSenkouSpanACrossedOverB &&" + "\n" : "") + + (conditions.chichConditions.isSFutureSenkouSpanACrossedUnderB ? "conditions.chichConditions.isSFutureSenkouSpanACrossedUnderB &&" + "\n" : "") + + (conditions.chichConditions.isSFutureSenkouSpanACrossedOverLast ? "conditions.chichConditions.isSFutureSenkouSpanACrossedOverLast &&" + "\n" : "") + + (conditions.chichConditions.isSFutureSenkouSpanACrossedUnderLast ? "conditions.chichConditions.isSFutureSenkouSpanACrossedUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isMClosedOverKijunSen ? "conditions.chichConditions.isMClosedOverKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isMClosedUnderKijunSen ? "conditions.chichConditions.isMClosedUnderKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isMTenkanSenOverKijunSen ? "conditions.chichConditions.isMTenkanSenOverKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isMTenkanSenUnderKijunSen ? "conditions.chichConditions.isMTenkanSenUnderKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isMTenkanSenCrossedOverKijunSen ? "conditions.chichConditions.isMTenkanSenCrossedOverKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isMTenkanSenCrossedUnderKijunSen ? "conditions.chichConditions.isMTenkanSenCrossedUnderKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isMSenkouSpanAOverB ? "conditions.chichConditions.isMSenkouSpanAOverB &&" + "\n" : "") + + (conditions.chichConditions.isMSenkouSpanAUnderB ? "conditions.chichConditions.isMSenkouSpanAUnderB &&" + "\n" : "") + + (conditions.chichConditions.isMSenkouSpanAOverLast ? "conditions.chichConditions.isMSenkouSpanAOverLast &&" + "\n" : "") + + (conditions.chichConditions.isMSenkouSpanAUnderLast ? "conditions.chichConditions.isMSenkouSpanAUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isMFutureSenkouSpanAOverB ? "conditions.chichConditions.isMFutureSenkouSpanAOverB &&" + "\n" : "") + + (conditions.chichConditions.isMFutureSenkouSpanAUnderB ? "conditions.chichConditions.isMFutureSenkouSpanAUnderB &&" + "\n" : "") + + (conditions.chichConditions.isMFutureSenkouSpanAOverLast ? "conditions.chichConditions.isMFutureSenkouSpanAOverLast &&" + "\n" : "") + + (conditions.chichConditions.isMFutureSenkouSpanAUnderLast ? "conditions.chichConditions.isMFutureSenkouSpanAUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isMSenkouSpanACrossedOverB ? "conditions.chichConditions.isMSenkouSpanACrossedOverB &&" + "\n" : "") + + (conditions.chichConditions.isMSenkouSpanACrossedUnderB ? "conditions.chichConditions.isMSenkouSpanACrossedUnderB &&" + "\n" : "") + + (conditions.chichConditions.isMSenkouSpanACrossedOverLast ? "conditions.chichConditions.isMSenkouSpanACrossedOverLast &&" + "\n" : "") + + (conditions.chichConditions.isMSenkouSpanACrossedUnderLast ? "conditions.chichConditions.isMSenkouSpanACrossedUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isMFutureSenkouSpanACrossedOverB ? "conditions.chichConditions.isMFutureSenkouSpanACrossedOverB &&" + "\n" : "") + + (conditions.chichConditions.isMFutureSenkouSpanACrossedUnderB ? "conditions.chichConditions.isMFutureSenkouSpanACrossedUnderB &&" + "\n" : "") + + (conditions.chichConditions.isMFutureSenkouSpanACrossedOverLast ? "conditions.chichConditions.isMFutureSenkouSpanACrossedOverLast &&" + "\n" : "") + + (conditions.chichConditions.isMFutureSenkouSpanACrossedUnderLast ? "conditions.chichConditions.isMFutureSenkouSpanACrossedUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isLClosedOverKijunSen ? "conditions.chichConditions.isLClosedOverKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isLClosedUnderKijunSen ? "conditions.chichConditions.isLClosedUnderKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isLTenkanSenOverKijunSen ? "conditions.chichConditions.isLTenkanSenOverKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isLTenkanSenUnderKijunSen ? "conditions.chichConditions.isLTenkanSenUnderKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isLTenkanSenCrossedOverKijunSen ? "conditions.chichConditions.isLTenkanSenCrossedOverKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isLTenkanSenCrossedUnderKijunSen ? "conditions.chichConditions.isLTenkanSenCrossedUnderKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isLSenkouSpanAOverB ? "conditions.chichConditions.isLSenkouSpanAOverB &&" + "\n" : "") + + (conditions.chichConditions.isLSenkouSpanAUnderB ? "conditions.chichConditions.isLSenkouSpanAUnderB &&" + "\n" : "") + + (conditions.chichConditions.isLSenkouSpanAOverLast ? "conditions.chichConditions.isLSenkouSpanAOverLast &&" + "\n" : "") + + (conditions.chichConditions.isLSenkouSpanAUnderLast ? "conditions.chichConditions.isLSenkouSpanAUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isLFutureSenkouSpanAOverB ? "conditions.chichConditions.isLFutureSenkouSpanAOverB &&" + "\n" : "") + + (conditions.chichConditions.isLFutureSenkouSpanAUnderB ? "conditions.chichConditions.isLFutureSenkouSpanAUnderB &&" + "\n" : "") + + (conditions.chichConditions.isLFutureSenkouSpanAOverLast ? "conditions.chichConditions.isLFutureSenkouSpanAOverLast &&" + "\n" : "") + + (conditions.chichConditions.isLFutureSenkouSpanAUnderLast ? "conditions.chichConditions.isLFutureSenkouSpanAUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isLSenkouSpanACrossedOverB ? "conditions.chichConditions.isLSenkouSpanACrossedOverB &&" + "\n" : "") + + (conditions.chichConditions.isLSenkouSpanACrossedUnderB ? "conditions.chichConditions.isLSenkouSpanACrossedUnderB &&" + "\n" : "") + + (conditions.chichConditions.isLSenkouSpanACrossedOverLast ? "conditions.chichConditions.isLSenkouSpanACrossedOverLast &&" + "\n" : "") + + (conditions.chichConditions.isLSenkouSpanACrossedUnderLast ? "conditions.chichConditions.isLSenkouSpanACrossedUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isLFutureSenkouSpanACrossedOverB ? "conditions.chichConditions.isLFutureSenkouSpanACrossedOverB &&" + "\n" : "") + + (conditions.chichConditions.isLFutureSenkouSpanACrossedUnderB ? "conditions.chichConditions.isLFutureSenkouSpanACrossedUnderB &&" + "\n" : "") + + (conditions.chichConditions.isLFutureSenkouSpanACrossedOverLast ? "conditions.chichConditions.isLFutureSenkouSpanACrossedOverLast &&" + "\n" : "") + + (conditions.chichConditions.isLFutureSenkouSpanACrossedUnderLast ? "conditions.chichConditions.isLFutureSenkouSpanACrossedUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isHClosedOverKijunSen ? "conditions.chichConditions.isHClosedOverKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isHClosedUnderKijunSen ? "conditions.chichConditions.isHClosedUnderKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isHTenkanSenOverKijunSen ? "conditions.chichConditions.isHTenkanSenOverKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isHTenkanSenUnderKijunSen ? "conditions.chichConditions.isHTenkanSenUnderKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isHTenkanSenCrossedOverKijunSen ? "conditions.chichConditions.isHTenkanSenCrossedOverKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isHTenkanSenCrossedUnderKijunSen ? "conditions.chichConditions.isHTenkanSenCrossedUnderKijunSen &&" + "\n" : "") + + (conditions.chichConditions.isHSenkouSpanAOverB ? "conditions.chichConditions.isHSenkouSpanAOverB &&" + "\n" : "") + + (conditions.chichConditions.isHSenkouSpanAUnderB ? "conditions.chichConditions.isHSenkouSpanAUnderB &&" + "\n" : "") + + (conditions.chichConditions.isHSenkouSpanAOverLast ? "conditions.chichConditions.isHSenkouSpanAOverLast &&" + "\n" : "") + + (conditions.chichConditions.isHSenkouSpanAUnderLast ? "conditions.chichConditions.isHSenkouSpanAUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isHFutureSenkouSpanAOverB ? "conditions.chichConditions.isHFutureSenkouSpanAOverB &&" + "\n" : "") + + (conditions.chichConditions.isHFutureSenkouSpanAUnderB ? "conditions.chichConditions.isHFutureSenkouSpanAUnderB &&" + "\n" : "") + + (conditions.chichConditions.isHFutureSenkouSpanAOverLast ? "conditions.chichConditions.isHFutureSenkouSpanAOverLast &&" + "\n" : "") + + (conditions.chichConditions.isHFutureSenkouSpanAUnderLast ? "conditions.chichConditions.isHFutureSenkouSpanAUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isHSenkouSpanACrossedOverB ? "conditions.chichConditions.isHSenkouSpanACrossedOverB &&" + "\n" : "") + + (conditions.chichConditions.isHSenkouSpanACrossedUnderB ? "conditions.chichConditions.isHSenkouSpanACrossedUnderB &&" + "\n" : "") + + (conditions.chichConditions.isHSenkouSpanACrossedOverLast ? "conditions.chichConditions.isHSenkouSpanACrossedOverLast &&" + "\n" : "") + + (conditions.chichConditions.isHSenkouSpanACrossedUnderLast ? "conditions.chichConditions.isHSenkouSpanACrossedUnderLast &&" + "\n" : "") + + (conditions.chichConditions.isHFutureSenkouSpanACrossedOverB ? "conditions.chichConditions.isHFutureSenkouSpanACrossedOverB &&" + "\n" : "") + + (conditions.chichConditions.isHFutureSenkouSpanACrossedUnderB ? "conditions.chichConditions.isHFutureSenkouSpanACrossedUnderB &&" + "\n" : "") + + (conditions.chichConditions.isHFutureSenkouSpanACrossedOverLast ? "conditions.chichConditions.isHFutureSenkouSpanACrossedOverLast &&" + "\n" : "") + + (conditions.chichConditions.isHFutureSenkouSpanACrossedUnderLast ? "conditions.chichConditions.isHFutureSenkouSpanACrossedUnderLast &&" + "\n" : "") + + // "//" + "\n" + + // (!conditions.chichConditions.isCClosedOverKijunSen ? "!conditions.chichConditions.isCClosedOverKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isCClosedUnderKijunSen ? "!conditions.chichConditions.isCClosedUnderKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isCTenkanSenOverKijunSen ? "!conditions.chichConditions.isCTenkanSenOverKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isCTenkanSenUnderKijunSen ? "!conditions.chichConditions.isCTenkanSenUnderKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isCTenkanSenCrossedOverKijunSen ? "!conditions.chichConditions.isCTenkanSenCrossedOverKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isCTenkanSenCrossedUnderKijunSen ? "!conditions.chichConditions.isCTenkanSenCrossedUnderKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isCSenkouSpanAOverB ? "!conditions.chichConditions.isCSenkouSpanAOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isCSenkouSpanAUnderB ? "!conditions.chichConditions.isCSenkouSpanAUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isCSenkouSpanAOverLast ? "!conditions.chichConditions.isCSenkouSpanAOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isCSenkouSpanAUnderLast ? "!conditions.chichConditions.isCSenkouSpanAUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isCFutureSenkouSpanAOverB ? "!conditions.chichConditions.isCFutureSenkouSpanAOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isCFutureSenkouSpanAUnderB ? "!conditions.chichConditions.isCFutureSenkouSpanAUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isCFutureSenkouSpanAOverLast ? "!conditions.chichConditions.isCFutureSenkouSpanAOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isCFutureSenkouSpanAUnderLast ? "!conditions.chichConditions.isCFutureSenkouSpanAUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isCSenkouSpanACrossedOverB ? "!conditions.chichConditions.isCSenkouSpanACrossedOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isCSenkouSpanACrossedUnderB ? "!conditions.chichConditions.isCSenkouSpanACrossedUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isCSenkouSpanACrossedOverLast ? "!conditions.chichConditions.isCSenkouSpanACrossedOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isCSenkouSpanACrossedUnderLast ? "!conditions.chichConditions.isCSenkouSpanACrossedUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isCFutureSenkouSpanACrossedOverB ? "!conditions.chichConditions.isCFutureSenkouSpanACrossedOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isCFutureSenkouSpanACrossedUnderB ? "!conditions.chichConditions.isCFutureSenkouSpanACrossedUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isCFutureSenkouSpanACrossedOverLast ? "!conditions.chichConditions.isCFutureSenkouSpanACrossedOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isCFutureSenkouSpanACrossedUnderLast ? "!conditions.chichConditions.isCFutureSenkouSpanACrossedUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isSClosedOverKijunSen ? "!conditions.chichConditions.isSClosedOverKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isSClosedUnderKijunSen ? "!conditions.chichConditions.isSClosedUnderKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isSTenkanSenOverKijunSen ? "!conditions.chichConditions.isSTenkanSenOverKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isSTenkanSenUnderKijunSen ? "!conditions.chichConditions.isSTenkanSenUnderKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isSTenkanSenCrossedOverKijunSen ? "!conditions.chichConditions.isSTenkanSenCrossedOverKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isSTenkanSenCrossedUnderKijunSen ? "!conditions.chichConditions.isSTenkanSenCrossedUnderKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isSSenkouSpanAOverB ? "!conditions.chichConditions.isSSenkouSpanAOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isSSenkouSpanAUnderB ? "!conditions.chichConditions.isSSenkouSpanAUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isSSenkouSpanAOverLast ? "!conditions.chichConditions.isSSenkouSpanAOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isSSenkouSpanAUnderLast ? "!conditions.chichConditions.isSSenkouSpanAUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isSFutureSenkouSpanAOverB ? "!conditions.chichConditions.isSFutureSenkouSpanAOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isSFutureSenkouSpanAUnderB ? "!conditions.chichConditions.isSFutureSenkouSpanAUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isSFutureSenkouSpanAOverLast ? "!conditions.chichConditions.isSFutureSenkouSpanAOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isSFutureSenkouSpanAUnderLast ? "!conditions.chichConditions.isSFutureSenkouSpanAUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isSSenkouSpanACrossedOverB ? "!conditions.chichConditions.isSSenkouSpanACrossedOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isSSenkouSpanACrossedUnderB ? "!conditions.chichConditions.isSSenkouSpanACrossedUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isSSenkouSpanACrossedOverLast ? "!conditions.chichConditions.isSSenkouSpanACrossedOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isSSenkouSpanACrossedUnderLast ? "!conditions.chichConditions.isSSenkouSpanACrossedUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isSFutureSenkouSpanACrossedOverB ? "!conditions.chichConditions.isSFutureSenkouSpanACrossedOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isSFutureSenkouSpanACrossedUnderB ? "!conditions.chichConditions.isSFutureSenkouSpanACrossedUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isSFutureSenkouSpanACrossedOverLast ? "!conditions.chichConditions.isSFutureSenkouSpanACrossedOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isSFutureSenkouSpanACrossedUnderLast ? "!conditions.chichConditions.isSFutureSenkouSpanACrossedUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isMClosedOverKijunSen ? "!conditions.chichConditions.isMClosedOverKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isMClosedUnderKijunSen ? "!conditions.chichConditions.isMClosedUnderKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isMTenkanSenOverKijunSen ? "!conditions.chichConditions.isMTenkanSenOverKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isMTenkanSenUnderKijunSen ? "!conditions.chichConditions.isMTenkanSenUnderKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isMTenkanSenCrossedOverKijunSen ? "!conditions.chichConditions.isMTenkanSenCrossedOverKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isMTenkanSenCrossedUnderKijunSen ? "!conditions.chichConditions.isMTenkanSenCrossedUnderKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isMSenkouSpanAOverB ? "!conditions.chichConditions.isMSenkouSpanAOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isMSenkouSpanAUnderB ? "!conditions.chichConditions.isMSenkouSpanAUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isMSenkouSpanAOverLast ? "!conditions.chichConditions.isMSenkouSpanAOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isMSenkouSpanAUnderLast ? "!conditions.chichConditions.isMSenkouSpanAUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isMFutureSenkouSpanAOverB ? "!conditions.chichConditions.isMFutureSenkouSpanAOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isMFutureSenkouSpanAUnderB ? "!conditions.chichConditions.isMFutureSenkouSpanAUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isMFutureSenkouSpanAOverLast ? "!conditions.chichConditions.isMFutureSenkouSpanAOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isMFutureSenkouSpanAUnderLast ? "!conditions.chichConditions.isMFutureSenkouSpanAUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isMSenkouSpanACrossedOverB ? "!conditions.chichConditions.isMSenkouSpanACrossedOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isMSenkouSpanACrossedUnderB ? "!conditions.chichConditions.isMSenkouSpanACrossedUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isMSenkouSpanACrossedOverLast ? "!conditions.chichConditions.isMSenkouSpanACrossedOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isMSenkouSpanACrossedUnderLast ? "!conditions.chichConditions.isMSenkouSpanACrossedUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isMFutureSenkouSpanACrossedOverB ? "!conditions.chichConditions.isMFutureSenkouSpanACrossedOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isMFutureSenkouSpanACrossedUnderB ? "!conditions.chichConditions.isMFutureSenkouSpanACrossedUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isMFutureSenkouSpanACrossedOverLast ? "!conditions.chichConditions.isMFutureSenkouSpanACrossedOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isMFutureSenkouSpanACrossedUnderLast ? "!conditions.chichConditions.isMFutureSenkouSpanACrossedUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isLClosedOverKijunSen ? "!conditions.chichConditions.isLClosedOverKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isLClosedUnderKijunSen ? "!conditions.chichConditions.isLClosedUnderKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isLTenkanSenOverKijunSen ? "!conditions.chichConditions.isLTenkanSenOverKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isLTenkanSenUnderKijunSen ? "!conditions.chichConditions.isLTenkanSenUnderKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isLTenkanSenCrossedOverKijunSen ? "!conditions.chichConditions.isLTenkanSenCrossedOverKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isLTenkanSenCrossedUnderKijunSen ? "!conditions.chichConditions.isLTenkanSenCrossedUnderKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isLSenkouSpanAOverB ? "!conditions.chichConditions.isLSenkouSpanAOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isLSenkouSpanAUnderB ? "!conditions.chichConditions.isLSenkouSpanAUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isLSenkouSpanAOverLast ? "!conditions.chichConditions.isLSenkouSpanAOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isLSenkouSpanAUnderLast ? "!conditions.chichConditions.isLSenkouSpanAUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isLFutureSenkouSpanAOverB ? "!conditions.chichConditions.isLFutureSenkouSpanAOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isLFutureSenkouSpanAUnderB ? "!conditions.chichConditions.isLFutureSenkouSpanAUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isLFutureSenkouSpanAOverLast ? "!conditions.chichConditions.isLFutureSenkouSpanAOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isLFutureSenkouSpanAUnderLast ? "!conditions.chichConditions.isLFutureSenkouSpanAUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isLSenkouSpanACrossedOverB ? "!conditions.chichConditions.isLSenkouSpanACrossedOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isLSenkouSpanACrossedUnderB ? "!conditions.chichConditions.isLSenkouSpanACrossedUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isLSenkouSpanACrossedOverLast ? "!conditions.chichConditions.isLSenkouSpanACrossedOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isLSenkouSpanACrossedUnderLast ? "!conditions.chichConditions.isLSenkouSpanACrossedUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isLFutureSenkouSpanACrossedOverB ? "!conditions.chichConditions.isLFutureSenkouSpanACrossedOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isLFutureSenkouSpanACrossedUnderB ? "!conditions.chichConditions.isLFutureSenkouSpanACrossedUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isLFutureSenkouSpanACrossedOverLast ? "!conditions.chichConditions.isLFutureSenkouSpanACrossedOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isLFutureSenkouSpanACrossedUnderLast ? "!conditions.chichConditions.isLFutureSenkouSpanACrossedUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isHClosedOverKijunSen ? "!conditions.chichConditions.isHClosedOverKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isHClosedUnderKijunSen ? "!conditions.chichConditions.isHClosedUnderKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isHTenkanSenOverKijunSen ? "!conditions.chichConditions.isHTenkanSenOverKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isHTenkanSenUnderKijunSen ? "!conditions.chichConditions.isHTenkanSenUnderKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isHTenkanSenCrossedOverKijunSen ? "!conditions.chichConditions.isHTenkanSenCrossedOverKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isHTenkanSenCrossedUnderKijunSen ? "!conditions.chichConditions.isHTenkanSenCrossedUnderKijunSen &&" + "\n" : "") + + // (!conditions.chichConditions.isHSenkouSpanAOverB ? "!conditions.chichConditions.isHSenkouSpanAOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isHSenkouSpanAUnderB ? "!conditions.chichConditions.isHSenkouSpanAUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isHSenkouSpanAOverLast ? "!conditions.chichConditions.isHSenkouSpanAOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isHSenkouSpanAUnderLast ? "!conditions.chichConditions.isHSenkouSpanAUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isHFutureSenkouSpanAOverB ? "!conditions.chichConditions.isHFutureSenkouSpanAOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isHFutureSenkouSpanAUnderB ? "!conditions.chichConditions.isHFutureSenkouSpanAUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isHFutureSenkouSpanAOverLast ? "!conditions.chichConditions.isHFutureSenkouSpanAOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isHFutureSenkouSpanAUnderLast ? "!conditions.chichConditions.isHFutureSenkouSpanAUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isHSenkouSpanACrossedOverB ? "!conditions.chichConditions.isHSenkouSpanACrossedOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isHSenkouSpanACrossedUnderB ? "!conditions.chichConditions.isHSenkouSpanACrossedUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isHSenkouSpanACrossedOverLast ? "!conditions.chichConditions.isHSenkouSpanACrossedOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isHSenkouSpanACrossedUnderLast ? "!conditions.chichConditions.isHSenkouSpanACrossedUnderLast &&" + "\n" : "") + + // (!conditions.chichConditions.isHFutureSenkouSpanACrossedOverB ? "!conditions.chichConditions.isHFutureSenkouSpanACrossedOverB &&" + "\n" : "") + + // (!conditions.chichConditions.isHFutureSenkouSpanACrossedUnderB ? "!conditions.chichConditions.isHFutureSenkouSpanACrossedUnderB &&" + "\n" : "") + + // (!conditions.chichConditions.isHFutureSenkouSpanACrossedOverLast ? "!conditions.chichConditions.isHFutureSenkouSpanACrossedOverLast &&" + "\n" : "") + + // (!conditions.chichConditions.isHFutureSenkouSpanACrossedUnderLast ? "!conditions.chichConditions.isHFutureSenkouSpanACrossedUnderLast &&" + "\n" : "") + + "//" + "\n" + + ")" + "\n" + "//" + + "\n" + + "||" + "\n" + + "//"; + + // + return result; + } + + // + bool IsFiltered( + XSignal &signal, // Provided Signal + XCHStrategyConditions &conditions, // Market Conditions + bool force = false // + ) + { + // + bool result = false; + + // + // Validate Args ... + if (!signal.IsValid() || !conditions.IsValid()) + { + // + result = true; + return result; + } + + // + string market = _account.GetCompany(); + bool isAMarkets = _marketParser.IsAMarkets(market); + + // + // bool isAMarketFiltered = _amarketsParser.IsFiltered( + // signal, + // conditions, + // force // + // ); + + // + if (!force) + { + // result = isAMarketFiltered; + } + else + { + // + result = + // + // isAMarketFiltered + // // + // || + // + false + // + ; + } + + // + return result; + } +}; + +// \ No newline at end of file diff --git a/Strategies/x-saherelm.xch.che.strategy.mq5 b/Strategies/x-saherelm.xch.che.strategy.mq5 new file mode 100644 index 00000000..f4a8a670 --- /dev/null +++ b/Strategies/x-saherelm.xch.che.strategy.mq5 @@ -0,0 +1,926 @@ +/////////////////////////////////////////////////////// +// +// SaherElm IT Center MQL5 Class Library +// -------------------------------------- +// Name: XSCXCHCHEStrategy +// Description: provides all based classes for use ... +// +// +// Maintainer: +// ------------ +// Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com) +// +////////////////////////////////////////////////////// +// +// Global Properties ... +#property library +#property copyright "Copyright 2023, SaherElm IT Center" +#property link "https://www.saherelm.ir" +#property version "1.00" +#property strict + +// +// Imports ... +#include "./x-saherelm.xch.strategy.mq5" + +// +// Definitions ... + +// +// Specific Identifier(s) of XStrategy ... +string XCHCHEStartegyToken = "XCHCHE"; + +// +// XStrategy Class Implementation(s) ... +class XSCXCHCHEStrategy : public XSCBaseStrategy +{ + // + // Public ... +public: + // + // Constructor(s) ... + void XSCXCHCHEStrategy( + // + // Base ... + string _symbol, // Trading Symbol + ENUM_TIMEFRAMES _period, // Trading TimeFrame + ENUM_TIMEFRAMES _analizePeriod, // Important Area Detect Time Frame + double _volume, // Voluem + double _r2r, // Risk/Reward Ratio + int _slippage, // Trader Slippage + long _magicNumber, // Trader Magic Number + bool _ignoreSignalExecution = false, // Ignore Signal Execution + bool _useTPSLAsPoint = false, // Converts TP and SL by Provided Points + bool _forceMaxTPSLAsPoint = false, // Force Max TP and SL by Provided Points + double _tpPoint = 0, // TP As Point + double _slPoint = 0, // SL As Point + bool _ignoreTP = false, // TP set to 0 + bool _ignoreSL = false, // SL set to 0 + bool _allowLong = true, + bool _allowShort = true, + int _maxAllowedLongs = 0, + int _maxAllowedShorts = 0 // + ) : XSCBaseStrategy(_symbol, + _period, + _analizePeriod, + _volume, + _r2r, + _slippage, + _magicNumber, + _ignoreSignalExecution, + _useTPSLAsPoint, + _forceMaxTPSLAsPoint, + _tpPoint, + _slPoint, + _ignoreTP, + _ignoreSL, + _allowLong, + _allowShort, + _maxAllowedLongs, + _maxAllowedShorts // + ) + { + // + SetAlertPrefix(GetTag()); + + // + PrepareRequirements(); + } + + // + // Deconstructor ... + void ~XSCXCHCHEStrategy() + { + // + delete pvHelper; + + // + delete chmHelper; + delete chhkHelper; + delete chstrHelper; + delete chcheHelper; + } + + // + // Getter / Setter (s) ... + + // + // Event Handlers ... + + // + // On Signal Handlers ... + void AddXCHSignalEventHandler(TOnXCHSignal handler) + { + // + Add( + handler, + mOnXCHSignalEventHandlers // + ); + } + + // + // Overrides ... + + // + // Customize Strategy Identifier ... + string GetTag() override + { + return XCHCHEStartegyToken; + } + + // + // Check Conditions For Signal ... + bool HasSignal( + XSignal &signal // + ) override + { + // + bool result = false; + + // + signal.Clean(); + + // + double sl = 0; + double tp = 0; + double risk = 0; + double entry = 0; + double reward = 0; + double r2r = R2R(); + ENUM_POSITION_TYPE type = POSITION_TYPE_BUY; + ENUM_X_ORDER_MODES mode = X_ORDER_MODE_MARKET; + + // + bool hasLong = false; + bool hasShort = false; + + // + // Retrieve Conditions ... + + // + // XPV ... + XPVConditions pvConditions; + result = pvHelper.GetConditions(pvConditions); + if (!result) + { + return result; + } + + // + // XCHM ... + XCHMConditions chmConditions; + result = chmHelper.GetConditions(chmConditions); + if (!result) + { + return result; + } + + // + // XCHHK ... + XCHHKConditions chhkConditions; + result = chhkHelper.GetConditions(chhkConditions); + if (!result) + { + return result; + } + + // + // XCHTD ... + XCHTDConditions chtdConditions; + result = chtdHelper.GetConditions(chtdConditions); + if (!result) + { + return result; + } + + // + // XCHSTR ... + XCHSTRConditions chstrConditions; + result = chstrHelper.GetConditions(chstrConditions); + if (!result) + { + return result; + } + + // + // XCHCHE ... + XCHCHEConditions chcheConditions; + result = chcheHelper.GetConditions(chcheConditions); + if (!result) + { + return result; + } + + // + // XCHVLM ... + XCHVLMConditions chvlmConditions; + result = chvlmHelper.GetConditions(chvlmConditions); + if (!result) + { + return result; + } + + // + // XCHICH ... + XCHICHConditions chichConditions; + result = chichHelper.GetConditions(chichConditions); + if (!result) + { + return result; + } + + // + // XCHVWAP ... + XCHVWAPConditions chvwapConditions; + result = chvwapHelper.GetConditions(chvwapConditions); + if (!result) + { + return result; + } + + // + // Start Calculations ... + + // + double points = GetPoints(mSymbol); + + // + int zIndex = 0; + int cIndex = zIndex + 1; + int pIndex = cIndex + 1; + int ppIndex = pIndex + 1; + + // + // Retrieve Bars ... + + // + // Last Bar ... + XOHCL cBar; + result = cBar.Init( + mSymbol, + mPeriod, + cIndex // + ); + if (!result) + { + return result; + } + + // + // Prepare Conditions ... + + // + XCHStrategyConditions conditions; + + // + conditions.symbol = mSymbol; + conditions.period = mPeriod; + conditions.time = cBar.time; + + // + conditions.pvConditions = pvConditions; + conditions.chmConditions = chmConditions; + conditions.chhkConditions = chhkConditions; + conditions.chtdConditions = chtdConditions; + conditions.chstrConditions = chstrConditions; + conditions.chcheConditions = chcheConditions; + conditions.chvlmConditions = chvlmConditions; + conditions.chichConditions = chichConditions; + conditions.chvwapConditions = chvwapConditions; + + // + result = conditions.IsValid(); + if (!result) + { + return result; + } + + // + // Previous Bar of Last Bar ... + XOHCL pBar; + result = cBar.GetPreviousBar(pBar); + if (!result) + { + return result; + } + + // + // Last Swing Low Bar ... + XOHCL lastSwingLow; + result = cBar.FindLastSwingLow(lastSwingLow); + if (!result) + { + return result; + } + + // + // Last Swing High Bar ... + XOHCL lastSwingHigh; + result = cBar.FindLastSwingHigh(lastSwingHigh); + if (!result) + { + return result; + } + + // + int pushers = 0; + string signallers[]; + + // + // Common Conditions For Bullish and Bearish Powers ... + + // + bool notHaveBearishPower = (!chmConditions.hasBearishPower && + !chhkConditions.hasBearishPower && + !chtdConditions.hasBearishPower && + !chcheConditions.hasBearishPower && + !chstrConditions.hasBearishPower && + !chvlmConditions.hasBearishPower && + !chvwapConditions.hasBearishPower); + + // + bool notHaveBullishPower = (!chmConditions.hasBullishPower && + !chhkConditions.hasBullishPower && + !chtdConditions.hasBullishPower && + !chcheConditions.hasBullishPower && + !chstrConditions.hasBullishPower && + !chvlmConditions.hasBullishPower && + !chvwapConditions.hasBullishPower); + + // + // Detecting Signals ... + + // + result = hasLong || hasShort; + if (!result) + { + // + CheckImportantAreasValidation(); + + // + return result; + } + + // + DestroyImportantAreas(); + + // + // Retrieve Entry Price based on Position Type ... + entry = GetEntry(mSymbol, type); + + // + // Calculate TP and SL ... + // based on Strategy ... + // only when on of TP or SL Provides, using provided R2R ... + if ((tp <= 0 && sl > 0) || (tp > 0 && sl <= 0)) + { + // + CalculateTPSLByPrice( + sl, + tp, + type, + entry, + r2r // + ); + } + + // + // Prepare Signal ... + result = signal.Prepare( + mSymbol, + signallers[0], + mPeriod, + type, + mode, + entry, + mVolume, + sl, + tp // + ); + if (!result) + { + return result; + } + + // + signal.pushers = pushers; + + // + // Prepare and Normalize Signal for Execution in Strategy ... + result = PrepareSignal(signal); + if (!result) + { + return result; + } + + // + // Notify XCH Specified Signal Event Handlers ... + NotifyOnXCHSignalEventHandlers( + signal, + conditions // + ); + + // + // Since we Ignore Signal Execution in this Strategy ... + // Make it the result false here for Preventing Double Execution ... + result = false; + + // + return result; + } + + // + // Protected ... +protected: + // + // Props ... + + // + // XPV ... + XPVInputs pvInputs; + XSCXPVHelper *pvHelper; + + // + // XCHMA ... + XCHMInputs chmInputs; + XSCXCHMHelper *chmHelper; + + // + // XCHHK ... + XCHHKInputs chhkInputs; + XSCXCHHKHelper *chhkHelper; + + // + // XCHTD ... + XCHTDInputs chtdInputs; + XSCXCHTDHelper *chtdHelper; + + // + // XSTR ... + XCHSTRInputs chstrInputs; + XSCXCHSTRHelper *chstrHelper; + + // + // XCHCHE ... + XCHCHEInputs chcheInputs; + XSCXCHCHEHelper *chcheHelper; + + // + // XCHVLM ... + XCHVLMInputs chvlmInputs; + XSCXCHVLMHelper *chvlmHelper; + + // + // XCHICH ... + XCHICHInputs chichInputs; + XSCXCHICHHelper *chichHelper; + + // + // XCHVWAP ... + XCHVWAPInputs chvwapInputs; + XSCXCHVWAPHelper *chvwapHelper; + + // + + // + // Private ... +private: + // + // Props ... + + // + // On XCH Signal Recieved Event Handler(s) ... + TOnXCHSignal mOnXCHSignalEventHandlers[]; + + // + // Notified Signal Event Handler(s) ... + void NotifyOnXCHSignalEventHandlers( + XSignal &signal, + XCHStrategyConditions &conditions // + ) + { + // + if (!signal.IsValid() || !conditions.IsValid()) + { + return; + } + + // + int count = ArraySize(mOnXCHSignalEventHandlers); + if (!IsValidSize(count)) + { + return; + } + + // + for (int i = 0; i < count; i++) + { + // + mOnXCHSignalEventHandlers[i]( + signal, + conditions // + ); + } + } + + // + // Install all Helpers and Prepare all + // Configurations for required Indicators ... + void PrepareRequirements() + { + // + support.Clean(); + supportTime = NULL; + isSupportTested = false; + + // + resistance.Clean(); + resistanceTime = NULL; + isResistanceTested = false; + + // + // Short ... + ENUM_X_PERIOD_METHOD scMethod = X_PERIOD_AUTO; // X_PERIOD_MANUALLY; // How to Find Period + ENUM_TIMEFRAMES scPeriod = NULL; // PERIOD_M20; // Time Period + + // + // Medium ... + ENUM_X_PERIOD_METHOD mcMethod = X_PERIOD_AUTO; // X_PERIOD_MANUALLY; // How to Find Period + ENUM_TIMEFRAMES mcPeriod = NULL; // PERIOD_M30; // Time Period + + // + // Long ... + ENUM_X_PERIOD_METHOD lcMethod = X_PERIOD_AUTO; // X_PERIOD_MANUALLY; // How to Find Period + ENUM_TIMEFRAMES lcPeriod = NULL; // PERIOD_H1; // Time Period + + // + // Hind ... + ENUM_X_PERIOD_METHOD hcMethod = X_PERIOD_AUTO; // X_PERIOD_MANUALLY; // How to Find Period + ENUM_TIMEFRAMES hcPeriod = NULL; // PERIOD_H2; // Time Period + + // + // XPV ... + + // + pvInputs.Default(); + + // + pvInputs.scMethod = scMethod; + pvInputs.scPeriod = scPeriod; + pvInputs.mcMethod = mcMethod; + pvInputs.mcPeriod = mcPeriod; + pvInputs.lcMethod = lcMethod; + pvInputs.lcPeriod = lcPeriod; + pvInputs.hcMethod = hcMethod; + pvInputs.hcPeriod = hcPeriod; + + // + pvInputs.showPeaksAndVales = false; + pvInputs.showLevels = false; + pvInputs.showConsolidations = false; + pvInputs.showFibo1Levels = false; + pvInputs.showFibo2Levels = false; + pvInputs.showFibo3Levels = false; + pvInputs.showFibo4Levels = false; + pvInputs.showFibo5Levels = false; + + // + pvHelper = new XSCXPVHelper(); + pvHelper.Init( + mSymbol, + mPeriod, + pvInputs // + ); + + // + // XCHM ... + + // + chmInputs.Default(); + + // + chmInputs.scMethod = scMethod; + chmInputs.scPeriod = scPeriod; + chmInputs.mcMethod = mcMethod; + chmInputs.mcPeriod = mcPeriod; + chmInputs.lcMethod = lcMethod; + chmInputs.lcPeriod = lcPeriod; + chmInputs.hcMethod = hcMethod; + chmInputs.hcPeriod = hcPeriod; + + // + chmInputs.showFast = false; + chmInputs.showSlow = false; + + // + chmInputs.showAVG = false; + + // + chmInputs.showCurrent = false; + chmInputs.showShort = false; + chmInputs.showMedium = false; + chmInputs.showLong = false; + chmInputs.showHind = false; + + // + chmHelper = new XSCXCHMHelper(); + chmHelper.Init( + mSymbol, + mPeriod, + chmInputs // + ); + + // + // XCHHK ... + + // + chhkInputs.Default(); + + // + chhkInputs.scMethod = scMethod; + chhkInputs.scPeriod = scPeriod; + chhkInputs.mcMethod = mcMethod; + chhkInputs.mcPeriod = mcPeriod; + chhkInputs.lcMethod = lcMethod; + chhkInputs.lcPeriod = lcPeriod; + chhkInputs.hcMethod = hcMethod; + chhkInputs.hcPeriod = hcPeriod; + + // + chhkInputs.ignoreShadows = true; + + // + chhkInputs.showCurrent = false; + chhkInputs.showShort = false; + chhkInputs.showMedium = false; + chhkInputs.showLong = false; + chhkInputs.showHind = false; + + // + chhkHelper = new XSCXCHHKHelper(); + chhkHelper.Init( + mSymbol, + mPeriod, + chhkInputs // + ); + + // + // XCHTD ... + + // + chtdInputs.Default(); + + // + chtdInputs.scMethod = scMethod; + chtdInputs.scPeriod = scPeriod; + chtdInputs.mcMethod = mcMethod; + chtdInputs.mcPeriod = mcPeriod; + chtdInputs.lcMethod = lcMethod; + chtdInputs.lcPeriod = lcPeriod; + chtdInputs.hcMethod = hcMethod; + chtdInputs.hcPeriod = hcPeriod; + + // + chtdInputs.showCurrent = false; + chtdInputs.showShort = false; + chtdInputs.showMedium = false; + chtdInputs.showLong = false; + chtdInputs.showHind = false; + + // + chtdHelper = new XSCXCHTDHelper(); + chtdHelper.Init( + mSymbol, + mPeriod, + chtdInputs // + ); + + // + // XCHSTR ... + + // + chstrInputs.Default(); + + // + chstrInputs.scMethod = scMethod; + chstrInputs.scPeriod = scPeriod; + chstrInputs.mcMethod = mcMethod; + chstrInputs.mcPeriod = mcPeriod; + chstrInputs.lcMethod = lcMethod; + chstrInputs.lcPeriod = lcPeriod; + chstrInputs.hcMethod = hcMethod; + chstrInputs.hcPeriod = hcPeriod; + + // + chstrInputs.showCurrent = false; + chstrInputs.showShort = false; + chstrInputs.showMedium = false; + chstrInputs.showLong = false; + chstrInputs.showHind = false; + + // + chstrHelper = new XSCXCHSTRHelper(); + chstrHelper.Init( + mSymbol, + mPeriod, + chstrInputs // + ); + + // + // XCHCHE ... + + // + chcheInputs.Default(); + + // + chcheInputs.scMethod = scMethod; + chcheInputs.scPeriod = scPeriod; + chcheInputs.mcMethod = mcMethod; + chcheInputs.mcPeriod = mcPeriod; + chcheInputs.lcMethod = lcMethod; + chcheInputs.lcPeriod = lcPeriod; + chcheInputs.hcMethod = hcMethod; + chcheInputs.hcPeriod = hcPeriod; + + // + chcheInputs.showLE1 = false; + chcheInputs.showLE2 = false; + chcheInputs.showSE1 = false; + chcheInputs.showSE2 = false; + + // + chcheInputs.showCurrent = false; + chcheInputs.showShort = false; + chcheInputs.showMedium = false; + chcheInputs.showLong = false; + chcheInputs.showHind = false; + + // + chcheHelper = new XSCXCHCHEHelper(); + chcheHelper.Init( + mSymbol, + mPeriod, + chcheInputs // + ); + + // + // XCHVLM ... + + // + chvlmInputs.Default(); + + // + chvlmInputs.scMethod = scMethod; + chvlmInputs.scPeriod = scPeriod; + chvlmInputs.mcMethod = mcMethod; + chvlmInputs.mcPeriod = mcPeriod; + chvlmInputs.lcMethod = lcMethod; + chvlmInputs.lcPeriod = lcPeriod; + chvlmInputs.hcMethod = hcMethod; + chvlmInputs.hcPeriod = hcPeriod; + + // + chvlmInputs.showCurrent = true; + chvlmInputs.showShort = true; + chvlmInputs.showMedium = true; + chvlmInputs.showLong = true; + chvlmInputs.showHind = true; + + // + chvlmHelper = new XSCXCHVLMHelper(); + chvlmHelper.Init( + mSymbol, + mPeriod, + chvlmInputs // + ); + + // + // XCHICH ... + + // + chichInputs.Default(); + + // + chichInputs.scMethod = scMethod; + chichInputs.scPeriod = scPeriod; + chichInputs.mcMethod = mcMethod; + chichInputs.mcPeriod = mcPeriod; + chichInputs.lcMethod = lcMethod; + chichInputs.lcPeriod = lcPeriod; + chichInputs.hcMethod = hcMethod; + chichInputs.hcPeriod = hcPeriod; + + // + chichInputs.showTenkanSen = false; + chichInputs.showKijunSen = false; + chichInputs.showChikouSpan = false; + chichInputs.showSenkouSpanA = false; + chichInputs.showSenkouSpanB = false; + chichInputs.showKumo = false; + + // + chichInputs.showCurrent = false; + chichInputs.showShort = false; + chichInputs.showMedium = false; + chichInputs.showLong = false; + chichInputs.showHind = false; + + // + chichHelper = new XSCXCHICHHelper(); + chichHelper.Init( + mSymbol, + mPeriod, + chichInputs // + ); + + // + // XCHVWAP ... + + // + chvwapInputs.Default(); + + // + chvwapInputs.scMethod = scMethod; + chvwapInputs.scPeriod = scPeriod; + chvwapInputs.mcMethod = mcMethod; + chvwapInputs.mcPeriod = mcPeriod; + chvwapInputs.lcMethod = lcMethod; + chvwapInputs.lcPeriod = lcPeriod; + chvwapInputs.hcMethod = hcMethod; + chvwapInputs.hcPeriod = hcPeriod; + + // + chvwapInputs.showShort = false; + chvwapInputs.showMedium = false; + chvwapInputs.showLong = false; + chvwapInputs.showHind = false; + + // + chvwapHelper = new XSCXCHVWAPHelper(); + chvwapHelper.Init( + mSymbol, + mPeriod, + chvwapInputs // + ); + + // + } + + // + void FillConditionsImportantAreas(XCHStrategyConditions &conditions) + { + // + if (!conditions.IsValid()) + { + return; + } + + // + conditions.support = support; + conditions.resistance = resistance; + conditions.bullishOB = bullishOB; + conditions.bearishOB = bearishOB; + conditions.bullishFVG = bullishFVG; + conditions.bearishFVG = bearishFVG; + conditions.bullishTrend = bullishTrend; + conditions.bearishTrend = bearishTrend; + + // + conditions.bullishFVGUpper = bullishFVGUpper; + conditions.bullishFVGLower = bullishFVGLower; + conditions.bearishFVGUpper = bearishFVGUpper; + conditions.bearishFVGLower = bearishFVGLower; + + // + Copy( + bullishTrendSwingHighs, + conditions.bullishTrendSwingHighs, + true // + ); + + // + Copy( + bullishTrendSwingLows, + conditions.bullishTrendSwingLows, + true // + ); + + // + Copy( + bearishTrendSwingHighs, + conditions.bearishTrendSwingHighs, + true // + ); + + // + Copy( + bearishTrendSwingLows, + conditions.bearishTrendSwingLows, + true // + ); + } + + // +}; + +// \ No newline at end of file