// // Check Market Conditions by Combination of Power of All tools for LONGs ... bool XEU5HasLongSignal( double &providedSignals // Recieve Which Number of Providers has Conditions here, used for Volume Increasing ) { // bool result = false; ENUM_XEU5_SIGNAL_METHODS methods[]; // // START Custom Mechanism ... // // // Required Data ... double entry = GetEntry(X_SIGNAL_LONG); double nearHH = GetHighestHigh(3, 1); double nearLL = GetLowestLow(3, 1); XOHCL candle1 = GetCandle(1); // bool isSharpChanged = IsSharpChanged( 5, 1, xTMMaBuffer); // bool isCandleSharpChanged = IsSharpChanged( 5, 1, PRICE_CLOSE); // bool isXTDVerified = // true // // ( // // // conditions.isXLHHHSameInLength && // conditions.isXLHLLSameInLength && // conditions.isXLHPriceInSignalRange // // // && // // // conditions.isXCHMAMCPeak && // conditions.isXCHMALCPeak // // // && // // // conditions.isXCHMAMCTrendsDown // // // && // // // conditions.isXTMStartBullishAfterNeutural // // // ? // // // !conditions.isXTDBullCrossedOverBear // // // : // // // true // // // ) // ; // bool isXCHMAUpState = ( // ( // conditions.isXCHMASCFastCrossedOverSlow && conditions.isXCHMAMCFastOverSlow && conditions.isXCHMALCFastOverSlow // ) // || // ( // conditions.isXCHMASCFastOverSlow && conditions.isXCHMAMCFastCrossedOverSlow && conditions.isXCHMALCFastOverSlow // ) // || // ( // conditions.isXCHMASCFastOverSlow && conditions.isXCHMAMCFastOverSlow && conditions.isXCHMALCFastCrossedOverSlow // ) // ) // ; // bool isXCHMAVerified = // isXCHMAUpState // && // ( // conditions.isXLHHHSameInLength && conditions.isXCHMAMCFastOverSlow && conditions.isXLHPriceUnderSignal && conditions.isXTMStartBullishAfterNeutural ? !conditions.isXCHMAMCTrendsDown : true // ) // && // ( // conditions.isXLHHHSameInLength && conditions.isXLHLLSameInLength // && // ( // conditions.isXLHPriceOverSignal && conditions.isXCHMAMCFastOverSlow && conditions.isXCHMALCFastOverSlow && conditions.isXCHMASCFastCrossedOverSlow && MathMin(xCHMAMcFastBuffer[1], xCHMAMcSlowBuffer[1]) > MathMax(xCHMALcFastBuffer[1], xCHMALcSlowBuffer[1]) && MathMin(xCHMAScFastBuffer[1], xCHMAScSlowBuffer[1]) > MathMax(xCHMAMcFastBuffer[1], xCHMAMcSlowBuffer[1]) // ? // entry < nearHH // : // true // ) // && // ( // conditions.isXLHPriceInSignalRange // ) // ) // ; // bool isXCHLHVerified = // ( // conditions.isXCHMAMCPeak && conditions.isXCHMALCPeak && conditions.isXLHPriceOverSignal && conditions.isXCHMASCFastCrossedOverSlow // ? // entry < nearHH // : // true // ) // && // ( conditions.isXCHLHSCMCHHSame // ? // entry < xCHLHMcHHBuffer[1] // : // true // ) // && // !( // conditions.isXCHMASCPeak && conditions.isXCHMAMCPeak && conditions.isXCHMALCPeak && conditions.isXCHLHSameHHs && conditions.isXCHLHSCMCHHSame && conditions.isXCHLHSCLCHHSame && conditions.isXCHLHMCLCHHSame && conditions.isXLHPriceOverSignal // ) // && // !( // xCHLHMcHHBuffer[1] == xCHLHMcHHBuffer[2] && xCHLHMcHHBuffer[2] == xCHLHMcHHBuffer[3] && xCHLHMcHHBuffer[3] == xCHLHMcHHBuffer[4] && xCHLHMcHHBuffer[4] == xCHLHMcHHBuffer[5] && // xCHLHMcLLBuffer[1] == xCHLHMcLLBuffer[2] && xCHLHMcLLBuffer[2] == xCHLHMcLLBuffer[3] && xCHLHMcLLBuffer[3] == xCHLHMcLLBuffer[4] && xCHLHMcLLBuffer[4] == xCHLHMcLLBuffer[5] && // xCHLHLcHHBuffer[1] == xCHLHLcHHBuffer[2] && xCHLHLcHHBuffer[2] == xCHLHLcHHBuffer[3] && xCHLHLcHHBuffer[3] == xCHLHLcHHBuffer[4] && xCHLHLcHHBuffer[4] == xCHLHLcHHBuffer[5] && // xCHLHLcLLBuffer[1] == xCHLHLcLLBuffer[2] && xCHLHLcLLBuffer[2] == xCHLHLcLLBuffer[3] && xCHLHLcLLBuffer[3] == xCHLHLcLLBuffer[4] && xCHLHLcLLBuffer[4] == xCHLHLcLLBuffer[5] && // xCHLHScHHBuffer[1] < xCHLHMcHHBuffer[1] && xCHLHScLLBuffer[1] > xCHLHMcLLBuffer[1] && // conditions.isXLHPriceOverSignal && // conditions.isXTDSignalUnderBear && // conditions.isXCHMAMCPeak && conditions.isXCHMALCPeak // ) // ; // // Condition 1 ... // this Method waits for XCHMA Short Cycle's Fast to Going down // of all Cycles Minimum Value, then Check when its Crossed Over // min value and then start to Open Long Trades based On Conditions, // and Recieved Verifications from other Indicator/Oscillator(s) ... bool customMethodCond1 = // conditions.isXOBDSwingLow // && // isXTDVerified // && // isXCHMAVerified // && // isXCHLHVerified // && // !( // conditions.isXCHLHSameHHs && conditions.isXLHLowAttachedLL && conditions.isXLHHighAttachedHH // ) // && // ( conditions.isXTMStartBullishAfterNeutural && conditions.isXTDSignalUnderBear && conditions.isXLHPriceOverSignal && conditions.isXCHMASCFastCrossedOverSlow // ? // !conditions.isXCHMAMCTrendsDown // : // true // ) // ; // // Filling Methods ... if (customMethodCond1) { // ArrayResize( methods, ArraySize(methods) + 1); // methods[ArraySize(methods) - 1] = X_SIGNAL_METHOD_1; } // // Condition 2 ... // this Method waits for XCHMA Medium Cycles Fast Line Crossed Over Slow, // then start to Open Long Trades based On Conditions, and Recieved Verifications from // other Indicator/Oscillator(s) ... bool customMethodCond2 = // false // ; // // Filling Methods ... if (customMethodCond2) { // ArrayResize( methods, ArraySize(methods) + 1); // methods[ArraySize(methods) - 1] = X_SIGNAL_METHOD_2; } // // Condition 3 ... // this Method waits for XCHMA Short Cycle's Fast to Crossed Over all Cycles max value // and then start to Open Long Trades based On Conditions, // and Recieved Verifications from other Indicator/Oscillator(s) ... bool customMethodCond3 = // false // ; // // Filling Methods ... if (customMethodCond3) { // ArrayResize( methods, ArraySize(methods) + 1); // methods[ArraySize(methods) - 1] = X_SIGNAL_METHOD_3; } // // Combine Custom Methods together ... bool isCustomMethodHasSignal = // customMethodCond1 // || // customMethodCond2 // || // customMethodCond3 // ; // // END Custom Mechanism ... // // result = // isCustomMethodHasSignal // ; // if (result) { // // Set Number of Occured Conditions for Increasing Volume ... providedSignals = ArraySize(methods); // // TODO: Remove This for Production ... string msg = XEU5GetConditionsString("\n"); LogMessage(msg); } // return result; }