diff --git a/BKPS/14030505/Documents/BKP/usefull.mq5 b/BKPS/14030505/Documents/BKP/usefull.mq5 index 69d60f3..c02b30c 100644 --- a/BKPS/14030505/Documents/BKP/usefull.mq5 +++ b/BKPS/14030505/Documents/BKP/usefull.mq5 @@ -8140,3 +8140,86 @@ void HandleStrategiesOnTick() RegisterStrategy(eurusdXCHKMStrategy); } } + +//////////////////////////////////////////////////////////////////////////////////////////// + + // + // XCHCHE ... + if (mEnableXCHCHE) + { + // + if (chcheConditions.isBullishPowerUp) + { + // + bool chcheHasLong = + // + hasBullishPower && + cBar.IsBullish() && + cBar.low > chcheMinBullish && + chcheConditions.isBullishPowerUp && + chcheConditions.isCStrongBearish && + (chmConditions.hasBullishPower || + chhkConditions.hasBullishPower || + chstrConditions.hasBullishPower) + // + ; + + // + if (chcheHasLong) + { + // + hasLong = chcheHasLong; + if (hasLong) + { + // + pushers++; + Add( + "XCHCHE", + signallers // + ); + + // + sl = chcheMinBullish; + type = POSITION_TYPE_BUY; + } + } + } + + // + if (chcheConditions.isBearishPowerUp) + { + // + bool chcheHasShort = + // + hasBearishPower && + cBar.IsBearish() && + cBar.high < chcheMaxBearish && + chcheConditions.isBearishPowerUp && + chcheConditions.isCStrongBearish && + (chmConditions.hasBearishPower || + chhkConditions.hasBearishPower || + chstrConditions.hasBearishPower) + // + ; + + // + if (chcheHasShort) + { + // + hasShort = chcheHasShort; + if (hasShort) + { + // + pushers++; + Add( + "XCHCHE", + signallers // + ); + + // + sl = chcheMaxBearish; + type = POSITION_TYPE_SELL; + } + } + } + }