/////////////////////////////////////////////////////////////////// // // SaherElm IT Center MQL5 XEU5 Signal Provider Indicators Library // ---------------------------------------------------------------- // // 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 // // START Define Enums ... // // enum ENUM_XEU5_SIGNAL_PROVIDERS { // // XSP Expert Support Mechanism ... XSP, // // XTD ... XTD, // // XSI ... XSI, // // XOBDLH ... XOBDLH, // // XCHMACC ... XCHMACC, // // XCHMACMN ... XCHMACMN, // // XCHMACMX ... XCHMACMX, }; // // Represent Market Conditions ... struct XEU5MarketConditions { // // XTM ... bool isXTMPeak; bool isXTMVale; bool isXTMBullish; bool isXTMBearish; bool isXTMNeutural; bool isXTMEndBullish; bool isXTMEndBearish; bool isXTMStartBullish; bool isXTMStartBearish; bool isXTMEndBullishByNeutural; bool isXTMEndBearishByNeutural; bool isXTMStartBullishAfterNeutural; bool isXTMStartBearishAfterNeutural; // // XLH ... bool isXLHHHIncreased; bool isXLHHHDecreased; bool isXLHLLIncreased; bool isXLHLLDecreased; bool isXLHLowAttachedLL; bool isXLHHighAttachedHH; bool isXLHHHSameInLength; bool isXLHLLSameInLength; bool isXLHPriceOverSignal; bool isXLHPriceUnderSignal; bool isXLHPriceInSignalRange; bool isXLHPriceCrossedOverSignal; bool isXLHPriceCrossedUnderSignal; // // XTD ... bool isXTDSignalPeak; bool isXTDSignalVale; bool isXTDBullishPeak; bool isXTDBullishVale; bool isXTDBearishPeak; bool isXTDBearishVale; bool isXTDBullOverBear; bool isXTDBullUnderBear; bool isXTDSignalOverBear; bool isXTDSignalUnderBear; bool isXTDBullCrossedOverBear; bool isXTDBullCrossedUnderBear; bool isXTDSignalCrossedOverBear; bool isXTDSignalCrossedUnderBear; // // XRSI ... bool isXRSIPeak; bool isXRSIVale; bool isXRSICrossedOverLongExit; bool isXRSICrossedOverLongEntry; bool isXRSICrossedUnderShortExit; bool isXRSICrossedUnderShortEntry; // // XOBD ... bool isXOBDSwingLow; bool isXOBDSwingHigh; // // XCHLH ... // bool isXCHLHSameHHs; bool isXCHLHSameLLs; // bool isXCHLHSCMCHHSame; bool isXCHLHSCMCLLSame; // bool isXCHLHSCLCHHSame; bool isXCHLHSCLCLLSame; // bool isXCHLHMCLCHHSame; bool isXCHLHMCLCLLSame; // bool isXCHLHMCOnTopOfLC; bool isXCHLHMCInBottomOfLC; // // XCHMA ... // bool isXCHMASCOverMax; bool isXCHMASCOverMin; bool isXCHMASCUnderMax; bool isXCHMASCUnderMin; // bool isXCHMASCCrossedOverMax; bool isXCHMASCCrossedUnderMax; bool isXCHMASCCrossedOverMin; bool isXCHMASCCrossedUnderMin; // bool isXCHMASCPeak; bool isXCHMASCVale; bool isXCHMASCTrendsUp; bool isXCHMASCTrendsDown; bool isXCHMASCFastOverSlow; bool isXCHMASCFastUnderSlow; bool isXCHMASCFastCrossedOverSlow; bool isXCHMASCFastCrossedUnderSlow; // bool isXCHMAMCPeak; bool isXCHMAMCVale; bool isXCHMAMCTrendsUp; bool isXCHMAMCTrendsDown; bool isXCHMAMCFastOverSlow; bool isXCHMAMCFastUnderSlow; bool isXCHMAMCFastCrossedOverSlow; bool isXCHMAMCFastCrossedUnderSlow; // bool isXCHMALCPeak; bool isXCHMALCVale; bool isXCHMALCTrendsUp; bool isXCHMALCTrendsDown; bool isXCHMALCFastOverSlow; bool isXCHMALCFastUnderSlow; bool isXCHMALCFastCrossedOverSlow; bool isXCHMALCFastCrossedUnderSlow; }; // // Signal Additional Info ... struct XEU5Signal { double tp; double sl; ENUM_XEU5_SIGNAL_PROVIDERS signallers[]; }; // // Count Signals ... struct XEU5SignalsCount { int longs; int shorts; }; // // Signallers Result ... struct XEU5SignallersState { XEU5SignalsCount XTD; XEU5SignalsCount XSI; XEU5SignalsCount XOBDLH; XEU5SignalsCount XCHMACC; XEU5SignalsCount XCHMACMN; XEU5SignalsCount XCHMACMX; }; // // END Define Enums ... // // // Include Provider Inputs ... #include "x-saherelm.xeu5.provider.inputs.lib.mq5"; // // Signallers ... input group "XEU5 Signallers"; // // XTD ... input group "XEU5 XTD Signaller"; input bool xEU5XTDEnableSignaller = true; // Enable Signaller input bool xEU5XTDAllowLongSignals = true; // Enable Long Signals input bool xEU5XTDAllowShortSignals = true; // Enable Long Signals // // XSI ... input group "XEU5 XSI Signaller"; input bool xEU5XSIEnableSignaller = true; // Enable Signaller input bool xEU5XSIAllowLongSignals = true; // Enable Long Signals input bool xEU5XSIAllowShortSignals = true; // Enable Long Signals // // XOBDLH ... input group "XEU5 XOBDLH Signaller"; input bool xEU5XOBDLHEnableSignaller = true; // Enable Signaller input bool xEU5XOBDLHAllowLongSignals = true; // Enable Long Signals input bool xEU5XOBDLHAllowShortSignals = true; // Enable Long Signals // // XCHMACC ... input group "XEU5 XCHMACC Signaller"; input bool xEU5XCHMACCEnableSignaller = true; // Enable Signaller input bool xEU5XCHMACCAllowLongSignals = true; // Enable Long Signals input bool xEU5XCHMACCAllowShortSignals = true; // Enable Long Signals // // XCHMACMX ... input group "XEU5 XCHMACMX Signaller"; input bool xEU5XCHMACMXEnableSignaller = true; // Enable Signaller input bool xEU5XCHMACMXAllowLongSignals = true; // Enable Long Signals input bool xEU5XCHMACMXAllowShortSignals = true; // Enable Long Signals // // XCHMACMN ... input group "XEU5 XCHMACMN Signaller"; input bool xEU5XCHMACMNEnableSignaller = true; // Enable Signaller input bool xEU5XCHMACMNAllowLongSignals = true; // Enable Long Signals input bool xEU5XCHMACMNAllowShortSignals = true; // Enable Long Signals // // Imports all Indicators Helper here ... input group "XEU5 Provider Indicators"; // #include "..\Helpers\x-saherelm.xtm.indicator.helper.lib.mq5"; #include "..\Helpers\x-saherelm.xlh.indicator.helper.lib.mq5"; #include "..\Helpers\x-saherelm.xtd.oscillator.helper.lib.mq5"; #include "..\Helpers\x-saherelm.xobd.indicator.helper.lib.mq5"; #include "..\Helpers\x-saherelm.xrsi.oscillator.helper.lib.mq5"; #include "..\Helpers\x-saherelm.xchlh.oscillator.helper.lib.mq5"; #include "..\Helpers\x-saherelm.xchma.oscillator.helper.lib.mq5"; // int xEU5MaxLengthOfInputs = 0; int xEU5CalculatedBars = 0; // // Here we Define some Global Market Variables to Analyse MArket Conditions // using them at each time ... XEU5MarketConditions xEU5Conditions = {}; // // Signaller State ... XEU5SignallersState xEU5SignallerStates = {}; // // Validate Indicators Inputs ... bool XEU5ValidateIndicatorsInputs() { // bool result = false; // // XTM ... result = XTMValidateInputs(); if (!result) { return result; } // // XTD ... result = XTDValidateInputs(); if (!result) { return result; } // // XOBD ... result = XOBDValidateInputs(); if (!result) { return result; } // // XLH ... result = XLHValidateInputs(); if (!result) { return result; } // // XRSI ... result = XRSIValidateInputs(); if (!result) { return result; } // // XCHLH ... result = XCHLHValidateInputs(); if (!result) { return result; } // // XCHMA ... result = XCHMAValidateInputs(); if (!result) { return result; } // result = true; // return result; } // // Init Indicators ... bool XEU5InitIndicators() { // bool result = false; // // Check and Calculate Max Length in Inputs ... // // // XTM ... xEU5MaxLengthOfInputs = MathMax( xTMMaPeriod, xEU5NumberOfItemsPerTick); // // XLH ... xEU5MaxLengthOfInputs = MathMax( xLHLength, xEU5NumberOfItemsPerTick); // // XTD ... xEU5MaxLengthOfInputs = MathMax( xTDLength, xEU5MaxLengthOfInputs); // // XRSI ... xEU5MaxLengthOfInputs = MathMax( xRSILength, xEU5MaxLengthOfInputs); // // XOBD ... xEU5MaxLengthOfInputs = MathMax( xOBDLength, xEU5MaxLengthOfInputs); // // XCHLH ... xEU5MaxLengthOfInputs = MathMax( xCHLHLcLength, xEU5MaxLengthOfInputs); xEU5MaxLengthOfInputs = MathMax( xCHLHMcLength, xEU5MaxLengthOfInputs); xEU5MaxLengthOfInputs = MathMax( xCHLHScLength, xEU5MaxLengthOfInputs); // // XCHMA ... xEU5MaxLengthOfInputs = MathMax( xCHMAScFastLength, xEU5MaxLengthOfInputs); xEU5MaxLengthOfInputs = MathMax( xCHMAScSlowLength, xEU5MaxLengthOfInputs); xEU5MaxLengthOfInputs = MathMax( xCHMAMcFastLength, xEU5MaxLengthOfInputs); xEU5MaxLengthOfInputs = MathMax( xCHMAMcSlowLength, xEU5MaxLengthOfInputs); xEU5MaxLengthOfInputs = MathMax( xCHMALcFastLength, xEU5MaxLengthOfInputs); xEU5MaxLengthOfInputs = MathMax( xCHMALcSlowLength, xEU5MaxLengthOfInputs); // // Validate Indicators Inputs before Initialization ... result = XEU5ValidateIndicatorsInputs(); if (!result) { return result; } // // Validate Signallers ... // // XTD ... bool isXTDEnable = xEU5XTDEnableSignaller && (xEU5XTDAllowLongSignals || xEU5XTDAllowShortSignals); // // XSI ... bool isXSIEnable = xEU5XSIEnableSignaller && (xEU5XSIAllowLongSignals || xEU5XSIAllowShortSignals); // // XOBDLH ... bool isXOBDLHEnable = xEU5XOBDLHEnableSignaller && (xEU5XOBDLHAllowLongSignals || xEU5XOBDLHAllowShortSignals); // // XCHMACC ... bool isXCHMACCEnable = xEU5XCHMACCEnableSignaller && (xEU5XCHMACCAllowLongSignals || xEU5XCHMACCAllowShortSignals); // // XCHMACMX ... bool isXCHMACMXEnable = xEU5XCHMACMXEnableSignaller && (xEU5XCHMACMXAllowLongSignals || xEU5XCHMACMXAllowShortSignals); // // XCHMACMN ... bool isXCHMACMNEnable = xEU5XCHMACMNEnableSignaller && (xEU5XCHMACMNAllowLongSignals || xEU5XCHMACMNAllowShortSignals); // bool hasSignaller = // isXTDEnable || isXSIEnable || isXOBDLHEnable || isXCHMACCEnable || isXCHMACMXEnable || isXCHMACMNEnable // ; result = hasSignaller; if (!result) { // LogMessage("XEU5 doesn't enable any Signaller ..."); // return result; } // // Initialize Indicator/Oscillator Handlers ... ResetLastError(); // // XTM Init ... result = XTMInitHandlers(); if (!result) { return result; } // // XLH Init ... result = XLHInitHandlers(); if (!result) { return result; } // // XTD Init ... result = XTDInitHandlers(); if (!result) { return result; } // // XRSI Init ... result = XRSIInitHandlers(); if (!result) { return result; } // // XOBD Init ... result = XOBDInitHandlers(); if (!result) { return result; } // // XCLH Init ... result = XCHLHInitHandlers(); if (!result) { return result; } // // XCHMA Init ... result = XCHMAInitHandlers(); if (!result) { return result; } // result = true; // return result; } // // Release Indicators ... void XEU5ReleaseIndicators() { // // Release Handlers ... XTMReleaseHandlers(); XLHReleaseHandlers(); XTDReleaseHandlers(); XRSIReleaseHandlers(); XOBDReleaseHandlers(); XCHMAReleaseHandlers(); XCHLHReleaseHandlers(); } // // Handle Reading Buffers ... void XEU5HandleReadingBuffers() { // // Reading Calculated Bars for a Simple Handler ... xEU5CalculatedBars = BarsCalculated(xTMHandler); // // Read Indicators Buffers ... XTMReadBuffers(xEU5NumberOfItemsPerTick); XLHReadBuffers(xEU5NumberOfItemsPerTick); XTDReadBuffers(xEU5NumberOfItemsPerTick); XRSIReadBuffers(xEU5NumberOfItemsPerTick); XOBDReadBuffers(xEU5NumberOfItemsPerTick); XCHMAReadBuffers(xEU5NumberOfItemsPerTick); XCHLHReadBuffers(xEU5NumberOfItemsPerTick); // XEU5ReadConditions(); } // // // START Combination Functions ... // // // // Can Open Long Trade ... // this is a Function will Check all market Conditions and get all // Strategy requirement Verifications for Long Signals ... bool XEU5CanOpenLongTrade( XEU5Signal &info // Retrieve Signal Additional Info on this Object ) { // bool result = false; // info.tp = 0; info.sl = 0; ArrayResize( info.signallers, 0); // bool hasSignal = XEU5HasLongSignal(info); // result = // hasSignal // ; // if (result) { XEU5ClearConditions(); } // return result; } // // Can Close Long Trade ... // this is a Function will Check all market Conditions and get all // Strategy requirement Verifications for Long Signals ... bool XEU5CanCloseLongTrade() { // bool result = false; // return result; } // // Can Open Short Trade ... // this is a Function will Check all market Conditions and get all // Strategy requirement Verifications for Short Signals ... bool XEU5CanOpenShortTrade( XEU5Signal &info // Retrieve Signal Additional Info on this Object ) { // bool result = false; // info.tp = 0; info.sl = 0; ArrayResize( info.signallers, 0); // bool hasSignal = XEU5HasShortSignal(info); // result = // hasSignal // ; // if (result) { XEU5ClearConditions(); } // return result; } // // Can Close Short Trade ... // this is a Function will Check all market Conditions and get all // Strategy requirement Verifications for Short Signals ... bool XEU5CanCloseShortTrade() { // bool result = false; // return result; } // // // END Combination Functions ... // // // // // START Combination Signaling ... // // // // Read All Globally Required Conditions ... void XEU5ReadConditions() { // XEU5ClearConditions(); // xEU5Conditions = XEU5GenerateMarketConditions(1); } // // Cleanup Conditions ... void XEU5ClearConditions() { // XEU5MarketConditions mConditions = {}; // xEU5Conditions = mConditions; } // // Generate Merket Conditions for Specified Bar Index ... XEU5MarketConditions XEU5GenerateMarketConditions( int bar_index = 1 // Specified Bar Index ... ) { // XEU5MarketConditions mConditions = {}; // // XTM ... mConditions.isXTMPeak = XTMIsPeak(bar_index); mConditions.isXTMVale = XTMIsVale(bar_index); mConditions.isXTMBullish = XTMIsBullish(bar_index); mConditions.isXTMBearish = XTMIsBearish(bar_index); mConditions.isXTMNeutural = XTMIsNeutural(bar_index); mConditions.isXTMEndBullish = XTMIsEndBullish(bar_index); mConditions.isXTMEndBearish = XTMIsEndBearish(bar_index); mConditions.isXTMStartBullish = XTMIsStartBullish(bar_index); mConditions.isXTMStartBearish = XTMIsStartBearish(bar_index); mConditions.isXTMEndBullishByNeutural = XTMIsEndBullishByNeutural(bar_index); mConditions.isXTMEndBearishByNeutural = XTMIsEndBearishByNeutural(bar_index); mConditions.isXTMStartBullishAfterNeutural = XTMIsStartBullishAfterNeutural(bar_index); mConditions.isXTMStartBearishAfterNeutural = XTMIsStartBearishAfterNeutural(bar_index); // // XLH ... mConditions.isXLHHHIncreased = XLHIsHHIncreased(bar_index); mConditions.isXLHHHDecreased = XLHIsHHDecreased(bar_index); mConditions.isXLHLLIncreased = XLHIsLLIncreased(bar_index); mConditions.isXLHLLDecreased = XLHIsLLDecreased(bar_index); mConditions.isXLHLowAttachedLL = XLHIsLowAttachedLL(bar_index); mConditions.isXLHHighAttachedHH = XLHIsHighAttachedHH(bar_index); mConditions.isXLHHHSameInLength = XLHIsHHSameInLength(bar_index); mConditions.isXLHLLSameInLength = XLHIsLLSameInLength(bar_index); mConditions.isXLHPriceOverSignal = XLHIsPriceOverSignal(bar_index); mConditions.isXLHPriceUnderSignal = XLHIsPriceUnderSignal(bar_index); mConditions.isXLHPriceInSignalRange = XLHIsPriceInSignalRange(bar_index); mConditions.isXLHPriceCrossedOverSignal = XLHIsPriceCrossedOverSignal(bar_index); mConditions.isXLHPriceCrossedUnderSignal = XLHIsPriceCrossedUnderSignal(bar_index); // // XTD ... mConditions.isXTDSignalPeak = XTDIsSignalPeak(bar_index); mConditions.isXTDSignalVale = XTDIsSignalVale(bar_index); mConditions.isXTDBullishPeak = XTDIsBullishPeak(bar_index); mConditions.isXTDBullishVale = XTDIsBullishVale(bar_index); mConditions.isXTDBearishPeak = XTDIsBearishPeak(bar_index); mConditions.isXTDBearishVale = XTDIsBearishVale(bar_index); mConditions.isXTDBullOverBear = XTDIsBullOverBear(bar_index); mConditions.isXTDBullUnderBear = XTDIsBullUnderBear(bar_index); mConditions.isXTDSignalOverBear = XTDIsSignalOverBear(bar_index); mConditions.isXTDSignalUnderBear = XTDIsSignalUnderBear(bar_index); mConditions.isXTDBullCrossedOverBear = XTDIsBullCrossedOverBear(bar_index); mConditions.isXTDBullCrossedUnderBear = XTDIsBullCrossedUnderBear(bar_index); mConditions.isXTDSignalCrossedOverBear = XTDIsSignalCrossedOverBear(bar_index); mConditions.isXTDSignalCrossedUnderBear = XTDIsSignalCrossedUnderBear(bar_index); // // XRSI ... mConditions.isXRSIPeak = XRSIIsPeak(bar_index); mConditions.isXRSIVale = XRSIIsVale(bar_index); mConditions.isXRSICrossedOverLongExit = XRSIIsCrossedOverLongExit(bar_index); mConditions.isXRSICrossedOverLongEntry = XRSIIsCrossedOverLongEntry(bar_index); mConditions.isXRSICrossedUnderShortExit = XRSIIsCrossedUnderShortExit(bar_index); mConditions.isXRSICrossedUnderShortEntry = XRSIIsCrossedUnderShortEntry(bar_index); // // XOBD ... mConditions.isXOBDSwingLow = XOBDIsSwingLow(bar_index); mConditions.isXOBDSwingHigh = XOBDIsSwingHigh(bar_index); // // XCHLH ... // mConditions.isXCHLHSameHHs = XCHLHIsSameHHs(bar_index); mConditions.isXCHLHSameLLs = XCHLHIsSameLLs(bar_index); // mConditions.isXCHLHSCMCHHSame = XCHLHIsMCSCHasSameHH(bar_index); mConditions.isXCHLHSCMCLLSame = XCHLHIsMCSCHasSameLL(bar_index); // mConditions.isXCHLHSCLCHHSame = XCHLHIsLCSCHasSameHH(bar_index); mConditions.isXCHLHSCLCLLSame = XCHLHIsLCSCHasSameLL(bar_index); // mConditions.isXCHLHMCLCHHSame = XCHLHIsLCMCHasSameHH(bar_index); mConditions.isXCHLHMCLCLLSame = XCHLHIsLCMCHasSameLL(bar_index); // mConditions.isXCHLHMCOnTopOfLC = XCHLHIsMCOnTopOfLC(bar_index); mConditions.isXCHLHMCInBottomOfLC = XCHLHIsMCInBottomOfLC(bar_index); // // XCHMA ... // mConditions.isXCHMASCOverMax = XCHMAIsSCOverMax(bar_index); mConditions.isXCHMASCOverMin = XCHMAIsSCOverMin(bar_index); mConditions.isXCHMASCUnderMax = XCHMAIsSCUnderMax(bar_index); mConditions.isXCHMASCUnderMin = XCHMAIsSCUnderMin(bar_index); // mConditions.isXCHMASCCrossedOverMax = XCHMAIsSCCrossedOverMax(bar_index); mConditions.isXCHMASCCrossedUnderMax = XCHMAIsSCCrossedUnderMax(bar_index); mConditions.isXCHMASCCrossedOverMin = XCHMAIsSCCrossedOverMin(bar_index); mConditions.isXCHMASCCrossedUnderMin = XCHMAIsSCCrossedUnderMin(bar_index); // mConditions.isXCHMASCPeak = XCHMAIsSCPeak(bar_index); mConditions.isXCHMASCVale = XCHMAIsSCVale(bar_index); mConditions.isXCHMASCTrendsUp = XCHMAIsSCTrendsUp(bar_index); mConditions.isXCHMASCTrendsDown = XCHMAIsSCTrendsDown(bar_index); mConditions.isXCHMASCFastOverSlow = XCHMAIsSCFastOverSlow(bar_index); mConditions.isXCHMASCFastUnderSlow = XCHMAIsSCFastUnderSlow(bar_index); mConditions.isXCHMASCFastCrossedOverSlow = XCHMAIsSCFastCrossedOverSlow(bar_index); mConditions.isXCHMASCFastCrossedUnderSlow = XCHMAIsSCFastCrossedUnderSlow(bar_index); // mConditions.isXCHMAMCPeak = XCHMAIsMCPeak(bar_index); mConditions.isXCHMAMCVale = XCHMAIsMCVale(bar_index); mConditions.isXCHMAMCTrendsUp = XCHMAIsMCTrendsUp(bar_index); mConditions.isXCHMAMCTrendsDown = XCHMAIsMCTrendsDown(bar_index); mConditions.isXCHMAMCFastOverSlow = XCHMAIsMCFastOverSlow(bar_index); mConditions.isXCHMAMCFastUnderSlow = XCHMAIsMCFastUnderSlow(bar_index); mConditions.isXCHMAMCFastCrossedOverSlow = XCHMAIsMCFastCrossedOverSlow(bar_index); mConditions.isXCHMAMCFastCrossedUnderSlow = XCHMAIsMCFastCrossedUnderSlow(bar_index); // mConditions.isXCHMALCPeak = XCHMAIsLCPeak(bar_index); mConditions.isXCHMALCVale = XCHMAIsLCVale(bar_index); mConditions.isXCHMALCTrendsUp = XCHMAIsLCTrendsUp(bar_index); mConditions.isXCHMALCTrendsDown = XCHMAIsLCTrendsDown(bar_index); mConditions.isXCHMALCFastOverSlow = XCHMAIsLCFastOverSlow(bar_index); mConditions.isXCHMALCFastUnderSlow = XCHMAIsLCFastUnderSlow(bar_index); mConditions.isXCHMALCFastCrossedOverSlow = XCHMAIsLCFastCrossedOverSlow(bar_index); mConditions.isXCHMALCFastCrossedUnderSlow = XCHMAIsLCFastCrossedUnderSlow(bar_index); // return mConditions; } // // Check Market Conditions by Combination of Power of All tools for LONGs ... bool XEU5HasLongSignal( XEU5Signal &info // Retrieve Signal Additional Info on this Object ) { // bool result = false; // // XTD ... bool isXTDHasSignal = XEU5XTDHasLongSignal(); if (isXTDHasSignal) { // Add( XTD, info.signallers); // xEU5SignallerStates.XTD.longs++; } // // XRSI ... bool isXSIHasSignal = XEU5XSIHasLongSignal(); if (isXSIHasSignal) { // Add( XSI, info.signallers); // xEU5SignallerStates.XSI.longs++; } // // XOBD XLH ... bool isXOBDLHHasSignal = XEU5XOBDLHHasLongSignal(); if (isXOBDLHHasSignal) { // Add( XOBDLH, info.signallers); // xEU5SignallerStates.XOBDLH.longs++; } // // XCHMA Cycles Cross ... bool isXCHMACCHasSignal = XEU5XCHMACCHasLongSignal(); if (isXCHMACCHasSignal) { // Add( XCHMACC, info.signallers); // xEU5SignallerStates.XCHMACC.longs++; } // // XCHMA Cycles Min ... bool isXCHMACMNHasSignal = XEU5XCHMACMNHasLongSignal(); if (isXCHMACMNHasSignal) { // Add( XCHMACMN, info.signallers); // xEU5SignallerStates.XCHMACMN.longs++; } // // XCHMA Cycles Max bool isXCHMACMXHasSignal = XEU5XCHMACMXHasLongSignal(); if (isXCHMACMXHasSignal) { // Add( XCHMACMX, info.signallers); // xEU5SignallerStates.XCHMACMX.longs++; } // result = // isXTDHasSignal // || // isXSIHasSignal // || // isXOBDLHHasSignal // || // isXCHMACCHasSignal // || // isXCHMACMNHasSignal // || // isXCHMACMXHasSignal // ; // if (result) { // string message = XEU5GetConditionsString(xEU5Conditions, "\n"); LogMessage( "Signal Provided by: \n" + EnumToString(info.signallers[ArraySize(info.signallers) - 1]) + "\n" + "Pusher: " + (string)ArraySize(info.signallers) + "\n" + "Market Conditions: " + message); } // return result; } // // Check Market Conditions by Combination of Power of All tools for SHORTs ... bool XEU5HasShortSignal( XEU5Signal &info // Retrieve Signal Additional Info on this Object ) { // bool result = false; // // XTD ... bool isXTDHasSignal = XEU5XTDHasShortSignal(); if (isXTDHasSignal) { // Add( XTD, info.signallers); // xEU5SignallerStates.XTD.shorts++; } // // XRSI ... bool isXSIHasSignal = XEU5XSIHasShortSignal(); if (isXSIHasSignal) { // Add( XSI, info.signallers); // xEU5SignallerStates.XSI.shorts++; } // // XOBD XLH ... bool isXOBDLHHasSignal = XEU5XOBDLHHasShortSignal(); if (isXOBDLHHasSignal) { // Add( XOBDLH, info.signallers); // xEU5SignallerStates.XOBDLH.shorts++; } // // XCHMA Cycles Cross ... bool isXCHMACCHasSignal = XEU5XCHMACCHasShortSignal(); if (isXCHMACCHasSignal) { // Add( XCHMACC, info.signallers); // xEU5SignallerStates.XCHMACC.shorts++; } // // XCHMA Cycles Min ... bool isXCHMACMNHasSignal = XEU5XCHMACMNHasShortSignal(); if (isXCHMACMNHasSignal) { // Add( XCHMACMN, info.signallers); // xEU5SignallerStates.XCHMACMN.shorts++; } // // XCHMA Cycles Max bool isXCHMACMXHasSignal = XEU5XCHMACMXHasShortSignal(); if (isXCHMACMXHasSignal) { // Add( XCHMACMX, info.signallers); // xEU5SignallerStates.XCHMACMX.shorts++; } // result = // isXTDHasSignal // || // isXSIHasSignal // || // isXOBDLHHasSignal // || // isXCHMACCHasSignal // || // isXCHMACMNHasSignal // || // isXCHMACMXHasSignal // ; // if (result) { // string message = XEU5GetConditionsString(xEU5Conditions, "\n"); LogMessage( "Signal Provided by: \n" + EnumToString(info.signallers[ArraySize(info.signallers) - 1]) + "\n" + "Pusher: " + (string)ArraySize(info.signallers) + "\n" + "Market Conditions: " + message); } // return result; } // // // END Combination Signaling ... // // // // START Signal Providers ... // // // XTD Long Signal Checking ... bool XEU5XTDHasLongSignal() { // bool result = false; // // Validate Args ... if (!xEU5XTDEnableSignaller || !xEU5XTDAllowLongSignals) { return result; } // result = // xEU5Conditions.isXTDSignalCrossedOverBear && // !xEU5Conditions.isXLHHighAttachedHH && !xEU5Conditions.isXLHPriceInSignalRange && // !xEU5Conditions.isXCHMAMCPeak && !xEU5Conditions.isXCHMALCPeak && !xEU5Conditions.isXCHMAMCFastUnderSlow && !xEU5Conditions.isXCHMALCFastUnderSlow && !xEU5Conditions.isXCHMAMCFastCrossedUnderSlow && !xEU5Conditions.isXCHMALCFastCrossedUnderSlow // && // !( // xEU5Conditions.isXCHMASCOverMax && xEU5Conditions.isXCHMASCUnderMax // ) // && // !( // xEU5Conditions.isXCHLHSameHHs && xEU5Conditions.isXLHPriceOverSignal // ) // && // !( // xEU5Conditions.isXLHHHIncreased && xEU5Conditions.isXCHMAMCTrendsUp && xEU5Conditions.isXLHHHSameInLength && xEU5Conditions.isXLHLLSameInLength && xEU5Conditions.isXLHPriceOverSignal && xEU5Conditions.isXCHMAMCFastOverSlow // ) // ; // return result; } // // XTD Short Signal Checking ... bool XEU5XTDHasShortSignal() { // bool result = false; // // Validate Args ... if (!xEU5XTDEnableSignaller || !xEU5XTDAllowShortSignals) { return result; } // result = // xEU5Conditions.isXTDSignalCrossedUnderBear // && // !xEU5Conditions.isXLHLowAttachedLL && !xEU5Conditions.isXLHPriceInSignalRange && // !xEU5Conditions.isXCHMAMCVale && !xEU5Conditions.isXCHMALCVale && !xEU5Conditions.isXCHMAMCFastOverSlow && !xEU5Conditions.isXCHMALCFastOverSlow && !xEU5Conditions.isXCHMAMCFastCrossedOverSlow && !xEU5Conditions.isXCHMALCFastCrossedOverSlow // && // !( // xEU5Conditions.isXCHMASCTrendsDown && xEU5Conditions.isXCHMAMCTrendsDown && xEU5Conditions.isXCHMALCTrendsDown && xEU5Conditions.isXCHMASCFastUnderSlow && xEU5Conditions.isXCHMAMCFastUnderSlow && xEU5Conditions.isXCHMALCFastUnderSlow // ) // && // !( // xEU5Conditions.isXCHMAMCPeak && xEU5Conditions.isXCHMALCPeak && xEU5Conditions.isXCHMAMCTrendsDown && xEU5Conditions.isXCHMALCTrendsDown && xEU5Conditions.isXCHMALCFastUnderSlow && xEU5Conditions.isXCHMAMCFastUnderSlow // ) // && // !( // xEU5Conditions.isXCHMAMCPeak && xEU5Conditions.isXLHHHSameInLength && xEU5Conditions.isXLHLLSameInLength && xEU5Conditions.isXCHMAMCTrendsDown && xEU5Conditions.isXCHMAMCFastUnderSlow // ) // && !( // xEU5Conditions.isXCHMASCOverMin && xEU5Conditions.isXCHMASCUnderMin // ) // && !( // xEU5Conditions.isXCHMASCUnderMax && xEU5Conditions.isXCHMASCUnderMin && xEU5Conditions.isXLHHHSameInLength && xEU5Conditions.isXLHLLSameInLength && xEU5Conditions.isXCHMALCTrendsDown && xEU5Conditions.isXLHPriceOverSignal && xEU5Conditions.isXCHMALCFastUnderSlow // ) // && // !( // xEU5Conditions.isXLHHHSameInLength && xEU5Conditions.isXLHLLSameInLength && xEU5Conditions.isXTDSignalCrossedUnderBear // ) // && // !( // xEU5Conditions.isXTMBearish && xEU5Conditions.isXLHHHDecreased && xEU5Conditions.isXCHMAMCTrendsUp && xEU5Conditions.isXCHMALCTrendsDown && xEU5Conditions.isXLHLLSameInLength && xEU5Conditions.isXLHPriceUnderSignal && xEU5Conditions.isXCHMAMCFastUnderSlow && xEU5Conditions.isXCHMALCFastUnderSlow // ) // ; // return result; } // // XSI Long Signal Checking ... bool XEU5XSIHasLongSignal() { // bool result = false; // // Validate Args ... if (!xEU5XSIEnableSignaller || !xEU5XSIAllowLongSignals) { return result; } // result = // xEU5Conditions.isXRSICrossedOverLongEntry && xRSIBuffer[3] < xRSILongEntryValue // && // !( // xEU5Conditions.isXTMVale && xEU5Conditions.isXCHMASCFastUnderSlow // ) // && // !( // xEU5Conditions.isXCHMASCOverMin && xEU5Conditions.isXCHMASCUnderMin // ) // && // ( // xEU5Conditions.isXCHMASCUnderMin ? !( // xEU5Conditions.isXCHMASCTrendsUp && xEU5Conditions.isXCHMASCFastUnderSlow // ) && !( // xEU5Conditions.isXTMVale && xEU5Conditions.isXCHMAMCVale && xEU5Conditions.isXCHMAMCTrendsUp && xEU5Conditions.isXCHMAMCFastUnderSlow // ) : true // ) // && // !( // xEU5Conditions.isXCHMASCVale || xEU5Conditions.isXCHMASCFastCrossedUnderSlow // ) // && // ( // xEU5Conditions.isXCHMAMCFastOverSlow ? !xEU5Conditions.isXCHMAMCTrendsDown : true // ) // && // !( // xEU5Conditions.isXTMVale && xEU5Conditions.isXCHMAMCVale && xEU5Conditions.isXCHMALCPeak // ) // && // ( // xEU5Conditions.isXCHMASCUnderMin ? !( // xEU5Conditions.isXTMVale && xEU5Conditions.isXTDBearishVale && xEU5Conditions.isXLHHHSameInLength && xEU5Conditions.isXLHLLSameInLength // ) : true // ) // && // !( // xEU5Conditions.isXCHMALCPeak && xEU5Conditions.isXCHMAMCVale && xEU5Conditions.isXLHHHDecreased && xEU5Conditions.isXLHHHSameInLength && xEU5Conditions.isXLHLLSameInLength // ) // && // !( // xEU5Conditions.isXCHMAMCVale && xEU5Conditions.isXCHMALCVale && xEU5Conditions.isXTDBullOverBear && xEU5Conditions.isXCHMAMCTrendsUp && xEU5Conditions.isXCHMALCTrendsUp && xEU5Conditions.isXLHHHSameInLength && xEU5Conditions.isXLHLLSameInLength && xEU5Conditions.isXTDSignalUnderBear && xEU5Conditions.isXLHPriceUnderSignal && xEU5Conditions.isXCHMAMCFastUnderSlow && xEU5Conditions.isXCHMALCFastUnderSlow // ) // && // !( // xEU5Conditions.isXCHMAMCVale && xEU5Conditions.isXCHMALCVale && xEU5Conditions.isXCHLHSameLLs && xEU5Conditions.isXCHMAMCTrendsUp && xEU5Conditions.isXCHMALCTrendsUp && xEU5Conditions.isXTDBullUnderBear && xEU5Conditions.isXLHHHSameInLength && xEU5Conditions.isXCHMASCTrendsDown && xEU5Conditions.isXTDSignalUnderBear && xEU5Conditions.isXCHMASCFastOverSlow && xEU5Conditions.isXCHMAMCFastUnderSlow && xEU5Conditions.isXCHMALCFastUnderSlow // ) // ; // return result; } // // XSI Short Signal Checking ... bool XEU5XSIHasShortSignal() { // bool result = false; // // Validate Args ... if (!xEU5XSIEnableSignaller || !xEU5XSIAllowShortSignals) { return result; } // result = // xEU5Conditions.isXRSICrossedUnderShortEntry && xRSIBuffer[3] > xRSIShortEntryValue && !xEU5Conditions.isXOBDSwingHigh // && // !( // ( // xEU5Conditions.isXCHMASCPeak && xEU5Conditions.isXCHMAMCPeak && xEU5Conditions.isXCHMALCPeak // ) // || // ( // xEU5Conditions.isXCHMAMCPeak && xEU5Conditions.isXCHMALCPeak // ) // || // ( // xEU5Conditions.isXCHMASCPeak && xEU5Conditions.isXCHMAMCPeak // ) // || // ( // xEU5Conditions.isXCHMAMCTrendsDown && xEU5Conditions.isXCHMALCTrendsDown && xEU5Conditions.isXCHMAMCFastUnderSlow && xEU5Conditions.isXCHMALCFastUnderSlow // ) // ) // && // !( // xEU5Conditions.isXCHLHSameHHs && xEU5Conditions.isXLHHighAttachedHH && xEU5Conditions.isXTDSignalCrossedOverBear // ) // && // !( // xEU5Conditions.isXCHMAMCPeak && xEU5Conditions.isXCHLHSameHHs && xEU5Conditions.isXCHMASCTrendsUp && xEU5Conditions.isXCHMAMCTrendsUp && xEU5Conditions.isXCHMASCFastOverSlow && xEU5Conditions.isXCHMAMCFastOverSlow // ) // && // !( // xEU5Conditions.isXCHMASCPeak && xEU5Conditions.isXCHMALCPeak && xEU5Conditions.isXCHMASCTrendsUp && xEU5Conditions.isXCHMALCTrendsUp && xEU5Conditions.isXLHHighAttachedHH && xEU5Conditions.isXLHLLSameInLength && xEU5Conditions.isXCHMASCFastOverSlow && xEU5Conditions.isXCHMALCFastOverSlow // ) // && // !( // xEU5Conditions.isXTMBullish && xEU5Conditions.isXTDBullOverBear && xEU5Conditions.isXCHMASCTrendsUp && xEU5Conditions.isXCHMAMCTrendsUp && xEU5Conditions.isXCHMALCTrendsUp && xEU5Conditions.isXTDSignalOverBear && xEU5Conditions.isXCHMASCFastOverSlow && xEU5Conditions.isXCHMAMCFastOverSlow && xEU5Conditions.isXCHMALCFastOverSlow // ) // && // !( // xEU5Conditions.isXCHMASCPeak && xEU5Conditions.isXCHMAMCVale && xEU5Conditions.isXCHMALCVale && xEU5Conditions.isXCHMASCTrendsUp && xEU5Conditions.isXLHHighAttachedHH && xEU5Conditions.isXCHMASCFastOverSlow && xEU5Conditions.isXCHMAMCFastUnderSlow && xEU5Conditions.isXCHMALCFastUnderSlow // ) // && // !( // xEU5Conditions.isXCHLHSameHHs && xEU5Conditions.isXCHLHSameLLs && xEU5Conditions.isXCHMASCOverMax && xEU5Conditions.isXCHMASCOverMin && xEU5Conditions.isXTDBullOverBear && xEU5Conditions.isXCHMASCTrendsUp && xEU5Conditions.isXCHMALCTrendsUp && xEU5Conditions.isXTDSignalOverBear && xEU5Conditions.isXCHMASCFastOverSlow && xEU5Conditions.isXCHMALCFastOverSlow // ) // && // !( // xEU5Conditions.isXCHMASCPeak && xEU5Conditions.isXTDBullOverBear && xEU5Conditions.isXCHMASCTrendsUp && xEU5Conditions.isXTDSignalOverBear && xEU5Conditions.isXCHMAMCTrendsDown && xEU5Conditions.isXLHHHSameInLength && xEU5Conditions.isXLHLLSameInLength && xEU5Conditions.isXCHMASCFastOverSlow && xEU5Conditions.isXCHMAMCFastUnderSlow // ) // && // !( // xEU5Conditions.isXCHMASCPeak && xEU5Conditions.isXCHMALCPeak && xEU5Conditions.isXTDBullOverBear && xEU5Conditions.isXCHMASCTrendsUp && xEU5Conditions.isXTDSignalOverBear && xEU5Conditions.isXCHMALCTrendsDown && xEU5Conditions.isXCHMASCFastOverSlow && xEU5Conditions.isXCHMALCFastOverSlow // ) // && // !( // xEU5Conditions.isXTMBullish && xEU5Conditions.isXCHMASCPeak && xEU5Conditions.isXTDBullOverBear && xEU5Conditions.isXCHMASCTrendsUp && xEU5Conditions.isXTDSignalOverBear && xEU5Conditions.isXLHHighAttachedHH && xEU5Conditions.isXCHMASCFastOverSlow // ) // && // !( // xEU5Conditions.isXCHMALCPeak && xEU5Conditions.isXCHLHSCMCHHSame && xEU5Conditions.isXCHLHMCLCLLSame && xEU5Conditions.isXCHMASCTrendsUp && xEU5Conditions.isXTDBullOverBear && xEU5Conditions.isXTDSignalOverBear && xEU5Conditions.isXCHMALCTrendsDown && xEU5Conditions.isXCHMASCFastOverSlow && xEU5Conditions.isXCHMALCFastOverSlow // ) // && // !( // xEU5Conditions.isXTMBullish && xEU5Conditions.isXCHMASCOverMax && xEU5Conditions.isXTDBullOverBear && xEU5Conditions.isXCHMASCUnderMax && xEU5Conditions.isXTDSignalOverBear // ) // && // !( // xEU5Conditions.isXCHLHSameHHs && xEU5Conditions.isXCHLHSameLLs && xEU5Conditions.isXCHMASCTrendsUp && xEU5Conditions.isXCHMALCTrendsUp && xEU5Conditions.isXTDBullOverBear && xEU5Conditions.isXTDSignalUnderBear && xEU5Conditions.isXCHMASCFastOverSlow && xEU5Conditions.isXCHMALCFastOverSlow && xEU5Conditions.isXLHPriceCrossedOverSignal // ) // ; // return result; } // // XOBDLH Long Signal Checking ... bool XEU5XOBDLHHasLongSignal() { // bool result = false; // // Validate Args ... if (!xEU5XOBDLHEnableSignaller || !xEU5XOBDLHAllowLongSignals) { return result; } // double entry = GetEntry(X_SIGNAL_LONG); XEU5MarketConditions conditions2 = XEU5GenerateMarketConditions(2); // result = // conditions2.isXOBDSwingLow && conditions2.isXLHLowAttachedLL && xLHLLBuffer[1] >= xLHLLBuffer[2] && // ( // xEU5Conditions.isXLHPriceUnderSignal ? entry < xLHSignalBuffer[1] : true // ) // && // !( // xEU5Conditions.isXCHMASCOverMin && xEU5Conditions.isXCHMASCUnderMin // ) // && // ( // xEU5Conditions.isXCHMASCOverMin && xEU5Conditions.isXCHMASCUnderMax && xEU5Conditions.isXCHMASCFastUnderSlow ? !( // xEU5Conditions.isXCHMAMCTrendsDown && xEU5Conditions.isXCHMAMCFastOverSlow && xEU5Conditions.isXCHMALCTrendsDown && xEU5Conditions.isXCHMALCFastOverSlow // ) : true // ) // && // !( // xEU5Conditions.isXTMVale && xEU5Conditions.isXTDBullUnderBear && xEU5Conditions.isXLHLLDecreased && xEU5Conditions.isXCHMASCVale && xEU5Conditions.isXCHMAMCVale && xEU5Conditions.isXCHMALCVale // ) // && // ( // xEU5Conditions.isXCHMASCUnderMin ? !( // xEU5Conditions.isXCHMAMCVale && xEU5Conditions.isXCHMALCVale // ) : true // ) // && // ( // xEU5Conditions.isXCHMASCUnderMin && xEU5Conditions.isXCHMASCFastUnderSlow && xEU5Conditions.isXCHMAMCFastUnderSlow && xEU5Conditions.isXCHMALCFastUnderSlow ? !xEU5Conditions.isXCHMASCTrendsUp : true // ) // && // !( // xEU5Conditions.isXTMVale && xEU5Conditions.isXLHHHDecreased && xEU5Conditions.isXCHLHSameLLs && xEU5Conditions.isXCHMASCOverMin && xEU5Conditions.isXCHMASCUnderMax && xEU5Conditions.isXCHMAMCVale && xEU5Conditions.isXCHMAMCTrendsUp && xEU5Conditions.isXCHMAMCFastUnderSlow // ) // && // !( // xEU5Conditions.isXCHMAMCVale && xEU5Conditions.isXCHMALCPeak && xEU5Conditions.isXCHMALCFastOverSlow && xEU5Conditions.isXCHMAMCFastUnderSlow // ) // && // !( // xEU5Conditions.isXCHMASCTrendsUp && xEU5Conditions.isXCHMALCTrendsUp && xEU5Conditions.isXTDBullUnderBear && xEU5Conditions.isXCHMAMCTrendsDown && xEU5Conditions.isXTDSignalUnderBear && xEU5Conditions.isXLHPriceUnderSignal && xEU5Conditions.isXCHMAMCFastOverSlow && xEU5Conditions.isXCHMASCFastUnderSlow && xEU5Conditions.isXCHMALCFastUnderSlow // ) // ; // return result; } // // XOBDLH Short Signal Checking ... bool XEU5XOBDLHHasShortSignal() { // bool result = false; // // Validate Args ... if (!xEU5XOBDLHEnableSignaller || !xEU5XOBDLHAllowShortSignals) { return result; } // double entry = GetEntry(X_SIGNAL_SHORT); XEU5MarketConditions conditions2 = XEU5GenerateMarketConditions(2); // result = // conditions2.isXOBDSwingHigh && conditions2.isXLHHighAttachedHH && // !( // xEU5Conditions.isXCHMASCOverMin && xEU5Conditions.isXCHMASCUnderMin // ) // && // !( // xEU5Conditions.isXCHMAMCPeak && xEU5Conditions.isXCHMAMCTrendsDown && xEU5Conditions.isXCHMAMCFastUnderSlow // ) // && // !( // xEU5Conditions.isXLHHighAttachedHH && xEU5Conditions.isXCHMASCPeak && xEU5Conditions.isXCHMASCTrendsUp && xEU5Conditions.isXCHMASCFastOverSlow // ) // && // !( // xEU5Conditions.isXCHMAMCPeak && ( // ( // xEU5Conditions.isXCHMAMCTrendsUp && xEU5Conditions.isXCHMAMCFastOverSlow // ) || ( // xEU5Conditions.isXCHMAMCTrendsDown && xEU5Conditions.isXCHMAMCFastCrossedOverSlow // ) // ) // ) // && // !( // xEU5Conditions.isXCHMASCTrendsUp && xEU5Conditions.isXCHMAMCTrendsUp && xEU5Conditions.isXCHMALCTrendsUp && xEU5Conditions.isXCHMASCFastOverSlow && xEU5Conditions.isXCHMAMCFastOverSlow && xEU5Conditions.isXCHMALCFastOverSlow // ) // && // !( // xEU5Conditions.isXCHMALCPeak && xEU5Conditions.isXCHLHSameHHs && xEU5Conditions.isXCHMALCTrendsUp && xEU5Conditions.isXCHMALCFastOverSlow // ) // && // !( // xEU5Conditions.isXCHMASCPeak && xEU5Conditions.isXTDBullOverBear && xEU5Conditions.isXCHLHSCMCHHSame && xEU5Conditions.isXCHLHMCLCLLSame && xEU5Conditions.isXCHMASCTrendsUp && xEU5Conditions.isXTDSignalOverBear && xEU5Conditions.isXLHLLSameInLength && xEU5Conditions.isXCHMASCFastOverSlow // ) // && // !( // xEU5Conditions.isXTDBullUnderBear && xEU5Conditions.isXLHHHSameInLength && xEU5Conditions.isXLHLLSameInLength && xEU5Conditions.isXTDSignalUnderBear && xEU5Conditions.isXLHPriceInSignalRange && xEU5Conditions.isXCHMASCCrossedUnderMax // ) // && // !( // xEU5Conditions.isXTMStartBullish && xEU5Conditions.isXCHMASCTrendsUp && xEU5Conditions.isXCHMASCFastOverSlow && xEU5Conditions.isXLHPriceCrossedOverSignal // ) // && // !( // xEU5Conditions.isXCHMAMCPeak && xEU5Conditions.isXCHMALCPeak && xEU5Conditions.isXCHLHSameHHs && xEU5Conditions.isXTDBullOverBear && xEU5Conditions.isXTDSignalOverBear && xEU5Conditions.isXLHPriceOverSignal // ) // ; // return result; } // // XCHMACC Long Signal Checking ... bool XEU5XCHMACCHasLongSignal() { // bool result = false; // // Validate Args ... if (!xEU5XCHMACCEnableSignaller || !xEU5XCHMACCAllowLongSignals) { return result; } // // Required Data ... double entry = GetEntry(X_SIGNAL_LONG); double nearHH = GetHighestHigh(3, 1); double nearLL = GetLowestLow(3, 1); // bool isSharpChanged = IsSharpIncreasedChanged( 5, 1, xTMMaBuffer); // bool isCandleSharpChanged = IsSharpIncreasedChanged( 5, 1, PRICE_CLOSE); // ENUM_XCHMA_CYCLES cycles[]; Add( X_XCHMA_CYCLE_MEDIUM, cycles); Add( X_XCHMA_CYCLE_LONG, cycles); // double xCHMANonSCMax2 = XCHMAGetCyclesMaxValue(2, cycles); double xCHMANonSCMin2 = XCHMAGetCyclesMinValue(2, cycles); // double xCHMANonSCMax3 = XCHMAGetCyclesMaxValue(3, cycles); double xCHMANonSCMin3 = XCHMAGetCyclesMinValue(3, cycles); // result = // xCHMAScFastBuffer[1] > xCHMAScSlowBuffer[1] && xCHMAMcFastBuffer[1] > xCHMAMcSlowBuffer[1] && xCHMALcFastBuffer[1] > xCHMALcSlowBuffer[1] && // xCHMAScFastBuffer[2] > xCHMAScSlowBuffer[2] && xCHMAMcFastBuffer[2] > xCHMAMcSlowBuffer[2] && xCHMALcFastBuffer[2] > xCHMALcSlowBuffer[2] && // !( // xCHMAScFastBuffer[3] > xCHMAScSlowBuffer[3] && xCHMAMcFastBuffer[3] > xCHMAMcSlowBuffer[3] && xCHMALcFastBuffer[3] > xCHMALcSlowBuffer[3] // ) // && // ( // XCHMAIsSCFastCrossedOverSlow(2) ? XCHMAGetSCTrendPower(1) <= (XCHMAGetSCTrendPower(2) * 2) : true // ) // && // ( // xEU5Conditions.isXCHMASCOverMax ? XCHMAGetSCTrendPower(2) <= (xCHMANonSCMax2 - xCHMANonSCMin2) : true // ) // && // !xEU5Conditions.isXCHMAMCTrendsDown // && // ( // xEU5Conditions.isXCHMASCCrossedOverMax || xEU5Conditions.isXLHPriceOverSignal ? !isCandleSharpChanged : true // ) // && // !( // xEU5Conditions.isXCHMAMCPeak && xEU5Conditions.isXCHMALCPeak // ) // && // ( // xEU5Conditions.isXLHHighAttachedHH && xEU5Conditions.isXLHHHSameInLength && xEU5Conditions.isXLHLLSameInLength ? entry < nearHH : true // ) // && // ( // xEU5Conditions.isXCHMASCOverMax && xEU5Conditions.isXCHMASCFastOverSlow ? !xEU5Conditions.isXCHMASCTrendsDown : true) // ; // return result; } // // XCHMACC Short Signal Checking ... bool XEU5XCHMACCHasShortSignal() { // bool result = false; // // Validate Args ... if (!xEU5XCHMACCEnableSignaller || !xEU5XCHMACCAllowShortSignals) { return result; } // result = // xCHMAScFastBuffer[1] < xCHMAScSlowBuffer[1] && xCHMAMcFastBuffer[1] < xCHMAMcSlowBuffer[1] && xCHMALcFastBuffer[1] < xCHMALcSlowBuffer[1] && // xCHMAScFastBuffer[2] < xCHMAScSlowBuffer[2] && xCHMAMcFastBuffer[2] < xCHMAMcSlowBuffer[2] && xCHMALcFastBuffer[2] < xCHMALcSlowBuffer[2] && // !( // xCHMAScFastBuffer[3] < xCHMAScSlowBuffer[3] && xCHMAMcFastBuffer[3] < xCHMAMcSlowBuffer[3] && xCHMALcFastBuffer[3] < xCHMALcSlowBuffer[3] // ) // && // !( // ( // !xEU5Conditions.isXCHMASCTrendsUp && !xEU5Conditions.isXCHMASCTrendsDown // ) // || // ( // !xEU5Conditions.isXCHMAMCTrendsUp && !xEU5Conditions.isXCHMAMCTrendsDown // ) // ) // && // !( // xEU5Conditions.isXCHMASCOverMin && xEU5Conditions.isXCHMASCUnderMin // ) // && // !( // xEU5Conditions.isXCHLHSameLLs && xEU5Conditions.isXLHLowAttachedLL && xEU5Conditions.isXLHPriceUnderSignal // ) // && // !( // xEU5Conditions.isXCHMALCVale && xEU5Conditions.isXLHLowAttachedLL && xEU5Conditions.isXCHMALCFastUnderSlow && ( // !xEU5Conditions.isXCHMALCTrendsUp && !xEU5Conditions.isXCHMALCTrendsDown // ) // ) // && // !( // xEU5Conditions.isXTDBullUnderBear && xEU5Conditions.isXLHHHSameInLength && xEU5Conditions.isXLHLLSameInLength && xEU5Conditions.isXLHPriceInSignalRange // ) // && // !( // xEU5Conditions.isXCHMALCVale && xEU5Conditions.isXLHHHSameInLength && xEU5Conditions.isXLHLLSameInLength && xEU5Conditions.isXCHMALCTrendsDown && xEU5Conditions.isXCHMALCFastUnderSlow // ) // && // !( // xEU5Conditions.isXCHMAMCVale && xEU5Conditions.isXCHMALCVale && xEU5Conditions.isXCHMAMCFastUnderSlow && xEU5Conditions.isXCHMALCFastUnderSlow // ) // && // !( // xEU5Conditions.isXCHMALCVale && xEU5Conditions.isXTDSignalVale && xEU5Conditions.isXTDBullishVale && xEU5Conditions.isXCHMALCTrendsUp && xEU5Conditions.isXCHMALCFastUnderSlow // ) // && // !( // xEU5Conditions.isXTMVale && xEU5Conditions.isXTDSignalVale && xEU5Conditions.isXTDBullishVale // ) // && // !( // xEU5Conditions.isXCHMASCTrendsDown && xEU5Conditions.isXCHMAMCTrendsDown && xEU5Conditions.isXCHMALCTrendsDown && xEU5Conditions.isXCHMASCFastUnderSlow && xEU5Conditions.isXCHMAMCFastUnderSlow && xEU5Conditions.isXCHMALCFastUnderSlow // ) // && // !( // xEU5Conditions.isXCHMALCVale && xEU5Conditions.isXCHMALCTrendsUp && xEU5Conditions.isXLHPriceUnderSignal && xEU5Conditions.isXCHMALCFastUnderSlow // ) // && // !( // xEU5Conditions.isXCHMASCPeak && xEU5Conditions.isXLHHHSameInLength && xEU5Conditions.isXLHLLSameInLength && xEU5Conditions.isXCHMASCTrendsDown && xEU5Conditions.isXCHMASCFastUnderSlow // ) // && // !( // xEU5Conditions.isXCHMALCVale && xEU5Conditions.isXCHMAMCTrendsDown && xEU5Conditions.isXCHMALCTrendsDown && xEU5Conditions.isXCHMAMCFastUnderSlow && xEU5Conditions.isXCHMALCFastUnderSlow // ) // && // !( // xEU5Conditions.isXLHHHSameInLength && xEU5Conditions.isXLHLLSameInLength && xEU5Conditions.isXCHMASCTrendsDown && xEU5Conditions.isXCHMASCFastUnderSlow && xEU5Conditions.isXTMStartBullishAfterNeutural // ) // && // !( // xEU5Conditions.isXCHMALCVale && xEU5Conditions.isXCHMALCTrendsUp && xEU5Conditions.isXLHHHSameInLength && xEU5Conditions.isXLHLLSameInLength && xEU5Conditions.isXCHMALCFastUnderSlow && xEU5Conditions.isXTMEndBullishByNeutural && xEU5Conditions.isXTDSignalCrossedUnderBear // ) // && // !( // xEU5Conditions.isXCHMALCVale && xEU5Conditions.isXTDSignalVale && xEU5Conditions.isXTDBullishVale && xEU5Conditions.isXTDBullUnderBear && xEU5Conditions.isXLHLowAttachedLL && xEU5Conditions.isXLHHHSameInLength && xEU5Conditions.isXCHMALCTrendsDown && xEU5Conditions.isXCHMALCFastUnderSlow // ) // && // !( // xEU5Conditions.isXCHLHSCMCLLSame && xEU5Conditions.isXCHMASCUnderMax && xEU5Conditions.isXCHMASCUnderMin && xEU5Conditions.isXCHMASCTrendsUp && xEU5Conditions.isXCHMAMCTrendsUp && xEU5Conditions.isXCHMALCTrendsUp && xEU5Conditions.isXTDBullUnderBear && xEU5Conditions.isXTDSignalUnderBear && xEU5Conditions.isXLHPriceUnderSignal && xEU5Conditions.isXCHMASCFastUnderSlow && xEU5Conditions.isXCHMAMCFastUnderSlow && xEU5Conditions.isXCHMALCFastUnderSlow // ) // && // !( // xEU5Conditions.isXCHMALCVale && xEU5Conditions.isXLHHHIncreased && xEU5Conditions.isXLHHHSameInLength && xEU5Conditions.isXLHLLSameInLength && xEU5Conditions.isXLHPriceInSignalRange // ) // && // !( // xEU5Conditions.isXCHMALCVale && xEU5Conditions.isXCHMAMCTrendsUp && xEU5Conditions.isXLHLowAttachedLL && xEU5Conditions.isXCHMASCTrendsDown && xEU5Conditions.isXCHMALCTrendsDown && xEU5Conditions.isXCHMASCFastUnderSlow && xEU5Conditions.isXCHMAMCFastUnderSlow && xEU5Conditions.isXCHMALCFastUnderSlow // ) // && // !( // xEU5Conditions.isXCHMASCUnderMax && xEU5Conditions.isXCHMASCUnderMin && xEU5Conditions.isXCHMASCTrendsDown && xEU5Conditions.isXCHMALCTrendsDown && xEU5Conditions.isXLHHHSameInLength && xEU5Conditions.isXCHMASCFastUnderSlow && xEU5Conditions.isXCHMALCFastUnderSlow && xEU5Conditions.isXTMEndBearishByNeutural // ) // && // !( // xEU5Conditions.isXTDSignalVale && xEU5Conditions.isXTDBullishVale && xEU5Conditions.isXCHMASCUnderMin && xEU5Conditions.isXLHLLSameInLength && xEU5Conditions.isXCHMAMCTrendsDown && xEU5Conditions.isXLHPriceUnderSignal && xEU5Conditions.isXCHMAMCFastUnderSlow && xEU5Conditions.isXCHMASCCrossedUnderMin // ) // && // !( // xEU5Conditions.isXTMVale && xEU5Conditions.isXCHMALCVale && xEU5Conditions.isXTDBullUnderBear && xEU5Conditions.isXCHMALCTrendsDown && xEU5Conditions.isXTDSignalUnderBear && xEU5Conditions.isXCHMALCFastUnderSlow // ) // && // !( // xEU5Conditions.isXTDBullUnderBear && xEU5Conditions.isXLHHHSameInLength && xEU5Conditions.isXLHLLSameInLength && xEU5Conditions.isXCHMAMCTrendsDown && xEU5Conditions.isXCHMALCTrendsDown && xEU5Conditions.isXTDSignalUnderBear && xEU5Conditions.isXLHPriceOverSignal && xEU5Conditions.isXCHMAMCFastUnderSlow && xEU5Conditions.isXCHMALCFastUnderSlow // ) // && // !( // xEU5Conditions.isXCHMALCVale && xEU5Conditions.isXTDBullOverBear && xEU5Conditions.isXCHMALCTrendsUp && xEU5Conditions.isXTDSignalUnderBear && xEU5Conditions.isXCHMALCFastUnderSlow && xEU5Conditions.isXTMEndBearishByNeutural // ) // && // !( // xEU5Conditions.isXLHHHSameInLength && xEU5Conditions.isXCHMASCTrendsDown && xEU5Conditions.isXCHMAMCTrendsDown && xEU5Conditions.isXLHPriceOverSignal && xEU5Conditions.isXTDSignalUnderBear && xEU5Conditions.isXCHMASCFastUnderSlow && xEU5Conditions.isXCHMAMCFastUnderSlow && xEU5Conditions.isXTDBullCrossedUnderBear // ) // ; // return result; } // // XCHMACMN Long Signal Checking ... bool XEU5XCHMACMNHasLongSignal() { // bool result = false; // // Validate Args ... if (!xEU5XCHMACMNEnableSignaller || !xEU5XCHMACMNAllowLongSignals) { return result; } // // Required Data ... double entry = GetEntry(X_SIGNAL_LONG); double nearHH = GetHighestHigh(3, 1); double nearLL = GetLowestLow(3, 1); // ENUM_XCHMA_CYCLES cycles[]; Add( X_XCHMA_CYCLE_MEDIUM, cycles); Add( X_XCHMA_CYCLE_LONG, cycles); // double xCHMANonSCMax2 = XCHMAGetCyclesMaxValue(2, cycles); double xCHMANonSCMin2 = XCHMAGetCyclesMinValue(2, cycles); // result = // xEU5Conditions.isXCHMASCCrossedOverMin && xCHMAScFastBuffer[2] < xCHMANonSCMin2 && xCHMAScSlowBuffer[2] < xCHMANonSCMin2 && // ( // xEU5Conditions.isXCHMASCOverMin && xEU5Conditions.isXCHMASCUnderMax ? !( // XCHMAGetCycleMaxValue(1, X_XCHMA_CYCLE_MEDIUM) < XCHMAGetCycleMaxValue(1, X_XCHMA_CYCLE_LONG) && XCHMAGetCycleMinValue(1, X_XCHMA_CYCLE_MEDIUM) > XCHMAGetCycleMinValue(1, X_XCHMA_CYCLE_LONG) // ) : true // ) // && // !( // xEU5Conditions.isXCHMALCVale && xEU5Conditions.isXLHHighAttachedHH // ) // && // ( // xEU5Conditions.isXCHMALCVale && xEU5Conditions.isXCHMAMCTrendsDown && xEU5Conditions.isXCHMAMCFastOverSlow && xEU5Conditions.isXCHMALCFastUnderSlow ? !xEU5Conditions.isXLHPriceInSignalRange : true // ) // && // !( // xEU5Conditions.isXCHLHSCMCHHSame && xEU5Conditions.isXLHHighAttachedHH && xEU5Conditions.isXLHPriceOverSignal // ) // && // !( // xEU5Conditions.isXCHMALCVale && xEU5Conditions.isXCHMAMCTrendsDown && xEU5Conditions.isXCHMALCTrendsDown && xEU5Conditions.isXCHMAMCFastUnderSlow && xEU5Conditions.isXCHMALCFastUnderSlow // ) // && // !( // xEU5Conditions.isXCHMAMCVale && xEU5Conditions.isXCHMALCVale && xEU5Conditions.isXCHMAMCTrendsDown && xEU5Conditions.isXCHMALCTrendsDown // ) // && // !( // xEU5Conditions.isXTDBullOverBear && xEU5Conditions.isXCHLHSCMCHHSame && xEU5Conditions.isXCHLHSCMCLLSame && xEU5Conditions.isXRSICrossedOverLongExit // ) // && // !( // xEU5Conditions.isXLHHHSameInLength && xEU5Conditions.isXLHLLSameInLength && xEU5Conditions.isXCHMAMCTrendsDown && xEU5Conditions.isXCHMALCTrendsDown && xEU5Conditions.isXCHMAMCFastOverSlow && xEU5Conditions.isXCHMALCFastUnderSlow // ) // && // !( // xEU5Conditions.isXTDBearishVale && xEU5Conditions.isXTDBullOverBear && xEU5Conditions.isXLHHHSameInLength && xEU5Conditions.isXLHLLSameInLength && xEU5Conditions.isXCHMAMCTrendsDown && xEU5Conditions.isXCHMAMCFastOverSlow && xEU5Conditions.isXCHMALCVale && xEU5Conditions.isXCHMALCTrendsDown && xEU5Conditions.isXCHMALCFastUnderSlow // ) // && // !( // xEU5Conditions.isXCHMAMCTrendsDown && xEU5Conditions.isXCHMALCTrendsDown && xEU5Conditions.isXCHMAMCFastOverSlow && xEU5Conditions.isXCHMALCFastOverSlow // ) // && !( // xEU5Conditions.isXCHMALCVale && xEU5Conditions.isXCHMAMCTrendsDown && xEU5Conditions.isXCHMALCTrendsDown && xEU5Conditions.isXCHMAMCFastOverSlow && xEU5Conditions.isXCHMALCFastUnderSlow // ) // ; // return result; } // // XCHMACMN Short Signal Checking ... bool XEU5XCHMACMNHasShortSignal() { // bool result = false; // // Validate Args ... if (!xEU5XCHMACMNEnableSignaller || !xEU5XCHMACMNAllowShortSignals) { return result; } // ENUM_XCHMA_CYCLES cycles[]; Add( X_XCHMA_CYCLE_MEDIUM, cycles); Add( X_XCHMA_CYCLE_LONG, cycles); // double xCHMANonSCMin2 = XCHMAGetCyclesMinValue(2, cycles); double xCHMANonSCMin3 = XCHMAGetCyclesMinValue(3, cycles); // result = // xEU5Conditions.isXCHMASCCrossedUnderMin && xCHMAScFastBuffer[2] > xCHMANonSCMin2 && xCHMAScSlowBuffer[2] > xCHMANonSCMin2 // && // !( // ( // xEU5Conditions.isXCHMASCFastCrossedOverSlow || ( // xEU5Conditions.isXCHMASCTrendsUp && xEU5Conditions.isXCHMASCFastOverSlow // ) // ) && ( // xEU5Conditions.isXCHMAMCFastCrossedOverSlow || ( // xEU5Conditions.isXCHMAMCTrendsUp && xEU5Conditions.isXCHMAMCFastOverSlow // ) // ) && ( // xEU5Conditions.isXCHMALCFastCrossedOverSlow || ( // xEU5Conditions.isXCHMALCTrendsUp && xEU5Conditions.isXCHMALCFastOverSlow // ) // ) // ) // && // !( // xEU5Conditions.isXCHMAMCVale && xEU5Conditions.isXCHMALCVale // ) // && // !( // xEU5Conditions.isXCHMALCVale && xEU5Conditions.isXCHMALCFastUnderSlow && // ( // ( // xEU5Conditions.isXCHMAMCTrendsDown && xEU5Conditions.isXLHPriceUnderSignal && xEU5Conditions.isXCHMAMCFastUnderSlow // ) || ( // xEU5Conditions.isXTDBullUnderBear && xEU5Conditions.isXLHHHSameInLength && xEU5Conditions.isXTDSignalUnderBear && xEU5Conditions.isXCHMAMCFastOverSlow // ) // ) // ) // && // !( // xEU5Conditions.isXTMBearish && xEU5Conditions.isXTDBullUnderBear && xEU5Conditions.isXLHLowAttachedLL && xEU5Conditions.isXCHMAMCTrendsDown && xEU5Conditions.isXCHMAMCFastOverSlow // ) // && // !( // xEU5Conditions.isXCHMAMCTrendsDown && xEU5Conditions.isXLHPriceUnderSignal && xEU5Conditions.isXCHMAMCFastUnderSlow && xEU5Conditions.isXTDBullCrossedUnderBear // ) // && // !( // xEU5Conditions.isXLHHHSameInLength && xEU5Conditions.isXLHLLSameInLength && xEU5Conditions.isXLHPriceInSignalRange // ) // && // !( // ( // xEU5Conditions.isXCHMASCVale || xEU5Conditions.isXCHMAMCVale // ) // && xEU5Conditions.isXLHPriceUnderSignal && xEU5Conditions.isXTDBullUnderBear && xEU5Conditions.isXTDSignalUnderBear && ( // ( // xEU5Conditions.isXTMVale && xEU5Conditions.isXLHHHSameInLength && xEU5Conditions.isXLHLLSameInLength // ) || ( // xEU5Conditions.isXLHLowAttachedLL && xEU5Conditions.isXCHMALCTrendsDown && xEU5Conditions.isXCHMALCFastOverSlow // ) // ) // ) // && // !( // xEU5Conditions.isXCHMASCVale && xEU5Conditions.isXCHMAMCVale && xEU5Conditions.isXTDBullUnderBear && xEU5Conditions.isXTDSignalUnderBear && xEU5Conditions.isXLHHHSameInLength && xEU5Conditions.isXLHLLSameInLength // ) // && // !( // xEU5Conditions.isXTMBullish && xEU5Conditions.isXCHMASCPeak && xEU5Conditions.isXCHMALCVale && xEU5Conditions.isXLHHHDecreased && xEU5Conditions.isXCHMALCTrendsUp && xEU5Conditions.isXLHHHSameInLength && xEU5Conditions.isXLHLLSameInLength && xEU5Conditions.isXCHMAMCTrendsDown && xEU5Conditions.isXCHMAMCFastUnderSlow && xEU5Conditions.isXCHMALCFastUnderSlow // ) // ; // return result; } // // XCHMACMX Long Signal Checking ... bool XEU5XCHMACMXHasLongSignal() { // bool result = false; // // Validate Args ... if (!xEU5XCHMACMXEnableSignaller || !xEU5XCHMACMXAllowLongSignals) { return result; } // // Required Data ... double entry = GetEntry(X_SIGNAL_LONG); double nearHH = GetHighestHigh(3, 1); double nearLL = GetLowestLow(3, 1); // ENUM_XCHMA_CYCLES cycles[]; Add( X_XCHMA_CYCLE_MEDIUM, cycles); Add( X_XCHMA_CYCLE_LONG, cycles); // double xCHMANonSCMax2 = XCHMAGetCyclesMaxValue(2, cycles); // result = // xEU5Conditions.isXCHMASCCrossedOverMax && xCHMAScFastBuffer[2] < xCHMANonSCMax2 && xCHMAScSlowBuffer[2] < xCHMANonSCMax2 && MathAbs(xCHMANonSCMax2 - xCHMAScFastBuffer[2]) > MathAbs(xCHMAScFastBuffer[2] - xCHMAScSlowBuffer[2]) && MathAbs(xCHMANonSCMax2 - xCHMAScSlowBuffer[2]) > MathAbs(xCHMAScFastBuffer[2] - xCHMAScSlowBuffer[2]) // && // !( // xEU5Conditions.isXLHPriceInSignalRange && xEU5Conditions.isXLHHighAttachedHH // ) // && // !( // xEU5Conditions.isXCHMAMCPeak && xEU5Conditions.isXCHMALCPeak // ) // && // !( // xEU5Conditions.isXCHLHSameHHs && xEU5Conditions.isXCHMALCTrendsDown && xEU5Conditions.isXLHHighAttachedHH && xEU5Conditions.isXCHMALCFastUnderSlow // ) // && // ( // xEU5Conditions.isXCHLHSCMCHHSame && xEU5Conditions.isXCHLHMCOnTopOfLC && xEU5Conditions.isXLHHighAttachedHH && xEU5Conditions.isXLHLLSameInLength ? entry < nearHH : true // ) // ; // return result; } // // XCHMACMX Short Signal Checking ... bool XEU5XCHMACMXHasShortSignal() { // bool result = false; // // Validate Args ... if (!xEU5XCHMACMXEnableSignaller || !xEU5XCHMACMXAllowShortSignals) { return result; } // ENUM_XCHMA_CYCLES cycles[]; Add( X_XCHMA_CYCLE_MEDIUM, cycles); Add( X_XCHMA_CYCLE_LONG, cycles); // double xCHMANonSCMax3 = XCHMAGetCyclesMaxValue(3, cycles); double xCHMANonSCMax2 = XCHMAGetCyclesMaxValue(2, cycles); // result = // xEU5Conditions.isXCHMASCCrossedUnderMax && xCHMAScFastBuffer[2] > xCHMANonSCMax2 && xCHMAScSlowBuffer[2] > xCHMANonSCMax2 // && // !( // xEU5Conditions.isXCHMAMCPeak && xEU5Conditions.isXCHMALCPeak // ) // && // !( // xEU5Conditions.isXLHHHSameInLength && xEU5Conditions.isXLHLLSameInLength && xEU5Conditions.isXLHPriceInSignalRange && // ( // ( // xEU5Conditions.isXCHMAMCTrendsDown && xEU5Conditions.isXCHMALCTrendsDown && xEU5Conditions.isXCHMAMCFastUnderSlow && xEU5Conditions.isXCHMALCFastUnderSlow // ) || ( // xEU5Conditions.isXTDBullUnderBear && xEU5Conditions.isXTDSignalUnderBear // ) // ) // ) // && // !( // ( // xEU5Conditions.isXCHMASCFastCrossedOverSlow || ( // xEU5Conditions.isXCHMASCTrendsUp && xEU5Conditions.isXCHMASCFastOverSlow // ) // ) && ( // xEU5Conditions.isXCHMAMCFastCrossedOverSlow || ( // xEU5Conditions.isXCHMAMCTrendsUp && xEU5Conditions.isXCHMAMCFastOverSlow // ) // ) && ( // xEU5Conditions.isXCHMALCFastCrossedOverSlow || ( // xEU5Conditions.isXCHMALCTrendsUp && xEU5Conditions.isXCHMALCFastOverSlow // ) // ) // ) // && // !( // xEU5Conditions.isXCHLHSameHHs && xEU5Conditions.isXCHMAMCPeak && xEU5Conditions.isXCHMAMCTrendsUp && xEU5Conditions.isXCHMAMCFastOverSlow && xEU5Conditions.isXLHPriceInSignalRange // ) // && // !( // xEU5Conditions.isXCHMALCPeak && xEU5Conditions.isXLHLLIncreased && xEU5Conditions.isXTDBullUnderBear && xEU5Conditions.isXLHPriceUnderSignal && xEU5Conditions.isXCHMAMCFastOverSlow && xEU5Conditions.isXCHMALCFastOverSlow // ) // && // !( // xEU5Conditions.isXCHMAMCPeak && xEU5Conditions.isXCHLHSCMCHHSame && xEU5Conditions.isXCHLHMCLCLLSame && xEU5Conditions.isXTDBullUnderBear && xEU5Conditions.isXLHLLSameInLength && xEU5Conditions.isXCHMAMCTrendsDown && xEU5Conditions.isXCHMALCTrendsDown && xEU5Conditions.isXTDSignalUnderBear && xEU5Conditions.isXCHMAMCFastUnderSlow && xEU5Conditions.isXCHMALCFastUnderSlow // ) // ; // return result; } // // END Signal Providers ... // // // START Utilities ... // // // Converts Market Conditions to Specific String Representation ... string XEU5GetConditionsString( XEU5MarketConditions &condition, // Specify Conditiond string separator = ",", // Specify Separator bool ignoreFalses = true // Ignore False Conditions ) { // XEU5MarketConditions mConditions = {}; // mConditions = condition; // string result = "\n"; // // XOBD ... result += "| XOBD |" + separator; // if ( !ignoreFalses || (ignoreFalses && mConditions.isXOBDSwingLow)) { result += "isXOBDSwingLow: " + (string)mConditions.isXOBDSwingLow + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXOBDSwingHigh)) { result += "isXOBDSwingHigh: " + (string)mConditions.isXOBDSwingHigh + separator; } // // Separator ... result += separator; // // XTM ... result += "| XTM |" + separator; // if ( !ignoreFalses || (ignoreFalses && mConditions.isXTMPeak)) { result += "isXTMPeak: " + (string)mConditions.isXTMPeak + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXTMVale)) { result += "isXTMVale: " + (string)mConditions.isXTMVale + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXTMStartBullish)) { result += "isXTMStartBullish: " + (string)mConditions.isXTMStartBullish + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXTMStartBullishAfterNeutural)) { result += "isXTMStartBullishAfterNeutural: " + (string)mConditions.isXTMStartBullishAfterNeutural + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXTMBullish)) { result += "isXTMBullish: " + (string)mConditions.isXTMBullish + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXTMEndBullish)) { result += "isXTMEndBullish: " + (string)mConditions.isXTMEndBullish + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXTMEndBullishByNeutural)) { result += "isXTMEndBullishByNeutural: " + (string)mConditions.isXTMEndBullishByNeutural + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXTMStartBearish)) { result += "isXTMStartBearish: " + (string)mConditions.isXTMStartBearish + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXTMStartBearishAfterNeutural)) { result += "isXTMStartBearishAfterNeutural: " + (string)mConditions.isXTMStartBearishAfterNeutural + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXTMBearish)) { result += "isXTMBearish: " + (string)mConditions.isXTMBearish + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXTMEndBearish)) { result += "isXTMEndBearish: " + (string)mConditions.isXTMEndBearish + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXTMEndBearishByNeutural)) { result += "isXTMEndBearishByNeutural: " + (string)mConditions.isXTMEndBearishByNeutural + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXTMNeutural)) { result += "isXTMNeutural: " + (string)mConditions.isXTMNeutural + separator; } // // Separator ... result += separator; // // XTD ... result += "| XTD |" + separator; // if ( !ignoreFalses || (ignoreFalses && mConditions.isXTDSignalPeak)) { result += "isXTDSignalPeak: " + (string)mConditions.isXTDSignalPeak + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXTDSignalVale)) { result += "isXTDSignalVale: " + (string)mConditions.isXTDSignalVale + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXTDBullishPeak)) { result += "isXTDBullishPeak: " + (string)mConditions.isXTDBullishPeak + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXTDBullishVale)) { result += "isXTDBullishVale: " + (string)mConditions.isXTDBullishVale + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXTDBearishPeak)) { result += "isXTDBearishPeak: " + (string)mConditions.isXTDBearishPeak + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXTDBearishVale)) { result += "isXTDBearishVale: " + (string)mConditions.isXTDBearishVale + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXTDBullOverBear)) { result += "isXTDBullOverBear: " + (string)mConditions.isXTDBullOverBear + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXTDBullUnderBear)) { result += "isXTDBullUnderBear: " + (string)mConditions.isXTDBullUnderBear + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXTDSignalOverBear)) { result += "isXTDSignalOverBear: " + (string)mConditions.isXTDSignalOverBear + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXTDSignalUnderBear)) { result += "isXTDSignalUnderBear: " + (string)mConditions.isXTDSignalUnderBear + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXTDBullCrossedOverBear)) { result += "isXTDBullCrossedOverBear: " + (string)mConditions.isXTDBullCrossedOverBear + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXTDBullCrossedUnderBear)) { result += "isXTDBullCrossedUnderBear: " + (string)mConditions.isXTDBullCrossedUnderBear + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXTDSignalCrossedOverBear)) { result += "isXTDSignalCrossedOverBear: " + (string)mConditions.isXTDSignalCrossedOverBear + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXTDSignalCrossedUnderBear)) { result += "isXTDSignalCrossedUnderBear: " + (string)mConditions.isXTDSignalCrossedUnderBear + separator; } // // Separator ... result += separator; // // XLH ... result += "| XLH |" + separator; // if ( !ignoreFalses || (ignoreFalses && mConditions.isXLHHHIncreased)) { result += "isXLHHHIncreased: " + (string)mConditions.isXLHHHIncreased + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXLHHHDecreased)) { result += "isXLHHHDecreased: " + (string)mConditions.isXLHHHDecreased + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXLHLLIncreased)) { result += "isXLHLLIncreased: " + (string)mConditions.isXLHLLIncreased + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXLHLLDecreased)) { result += "isXLHLLDecreased: " + (string)mConditions.isXLHLLDecreased + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXLHHighAttachedHH)) { result += "isXLHHighAttachedHH: " + (string)mConditions.isXLHHighAttachedHH + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXLHLowAttachedLL)) { result += "isXLHLowAttachedLL: " + (string)mConditions.isXLHLowAttachedLL + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXLHHHSameInLength)) { result += "isXLHHHSameInLength: " + (string)mConditions.isXLHHHSameInLength + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXLHLLSameInLength)) { result += "isXLHLLSameInLength: " + (string)mConditions.isXLHLLSameInLength + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXLHPriceCrossedOverSignal)) { result += "isXLHPriceCrossedOverSignal: " + (string)mConditions.isXLHPriceCrossedOverSignal + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXLHPriceOverSignal)) { result += "isXLHPriceOverSignal: " + (string)mConditions.isXLHPriceOverSignal + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXLHPriceCrossedUnderSignal)) { result += "isXLHPriceCrossedUnderSignal: " + (string)mConditions.isXLHPriceCrossedUnderSignal + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXLHPriceUnderSignal)) { result += "isXLHPriceUnderSignal: " + (string)mConditions.isXLHPriceUnderSignal + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXLHPriceInSignalRange)) { result += "isXLHPriceInSignalRange: " + (string)mConditions.isXLHPriceInSignalRange + separator; } // // Separator ... result += separator; // // XRSI ... result += "| XRSI |" + separator; // if ( !ignoreFalses || (ignoreFalses && mConditions.isXRSIPeak)) { result += "isXRSIPeak: " + (string)mConditions.isXRSIPeak + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXRSIVale)) { result += "isXRSIVale: " + (string)mConditions.isXRSIVale + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXRSICrossedOverLongExit)) { result += "isXRSICrossedOverLongExit: " + (string)mConditions.isXRSICrossedOverLongExit + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXRSICrossedOverLongEntry)) { result += "isXRSICrossedOverLongEntry: " + (string)mConditions.isXRSICrossedOverLongEntry + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXRSICrossedUnderShortExit)) { result += "isXRSICrossedUnderShortExit: " + (string)mConditions.isXRSICrossedUnderShortExit + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXRSICrossedUnderShortEntry)) { result += "isXRSICrossedUnderShortEntry: " + (string)mConditions.isXRSICrossedUnderShortEntry + separator; } // // Separator ... result += separator; // // XCHLH ... result += "| XCHLH |" + separator; // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHLHSameHHs)) { result += "isXCHLHSameHHs: " + (string)mConditions.isXCHLHSameHHs + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHLHSameLLs)) { result += "isXCHLHSameLLs: " + (string)mConditions.isXCHLHSameLLs + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHLHSCMCHHSame)) { result += "isXCHLHSCMCHHSame: " + (string)mConditions.isXCHLHSCMCHHSame + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHLHSCMCLLSame)) { result += "isXCHLHSCMCLLSame: " + (string)mConditions.isXCHLHSCMCLLSame + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHLHSCLCHHSame)) { result += "isXCHLHSCLCHHSame: " + (string)mConditions.isXCHLHSCLCHHSame + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHLHSCLCLLSame)) { result += "isXCHLHSCLCLLSame: " + (string)mConditions.isXCHLHSCLCLLSame + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHLHMCLCHHSame)) { result += "isXCHLHMCLCHHSame: " + (string)mConditions.isXCHLHMCLCHHSame + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHLHMCLCLLSame)) { result += "isXCHLHMCLCLLSame: " + (string)mConditions.isXCHLHMCLCLLSame + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHLHMCOnTopOfLC)) { result += "isXCHLHMCOnTopOfLC: " + (string)mConditions.isXCHLHMCOnTopOfLC + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHLHMCInBottomOfLC)) { result += "isXCHLHMCInBottomOfLC: " + (string)mConditions.isXCHLHMCInBottomOfLC + separator; } // // Separator ... result += separator; // // XCHMA ... result += "| XCHMA |" + separator; // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHMASCOverMax)) { result += "isXCHMASCOverMax: " + (string)mConditions.isXCHMASCOverMax + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHMASCOverMin)) { result += "isXCHMASCOverMin: " + (string)mConditions.isXCHMASCOverMin + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHMASCUnderMax)) { result += "isXCHMASCUnderMax: " + (string)mConditions.isXCHMASCUnderMax + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHMASCUnderMin)) { result += "isXCHMASCUnderMin: " + (string)mConditions.isXCHMASCUnderMin + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHMASCCrossedOverMax)) { result += "isXCHMASCCrossedOverMax: " + (string)mConditions.isXCHMASCCrossedOverMax + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHMASCCrossedUnderMax)) { result += "isXCHMASCCrossedUnderMax: " + (string)mConditions.isXCHMASCCrossedUnderMax + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHMASCCrossedOverMin)) { result += "isXCHMASCCrossedOverMin: " + (string)mConditions.isXCHMASCCrossedOverMin + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHMASCCrossedUnderMin)) { result += "isXCHMASCCrossedUnderMin: " + (string)mConditions.isXCHMASCCrossedUnderMin + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHMASCPeak)) { result += "isXCHMASCPeak: " + (string)mConditions.isXCHMASCPeak + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHMASCVale)) { result += "isXCHMASCVale: " + (string)mConditions.isXCHMASCVale + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHMASCTrendsUp)) { result += "isXCHMASCTrendsUp: " + (string)mConditions.isXCHMASCTrendsUp + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHMASCTrendsDown)) { result += "isXCHMASCTrendsDown: " + (string)mConditions.isXCHMASCTrendsDown + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHMASCFastOverSlow)) { result += "isXCHMASCFastOverSlow: " + (string)mConditions.isXCHMASCFastOverSlow + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHMASCFastUnderSlow)) { result += "isXCHMASCFastUnderSlow: " + (string)mConditions.isXCHMASCFastUnderSlow + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHMASCFastCrossedOverSlow)) { result += "isXCHMASCFastCrossedOverSlow: " + (string)mConditions.isXCHMASCFastCrossedOverSlow + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHMASCFastCrossedUnderSlow)) { result += "isXCHMASCFastCrossedUnderSlow: " + (string)mConditions.isXCHMASCFastCrossedUnderSlow + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHMAMCPeak)) { result += "isXCHMAMCPeak: " + (string)mConditions.isXCHMAMCPeak + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHMAMCVale)) { result += "isXCHMAMCVale: " + (string)mConditions.isXCHMAMCVale + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHMAMCTrendsUp)) { result += "isXCHMAMCTrendsUp: " + (string)mConditions.isXCHMAMCTrendsUp + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHMAMCTrendsDown)) { result += "isXCHMAMCTrendsDown: " + (string)mConditions.isXCHMAMCTrendsDown + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHMAMCFastOverSlow)) { result += "isXCHMAMCFastOverSlow: " + (string)mConditions.isXCHMAMCFastOverSlow + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHMAMCFastUnderSlow)) { result += "isXCHMAMCFastUnderSlow: " + (string)mConditions.isXCHMAMCFastUnderSlow + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHMAMCFastCrossedOverSlow)) { result += "isXCHMAMCFastCrossedOverSlow: " + (string)mConditions.isXCHMAMCFastCrossedOverSlow + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHMAMCFastCrossedUnderSlow)) { result += "isXCHMAMCFastCrossedUnderSlow: " + (string)mConditions.isXCHMAMCFastCrossedUnderSlow + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHMALCPeak)) { result += "isXCHMALCPeak: " + (string)mConditions.isXCHMALCPeak + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHMALCVale)) { result += "isXCHMALCVale: " + (string)mConditions.isXCHMALCVale + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHMALCTrendsUp)) { result += "isXCHMALCTrendsUp: " + (string)mConditions.isXCHMALCTrendsUp + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHMALCTrendsDown)) { result += "isXCHMALCTrendsDown: " + (string)mConditions.isXCHMALCTrendsDown + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHMALCFastOverSlow)) { result += "isXCHMALCFastOverSlow: " + (string)mConditions.isXCHMALCFastOverSlow + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHMALCFastUnderSlow)) { result += "isXCHMALCFastUnderSlow: " + (string)mConditions.isXCHMALCFastUnderSlow + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHMALCFastCrossedOverSlow)) { result += "isXCHMALCFastCrossedOverSlow: " + (string)mConditions.isXCHMALCFastCrossedOverSlow + separator; } // if ( !ignoreFalses || (ignoreFalses && mConditions.isXCHMALCFastCrossedUnderSlow)) { result += "isXCHMALCFastCrossedUnderSlow: " + (string)mConditions.isXCHMALCFastCrossedUnderSlow + separator; } // // Separator ... result += separator; // return result; } // // Generate Signallers States to Specific String Representation ... string XEU5GenerateSignallersStateString() { // string result = ""; // result += "\n"; // // XTD ... result += "XTD: " + "\n"; result += "Longs: " + (string)xEU5SignallerStates.XTD.longs + "\n"; result += "Shorts: " + (string)xEU5SignallerStates.XTD.shorts + "\n"; result += "\n"; // // XSI ... result += "XSI: " + "\n"; result += "Longs: " + (string)xEU5SignallerStates.XSI.longs + "\n"; result += "Shorts: " + (string)xEU5SignallerStates.XSI.shorts + "\n"; result += "\n"; // // XOBDLH ... result += "XOBDLH: " + "\n"; result += "Longs: " + (string)xEU5SignallerStates.XOBDLH.longs + "\n"; result += "Shorts: " + (string)xEU5SignallerStates.XOBDLH.shorts + "\n"; result += "\n"; // // XCHMACC ... result += "XCHMACC: " + "\n"; result += "Longs: " + (string)xEU5SignallerStates.XCHMACC.longs + "\n"; result += "Shorts: " + (string)xEU5SignallerStates.XCHMACC.shorts + "\n"; result += "\n"; // // XCHMACMX ... result += "XCHMACMX: " + "\n"; result += "Longs: " + (string)xEU5SignallerStates.XCHMACMX.longs + "\n"; result += "Shorts: " + (string)xEU5SignallerStates.XCHMACMX.shorts + "\n"; result += "\n"; // // XCHMACMN ... result += "XCHMACMN: " + "\n"; result += "Longs: " + (string)xEU5SignallerStates.XCHMACMN.longs + "\n"; result += "Shorts: " + (string)xEU5SignallerStates.XCHMACMN.shorts + "\n"; result += "\n"; // return result; } void Add( ENUM_XEU5_SIGNAL_PROVIDERS item, ENUM_XEU5_SIGNAL_PROVIDERS &items[]) { // ArrayResize( items, ArraySize(items) + 1); // items[ArraySize(items) - 1] = item; } // // START Utilities ... //