1477 lines
35 KiB
Plaintext
1477 lines
35 KiB
Plaintext
///////////////////////////////////////////////////////////////////
|
|
//
|
|
// SaherElm IT Center MQL5 XTEST 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
|
|
|
|
//
|
|
// Include Provider Inputs ...
|
|
#include "x-saherelm.xtest.provider.inputs.lib.mq5";
|
|
|
|
//
|
|
// START Define Enums ...
|
|
//
|
|
|
|
//
|
|
// Represent Signals Methods ...
|
|
enum ENUM_X_SIGNAL_METHODS
|
|
{
|
|
//
|
|
// UNKNOWN ...
|
|
X_SIGNAL_UNKNOWN_METHOD,
|
|
//
|
|
// TM Based ...
|
|
X_SIGNAL_METHOD_ONE,
|
|
};
|
|
|
|
//
|
|
// Represent Market Conditions ...
|
|
struct X_TEST_MARKET_CONDITIONS
|
|
{
|
|
//
|
|
// XTM ...
|
|
bool isXTMPeak;
|
|
bool isXTMVale;
|
|
|
|
//
|
|
// XTD ...
|
|
bool isXTDSignalPeak;
|
|
bool isXTDSignalVale;
|
|
bool isXTDSignalOverBear;
|
|
bool isXTDSignalUnderBear;
|
|
bool isXTDSignalCrossedOverBear;
|
|
bool isXTDSignalCrossedUnderBear;
|
|
|
|
//
|
|
// XRSI ...
|
|
bool isXRSIPeak;
|
|
bool isXRSIVale;
|
|
bool isXRSICrossedOverLongExit;
|
|
bool isXRSICrossedOverLongEntry;
|
|
bool isXRSICrossedUnderShortExit;
|
|
bool isXRSICrossedUnderShortEntry;
|
|
|
|
//
|
|
// XOBD ...
|
|
bool isXOBDPeak;
|
|
bool isXOBDVale;
|
|
bool isXOBDSignalOverSwingHigh;
|
|
bool isXOBDSignalUnderSwingHigh;
|
|
bool isXOBDSignalCrossedOverSwingHigh;
|
|
bool isXOBDSignalCrossedUnderSwingHigh;
|
|
|
|
//
|
|
// XCHLH ...
|
|
//
|
|
bool isXCHLHSignalBOverSignalT;
|
|
bool isXCHLHSignalBUnderSignalT;
|
|
bool isXCHLHSignalBCrossedOverSignalT;
|
|
bool isXCHLHSignalBCrossedUnderSignalT;
|
|
//
|
|
bool isXCHLHSignalBOverLCLL;
|
|
bool isXCHLHSignalBUnderLCLL;
|
|
bool isXCHLHSignalBCrossedOverLCLL;
|
|
bool isXCHLHSignalBCrossedUnderLCLL;
|
|
//
|
|
bool isXCHLHSCMCHHSame;
|
|
bool isXCHLHSCMCLLSame;
|
|
//
|
|
bool isXCHLHSCLCHHSame;
|
|
bool isXCHLHSCLCLLSame;
|
|
//
|
|
bool isXCHLHMCLCHHSame;
|
|
bool isXCHLHMCLCLLSame;
|
|
|
|
//
|
|
// XCHMA ...
|
|
//
|
|
bool isXCHMASCPeak;
|
|
bool isXCHMASCVale;
|
|
bool isXCHMASCFastOverSlow;
|
|
bool isXCHMASCFastUnderSlow;
|
|
bool isXCHMASCFastCrossedOverSlow;
|
|
bool isXCHMASCFastCrossedUnderSlow;
|
|
//
|
|
bool isXCHMAMCPeak;
|
|
bool isXCHMAMCVale;
|
|
bool isXCHMAMCFastOverSlow;
|
|
bool isXCHMAMCFastUnderSlow;
|
|
bool isXCHMAMCFastCrossedOverSlow;
|
|
bool isXCHMAMCFastCrossedUnderSlow;
|
|
//
|
|
bool isXCHMALCPeak;
|
|
bool isXCHMALCVale;
|
|
bool isXCHMALCFastOverSlow;
|
|
bool isXCHMALCFastUnderSlow;
|
|
bool isXCHMALCFastCrossedOverSlow;
|
|
bool isXCHMALCFastCrossedUnderSlow;
|
|
};
|
|
|
|
//
|
|
// END Define Enums ...
|
|
//
|
|
|
|
//
|
|
// Imports all Indicators Helper here ...
|
|
input group "XTEST Provider Indicators";
|
|
//
|
|
#include "x-saherelm.xtm.indicator.helper.lib.mq5";
|
|
#include "x-saherelm.xtd.oscillator.helper.lib.mq5";
|
|
#include "x-saherelm.xrsi.oscillator.helper.lib.mq5";
|
|
#include "x-saherelm.xobd.oscillator.helper.lib.mq5";
|
|
#include "x-saherelm.xchlh.oscillator.helper.lib.mq5";
|
|
#include "x-saherelm.xchma.oscillator.helper.lib.mq5";
|
|
|
|
//
|
|
int xTESTMaxLengthOfInputs = 0;
|
|
int xTESTCalculatedBars = 0;
|
|
|
|
//
|
|
// Here we Define some Global Market Variables to Analyse MArket Conditions
|
|
// using them at each time ...
|
|
X_TEST_MARKET_CONDITIONS conditions = {};
|
|
|
|
//
|
|
// Init Indicators ...
|
|
bool XTESTInitIndicators()
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
// Check and Calculate Max Length in Inputs ...
|
|
//
|
|
|
|
//
|
|
// XTM ...
|
|
xTESTMaxLengthOfInputs = MathMax(
|
|
xTMMaPeriod,
|
|
xTESTNumberOfItemsPerTick);
|
|
|
|
//
|
|
// XTD ...
|
|
xTESTMaxLengthOfInputs = MathMax(
|
|
xTDLength,
|
|
xTESTMaxLengthOfInputs);
|
|
|
|
//
|
|
// XRSI ...
|
|
xTESTMaxLengthOfInputs = MathMax(
|
|
xRSILength,
|
|
xTESTMaxLengthOfInputs);
|
|
|
|
//
|
|
// XOBD ...
|
|
xTESTMaxLengthOfInputs = MathMax(
|
|
xOBDLength,
|
|
xTESTMaxLengthOfInputs);
|
|
|
|
//
|
|
// XCHLH ...
|
|
xTESTMaxLengthOfInputs = MathMax(
|
|
xCHLHLcLength,
|
|
xTESTMaxLengthOfInputs);
|
|
xTESTMaxLengthOfInputs = MathMax(
|
|
xCHLHMcLength,
|
|
xTESTMaxLengthOfInputs);
|
|
xTESTMaxLengthOfInputs = MathMax(
|
|
xCHLHScLength,
|
|
xTESTMaxLengthOfInputs);
|
|
|
|
//
|
|
// XCHMA ...
|
|
xTESTMaxLengthOfInputs = MathMax(
|
|
xCHMAScFastLength,
|
|
xTESTMaxLengthOfInputs);
|
|
xTESTMaxLengthOfInputs = MathMax(
|
|
xCHMAScSlowLength,
|
|
xTESTMaxLengthOfInputs);
|
|
xTESTMaxLengthOfInputs = MathMax(
|
|
xCHMAMcFastLength,
|
|
xTESTMaxLengthOfInputs);
|
|
xTESTMaxLengthOfInputs = MathMax(
|
|
xCHMAMcSlowLength,
|
|
xTESTMaxLengthOfInputs);
|
|
xTESTMaxLengthOfInputs = MathMax(
|
|
xCHMALcFastLength,
|
|
xTESTMaxLengthOfInputs);
|
|
xTESTMaxLengthOfInputs = MathMax(
|
|
xCHMALcSlowLength,
|
|
xTESTMaxLengthOfInputs);
|
|
|
|
//
|
|
// Initialize Indicator/Oscillator Handlers ...
|
|
ResetLastError();
|
|
|
|
//
|
|
// XTM Init ...
|
|
result = XTMInitHandlers();
|
|
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 XTESTReleaseIndicators()
|
|
{
|
|
//
|
|
// Release Handlers ...
|
|
XTMReleaseHandlers();
|
|
XTDReleaseHandlers();
|
|
XRSIReleaseHandlers();
|
|
XOBDReleaseHandlers();
|
|
XCHMAReleaseHandlers();
|
|
XCHLHReleaseHandlers();
|
|
}
|
|
|
|
//
|
|
// Handle Reading Buffers ...
|
|
void XTESTHandleReadingBuffers()
|
|
{
|
|
//
|
|
// Reading Calculated Bars for a Simple Handler ...
|
|
xTESTCalculatedBars = BarsCalculated(xTMHandler);
|
|
|
|
//
|
|
// Read Indicators Buffers ...
|
|
XTMReadBuffers(xTESTNumberOfItemsPerTick);
|
|
XTDReadBuffers(xTESTNumberOfItemsPerTick);
|
|
XRSIReadBuffers(xTESTNumberOfItemsPerTick);
|
|
XOBDReadBuffers(xTESTNumberOfItemsPerTick);
|
|
XCHMAReadBuffers(xTESTNumberOfItemsPerTick);
|
|
XCHLHReadBuffers(xTESTNumberOfItemsPerTick);
|
|
|
|
//
|
|
XTESTReadConditions();
|
|
}
|
|
|
|
//
|
|
//
|
|
// 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 XTESTCanOpenLongTrade()
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
bool hasSignal = XTESTHasLongSignal();
|
|
|
|
//
|
|
result =
|
|
//
|
|
hasSignal
|
|
//
|
|
;
|
|
|
|
//
|
|
// TODO: Remove this On Production ...
|
|
if (result)
|
|
{
|
|
//
|
|
string message = XTESTGetConditionsString("\n");
|
|
|
|
//
|
|
XTESTClearConditions();
|
|
|
|
//
|
|
LogMessage(message);
|
|
}
|
|
|
|
//
|
|
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 XTESTCanCloseLongTrade()
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
// TODO: Check Market Conditions for Close Long Trades ...
|
|
// result = XTESTHasLongCloseConditions(xTESTNumberOfItemsPerTick);
|
|
|
|
//
|
|
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 XTESTCanOpenShortTrade()
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
bool hasSignal = XTESTHasShortSignal();
|
|
|
|
//
|
|
result =
|
|
//
|
|
hasSignal
|
|
//
|
|
;
|
|
|
|
//
|
|
// TODO: Remove this On Production ...
|
|
if (result)
|
|
{
|
|
//
|
|
string message = XTESTGetConditionsString("\n");
|
|
|
|
//
|
|
XTESTClearConditions();
|
|
|
|
//
|
|
LogMessage(message);
|
|
}
|
|
|
|
//
|
|
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 XTESTCanCloseShortTrade()
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
// TODO: Check Market Conditions for Close Short Trades ...
|
|
// result = XTESTHasShortCloseConditions(xTESTNumberOfItemsPerTick);
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
//
|
|
// END Combination Functions ...
|
|
//
|
|
//
|
|
|
|
//
|
|
//
|
|
// START Combination ignaling ...
|
|
//
|
|
//
|
|
|
|
//
|
|
// Read All Globally Required Conditions ...
|
|
void XTESTReadConditions()
|
|
{
|
|
//
|
|
XTESTClearConditions();
|
|
|
|
//
|
|
// XTM ...
|
|
conditions.isXTMPeak = XTMIsPeak();
|
|
conditions.isXTMVale = XTMIsVale();
|
|
|
|
//
|
|
// XTD ...
|
|
conditions.isXTDSignalPeak = XTDIsSignalPeak();
|
|
conditions.isXTDSignalVale = XTDIsSignalVale();
|
|
conditions.isXTDSignalOverBear = XTDIsSignalOverBear(1);
|
|
conditions.isXTDSignalUnderBear = XTDIsSignalUnderBear(1);
|
|
conditions.isXTDSignalCrossedOverBear = XTDIsSignalCrossedOverBear(1);
|
|
conditions.isXTDSignalCrossedUnderBear = XTDIsSignalCrossedUnderBear(1);
|
|
|
|
//
|
|
// XRSI ...
|
|
conditions.isXRSIPeak = XRSIIsPeak();
|
|
conditions.isXRSIVale = XRSIIsVale();
|
|
conditions.isXRSICrossedOverLongExit = XRSIIsCrossedOverLongExit(1);
|
|
conditions.isXRSICrossedOverLongEntry = XRSIIsCrossedOverLongEntry(1);
|
|
conditions.isXRSICrossedUnderShortExit = XRSIIsCrossedUnderShortExit(1);
|
|
conditions.isXRSICrossedUnderShortEntry = XRSIIsCrossedUnderShortEntry(1);
|
|
|
|
//
|
|
// XOBD ...
|
|
conditions.isXOBDPeak = XOBDIsPeak();
|
|
conditions.isXOBDVale = XOBDIsVale();
|
|
conditions.isXOBDSignalOverSwingHigh = XOBDIsSignalOverSwingHigh(1);
|
|
conditions.isXOBDSignalUnderSwingHigh = XOBDIsSignalUnderSwingHigh(1);
|
|
conditions.isXOBDSignalCrossedOverSwingHigh = XOBDIsSignalCrossedOverSwingHigh(1);
|
|
conditions.isXOBDSignalCrossedUnderSwingHigh = XOBDIsSignalCrossedUnderSwingHigh(1);
|
|
|
|
//
|
|
// XCHLH ...
|
|
//
|
|
conditions.isXCHLHSignalBOverSignalT = XCHLHIsSignalBOverSignalT(1);
|
|
conditions.isXCHLHSignalBUnderSignalT = XCHLHIsSignalBUnderSignalT(1);
|
|
conditions.isXCHLHSignalBCrossedOverSignalT = XCHLHIsSignalBCrossedOverSignalT(1);
|
|
conditions.isXCHLHSignalBCrossedUnderSignalT = XCHLHIsSignalBCrossedUnderSignalT(1);
|
|
//
|
|
conditions.isXCHLHSignalBOverLCLL = XCHLHIsSignalBOverLCLL(1);
|
|
conditions.isXCHLHSignalBUnderLCLL = XCHLHIsSignalBUnderLCLL(1);
|
|
conditions.isXCHLHSignalBCrossedOverLCLL = XCHLHIsSignalBCrossedOverLCLL(1);
|
|
conditions.isXCHLHSignalBCrossedUnderLCLL = XCHLHIsSignalBCrossedUnderLCLL(1);
|
|
//
|
|
conditions.isXCHLHSCMCHHSame = XCHLHIsMCSCHasSameHH(1);
|
|
conditions.isXCHLHSCMCLLSame = XCHLHIsMCSCHasSameLL(1);
|
|
//
|
|
conditions.isXCHLHSCLCHHSame = XCHLHIsLCSCHasSameHH(1);
|
|
conditions.isXCHLHSCLCLLSame = XCHLHIsLCSCHasSameLL(1);
|
|
//
|
|
conditions.isXCHLHMCLCHHSame = XCHLHIsLCMCHasSameHH(1);
|
|
conditions.isXCHLHMCLCLLSame = XCHLHIsLCMCHasSameLL(1);
|
|
|
|
//
|
|
// XCHMA ...
|
|
//
|
|
conditions.isXCHMASCPeak = XCHMAIsSCPeak();
|
|
conditions.isXCHMASCVale = XCHMAIsSCVale();
|
|
conditions.isXCHMASCFastOverSlow = XCHMAIsSCFastOverSlow(1);
|
|
conditions.isXCHMASCFastUnderSlow = XCHMAIsSCFastUnderSlow(1);
|
|
conditions.isXCHMASCFastCrossedOverSlow = XCHMAIsSCFastCrossedOverSlow(1);
|
|
conditions.isXCHMASCFastCrossedUnderSlow = XCHMAIsSCFastCrossedUnderSlow(1);
|
|
//
|
|
conditions.isXCHMAMCPeak = XCHMAIsMCPeak();
|
|
conditions.isXCHMAMCVale = XCHMAIsMCVale();
|
|
conditions.isXCHMAMCFastOverSlow = XCHMAIsMCFastOverSlow(1);
|
|
conditions.isXCHMAMCFastUnderSlow = XCHMAIsMCFastUnderSlow(1);
|
|
conditions.isXCHMAMCFastCrossedOverSlow = XCHMAIsMCFastCrossedOverSlow(1);
|
|
conditions.isXCHMAMCFastCrossedUnderSlow = XCHMAIsMCFastCrossedUnderSlow(1);
|
|
//
|
|
conditions.isXCHMALCPeak = XCHMAIsLCPeak();
|
|
conditions.isXCHMALCVale = XCHMAIsLCVale();
|
|
conditions.isXCHMALCFastOverSlow = XCHMAIsLCFastOverSlow(1);
|
|
conditions.isXCHMALCFastUnderSlow = XCHMAIsLCFastUnderSlow(1);
|
|
conditions.isXCHMALCFastCrossedOverSlow = XCHMAIsLCFastCrossedOverSlow(1);
|
|
conditions.isXCHMALCFastCrossedUnderSlow = XCHMAIsLCFastCrossedUnderSlow(1);
|
|
}
|
|
|
|
//
|
|
// Cleanup Conditions ...
|
|
void XTESTClearConditions()
|
|
{
|
|
//
|
|
X_TEST_MARKET_CONDITIONS mConditions = {};
|
|
|
|
//
|
|
conditions = mConditions;
|
|
}
|
|
|
|
//
|
|
// Converts Market Conditions to Specific String Representation ...
|
|
string XTESTGetConditionsString(
|
|
string separator = ",", // Specify Separator
|
|
bool ignoreFalses = true // Ignore False Conditions
|
|
)
|
|
{
|
|
//
|
|
string result = "";
|
|
|
|
//
|
|
// XTM ...
|
|
result +=
|
|
"| XTM |" + separator;
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXTMPeak))
|
|
{
|
|
result += "isXTMPeak: " + (string)conditions.isXTMPeak + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXTMVale))
|
|
{
|
|
result += "isXTMVale: " + (string)conditions.isXTMVale + separator;
|
|
}
|
|
|
|
//
|
|
// Separator ...
|
|
result += separator;
|
|
|
|
//
|
|
// XTD ...
|
|
result +=
|
|
"| XTD |" + separator;
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXTDSignalPeak))
|
|
{
|
|
result += "isXTDSignalPeak: " + (string)conditions.isXTDSignalPeak + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXTDSignalVale))
|
|
{
|
|
result += "isXTDSignalVale: " + (string)conditions.isXTDSignalVale + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXTDSignalOverBear))
|
|
{
|
|
result += "isXTDSignalOverBear: " + (string)conditions.isXTDSignalOverBear + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXTDSignalUnderBear))
|
|
{
|
|
result += "isXTDSignalUnderBear: " + (string)conditions.isXTDSignalUnderBear + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXTDSignalCrossedOverBear))
|
|
{
|
|
result += "isXTDSignalCrossedOverBear: " + (string)conditions.isXTDSignalCrossedOverBear + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXTDSignalCrossedUnderBear))
|
|
{
|
|
result += "isXTDSignalCrossedUnderBear: " + (string)conditions.isXTDSignalCrossedUnderBear + separator;
|
|
}
|
|
|
|
//
|
|
// Separator ...
|
|
result += separator;
|
|
|
|
//
|
|
// XRSI ...
|
|
result +=
|
|
"| XRSI |" + separator;
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXRSIPeak))
|
|
{
|
|
result += "isXRSIPeak: " + (string)conditions.isXRSIPeak + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXRSIVale))
|
|
{
|
|
result += "isXRSIVale: " + (string)conditions.isXRSIVale + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXRSICrossedOverLongExit))
|
|
{
|
|
result += "isXRSICrossedOverLongExit: " + (string)conditions.isXRSICrossedOverLongExit + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXRSICrossedOverLongEntry))
|
|
{
|
|
result += "isXRSICrossedOverLongEntry: " + (string)conditions.isXRSICrossedOverLongEntry + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXRSICrossedUnderShortExit))
|
|
{
|
|
result += "isXRSICrossedUnderShortExit: " + (string)conditions.isXRSICrossedUnderShortExit + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXRSICrossedUnderShortEntry))
|
|
{
|
|
result += "isXRSICrossedUnderShortEntry: " + (string)conditions.isXRSICrossedUnderShortEntry + separator;
|
|
}
|
|
|
|
//
|
|
// Separator ...
|
|
result += separator;
|
|
|
|
//
|
|
// XOBD ...
|
|
result +=
|
|
"| XOBD |" + separator;
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXOBDPeak))
|
|
{
|
|
result += "isXOBDPeak: " + (string)conditions.isXOBDPeak + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXOBDVale))
|
|
{
|
|
result += "isXOBDVale: " + (string)conditions.isXOBDVale + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXOBDSignalOverSwingHigh))
|
|
{
|
|
result += "isXOBDSignalOverSwingHigh: " + (string)conditions.isXOBDSignalOverSwingHigh + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXOBDSignalUnderSwingHigh))
|
|
{
|
|
result += "isXOBDSignalUnderSwingHigh: " + (string)conditions.isXOBDSignalUnderSwingHigh + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXOBDSignalCrossedOverSwingHigh))
|
|
{
|
|
result += "isXOBDSignalCrossedOverSwingHigh: " + (string)conditions.isXOBDSignalCrossedOverSwingHigh + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXOBDSignalCrossedUnderSwingHigh))
|
|
{
|
|
result += "isXOBDSignalCrossedUnderSwingHigh: " + (string)conditions.isXOBDSignalCrossedUnderSwingHigh + separator;
|
|
}
|
|
|
|
//
|
|
// Separator ...
|
|
result += separator;
|
|
|
|
//
|
|
// XCHLH ...
|
|
result +=
|
|
"| XCHLH |" + separator;
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXCHLHSignalBOverSignalT))
|
|
{
|
|
result += "isXCHLHSignalBOverSignalT: " + (string)conditions.isXCHLHSignalBOverSignalT + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXCHLHSignalBUnderSignalT))
|
|
{
|
|
result += "isXCHLHSignalBUnderSignalT: " + (string)conditions.isXCHLHSignalBUnderSignalT + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXCHLHSignalBCrossedOverSignalT))
|
|
{
|
|
result += "isXCHLHSignalBCrossedOverSignalT: " + (string)conditions.isXCHLHSignalBCrossedOverSignalT + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXCHLHSignalBCrossedUnderSignalT))
|
|
{
|
|
result += "isXCHLHSignalBCrossedUnderSignalT: " + (string)conditions.isXCHLHSignalBCrossedUnderSignalT + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXCHLHSignalBOverLCLL))
|
|
{
|
|
result += "isXCHLHSignalBOverLCLL: " + (string)conditions.isXCHLHSignalBOverLCLL + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXCHLHSignalBUnderLCLL))
|
|
{
|
|
result += "isXCHLHSignalBUnderLCLL: " + (string)conditions.isXCHLHSignalBUnderLCLL + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXCHLHSignalBCrossedOverLCLL))
|
|
{
|
|
result += "isXCHLHSignalBCrossedOverLCLL: " + (string)conditions.isXCHLHSignalBCrossedOverLCLL + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXCHLHSignalBCrossedUnderLCLL))
|
|
{
|
|
result += "isXCHLHSignalBCrossedUnderLCLL: " + (string)conditions.isXCHLHSignalBCrossedUnderLCLL + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXCHLHSCMCHHSame))
|
|
{
|
|
result += "isXCHLHSCMCHHSame: " + (string)conditions.isXCHLHSCMCHHSame + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXCHLHSCMCLLSame))
|
|
{
|
|
result += "isXCHLHSCMCLLSame: " + (string)conditions.isXCHLHSCMCLLSame + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXCHLHSCLCHHSame))
|
|
{
|
|
result += "isXCHLHSCLCHHSame: " + (string)conditions.isXCHLHSCLCHHSame + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXCHLHSCLCLLSame))
|
|
{
|
|
result += "isXCHLHSCLCLLSame: " + (string)conditions.isXCHLHSCLCLLSame + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXCHLHMCLCHHSame))
|
|
{
|
|
result += "isXCHLHMCLCHHSame: " + (string)conditions.isXCHLHMCLCHHSame + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXCHLHMCLCLLSame))
|
|
{
|
|
result += "isXCHLHMCLCLLSame: " + (string)conditions.isXCHLHMCLCLLSame + separator;
|
|
}
|
|
|
|
//
|
|
// Separator ...
|
|
result += separator;
|
|
|
|
//
|
|
// XCHMA ...
|
|
result +=
|
|
"| XCHMA |" + separator;
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXCHMASCPeak))
|
|
{
|
|
result += "isXCHMASCPeak: " + (string)conditions.isXCHMASCPeak + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXCHMASCVale))
|
|
{
|
|
result += "isXCHMASCVale: " + (string)conditions.isXCHMASCVale + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXCHMASCFastOverSlow))
|
|
{
|
|
result += "isXCHMASCFastOverSlow: " + (string)conditions.isXCHMASCFastOverSlow + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXCHMASCFastUnderSlow))
|
|
{
|
|
result += "isXCHMASCFastUnderSlow: " + (string)conditions.isXCHMASCFastUnderSlow + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXCHMASCFastCrossedOverSlow))
|
|
{
|
|
result += "isXCHMASCFastCrossedOverSlow: " + (string)conditions.isXCHMASCFastCrossedOverSlow + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXCHMASCFastCrossedUnderSlow))
|
|
{
|
|
result += "isXCHMASCFastCrossedUnderSlow: " + (string)conditions.isXCHMASCFastCrossedUnderSlow + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXCHMAMCPeak))
|
|
{
|
|
result += "isXCHMAMCPeak: " + (string)conditions.isXCHMAMCPeak + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXCHMAMCVale))
|
|
{
|
|
result += "isXCHMAMCVale: " + (string)conditions.isXCHMAMCVale + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXCHMAMCFastOverSlow))
|
|
{
|
|
result += "isXCHMAMCFastOverSlow: " + (string)conditions.isXCHMAMCFastOverSlow + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXCHMAMCFastUnderSlow))
|
|
{
|
|
result += "isXCHMAMCFastUnderSlow: " + (string)conditions.isXCHMAMCFastUnderSlow + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXCHMAMCFastCrossedOverSlow))
|
|
{
|
|
result += "isXCHMAMCFastCrossedOverSlow: " + (string)conditions.isXCHMAMCFastCrossedOverSlow + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXCHMAMCFastCrossedUnderSlow))
|
|
{
|
|
result += "isXCHMAMCFastCrossedUnderSlow: " + (string)conditions.isXCHMAMCFastCrossedUnderSlow + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXCHMALCPeak))
|
|
{
|
|
result += "isXCHMALCPeak: " + (string)conditions.isXCHMALCPeak + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXCHMALCVale))
|
|
{
|
|
result += "isXCHMALCVale: " + (string)conditions.isXCHMALCVale + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXCHMALCFastOverSlow))
|
|
{
|
|
result += "isXCHMALCFastOverSlow: " + (string)conditions.isXCHMALCFastOverSlow + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXCHMALCFastUnderSlow))
|
|
{
|
|
result += "isXCHMALCFastUnderSlow: " + (string)conditions.isXCHMALCFastUnderSlow + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXCHMALCFastCrossedOverSlow))
|
|
{
|
|
result += "isXCHMALCFastCrossedOverSlow: " + (string)conditions.isXCHMALCFastCrossedOverSlow + separator;
|
|
}
|
|
|
|
//
|
|
if (
|
|
!ignoreFalses ||
|
|
(ignoreFalses && conditions.isXCHMALCFastCrossedUnderSlow))
|
|
{
|
|
result += "isXCHMALCFastCrossedUnderSlow: " + (string)conditions.isXCHMALCFastCrossedUnderSlow + separator;
|
|
}
|
|
|
|
//
|
|
// Separator ...
|
|
result += separator;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// Check Market Conditions by Combination of Power of All tools for LONGs ...
|
|
bool XTESTHasLongSignal()
|
|
{
|
|
//
|
|
bool result = false;
|
|
ENUM_X_SIGNAL_METHODS methods[];
|
|
|
|
//
|
|
// Retrieve all Long Signals based on Stuffs ...
|
|
bool isXTMHasSignal = XTMHasLongConditions(xTESTNumberOfItemsPerTick);
|
|
bool isXTDHasSignal = XTDHasLongConditions(xTESTNumberOfItemsPerTick);
|
|
bool isXRSIHasSignal = XRSIHasLongConditions(xTESTNumberOfItemsPerTick);
|
|
bool isXOBDHasSignal = XOBDHasLongConditions(xTESTNumberOfItemsPerTick);
|
|
bool isXCHLHHasSignal = XCHLHHasLongConditions(xTESTNumberOfItemsPerTick);
|
|
bool isXCHMAHasSignal = XCHMAHasLongConditions(xTESTNumberOfItemsPerTick);
|
|
|
|
//
|
|
// START Method 1 ...
|
|
//
|
|
|
|
//
|
|
// XTM ...
|
|
bool isXTMMethod1Verified = conditions.isXTMVale;
|
|
|
|
//
|
|
// XTD ...
|
|
bool isXTDMethod1Verifier =
|
|
conditions.isXTDSignalCrossedOverBear || conditions.isXTDSignalOverBear;
|
|
|
|
//
|
|
// XOBD ...
|
|
bool isXOBDMethod1Verified =
|
|
conditions.isXOBDSignalUnderSwingHigh; // || conditions.isXOBDSignalOverSwingHigh
|
|
|
|
//
|
|
// XRSI ...
|
|
// There is no RSI Verification ...
|
|
|
|
//
|
|
// XCHLH ...
|
|
bool isXCHLHMethod1Verified =
|
|
//
|
|
(
|
|
//
|
|
conditions.isXCHLHSignalBOverSignalT &&
|
|
conditions.isXCHLHSignalBOverLCLL
|
|
//
|
|
)
|
|
//
|
|
||
|
|
//
|
|
(
|
|
//
|
|
(
|
|
//
|
|
conditions.isXCHLHSignalBUnderSignalT &&
|
|
conditions.isXCHLHSignalBUnderLCLL
|
|
//
|
|
)
|
|
//
|
|
&&
|
|
//
|
|
(
|
|
//
|
|
(
|
|
//
|
|
conditions.isXCHMASCFastOverSlow &&
|
|
conditions.isXCHMAMCFastUnderSlow &&
|
|
conditions.isXCHMALCFastUnderSlow
|
|
//
|
|
)
|
|
?
|
|
//
|
|
!conditions.isXCHLHMCLCLLSame
|
|
:
|
|
//
|
|
!(
|
|
//
|
|
conditions.isXCHMASCFastUnderSlow &&
|
|
conditions.isXCHMAMCFastUnderSlow &&
|
|
conditions.isXCHMALCFastOverSlow
|
|
//
|
|
)
|
|
//
|
|
)
|
|
//
|
|
)
|
|
//
|
|
||
|
|
//
|
|
(
|
|
//
|
|
// Small Importance ...
|
|
(
|
|
//
|
|
conditions.isXCHLHSignalBUnderSignalT &&
|
|
conditions.isXCHLHSignalBOverLCLL
|
|
//
|
|
)
|
|
//
|
|
&&
|
|
//
|
|
(
|
|
//
|
|
!(
|
|
//
|
|
conditions.isXCHMASCFastOverSlow &&
|
|
conditions.isXCHMAMCFastUnderSlow &&
|
|
conditions.isXCHMALCFastUnderSlow
|
|
//
|
|
)
|
|
//
|
|
)
|
|
//
|
|
&&
|
|
//
|
|
(
|
|
//
|
|
// Special Condition on Old Age Trades ...
|
|
(
|
|
//
|
|
(
|
|
//
|
|
conditions.isXCHMALCFastOverSlow &&
|
|
conditions.isXCHMASCFastUnderSlow &&
|
|
conditions.isXCHMAMCFastUnderSlow
|
|
//
|
|
)
|
|
//
|
|
||
|
|
//
|
|
(
|
|
//
|
|
conditions.isXCHMASCFastOverSlow &&
|
|
conditions.isXCHMAMCFastOverSlow &&
|
|
conditions.isXCHMALCFastOverSlow
|
|
//
|
|
)
|
|
//
|
|
)
|
|
//
|
|
? !conditions.isXCHLHMCLCHHSame
|
|
: true
|
|
//
|
|
)
|
|
//
|
|
)
|
|
//
|
|
;
|
|
|
|
//
|
|
// XCHMA ...
|
|
bool isXCHMAMethod1Verified =
|
|
//
|
|
(
|
|
//
|
|
(
|
|
(
|
|
//
|
|
conditions.isXCHMASCFastOverSlow &&
|
|
conditions.isXCHMAMCFastUnderSlow &&
|
|
conditions.isXCHMALCFastUnderSlow
|
|
//
|
|
)
|
|
//
|
|
&&
|
|
//
|
|
xCHMAScSlowBuffer[1] > XCHMAGetMin(1)
|
|
//
|
|
)
|
|
//
|
|
||
|
|
//
|
|
(
|
|
//
|
|
conditions.isXCHMAMCFastOverSlow &&
|
|
conditions.isXCHMASCFastUnderSlow &&
|
|
conditions.isXCHMALCFastUnderSlow
|
|
//
|
|
)
|
|
//
|
|
||
|
|
//
|
|
(
|
|
//
|
|
conditions.isXCHMALCFastOverSlow &&
|
|
conditions.isXCHMASCFastUnderSlow &&
|
|
conditions.isXCHMAMCFastUnderSlow
|
|
//
|
|
)
|
|
//
|
|
||
|
|
//
|
|
(
|
|
//
|
|
(
|
|
//
|
|
conditions.isXCHMASCFastOverSlow &&
|
|
conditions.isXCHMAMCFastOverSlow &&
|
|
conditions.isXCHMALCFastOverSlow
|
|
//
|
|
)
|
|
//
|
|
&&
|
|
//
|
|
xCHMAScFastBuffer[1] < XCHMAGetMax(1)
|
|
//
|
|
)
|
|
//
|
|
)
|
|
//
|
|
;
|
|
|
|
//
|
|
// In this Method we give XTM Signals as a Base and then try to
|
|
// get Verifications from other stuffs ...
|
|
bool isMethod1HasSignal =
|
|
//
|
|
isXTMMethod1Verified
|
|
//
|
|
&&
|
|
//
|
|
isXTDMethod1Verifier
|
|
//
|
|
&&
|
|
//
|
|
isXOBDMethod1Verified
|
|
//
|
|
&&
|
|
//
|
|
isXCHLHMethod1Verified
|
|
//
|
|
&&
|
|
//
|
|
isXCHMAMethod1Verified
|
|
//
|
|
;
|
|
|
|
//
|
|
// Filling Methods Buffer ...
|
|
if (isMethod1HasSignal)
|
|
{
|
|
//
|
|
ArrayResize(
|
|
methods,
|
|
ArraySize(methods) + 1);
|
|
|
|
//
|
|
methods[ArraySize(methods) - 1] = X_SIGNAL_METHOD_ONE;
|
|
}
|
|
|
|
//
|
|
// END Method 1 ...
|
|
//
|
|
|
|
//
|
|
// START Method 2 ...
|
|
//
|
|
|
|
//
|
|
// END Method 2 ...
|
|
//
|
|
|
|
//
|
|
result =
|
|
isMethod1HasSignal;
|
|
|
|
//
|
|
// XTESTClearConditions();
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
// Check Market Conditions by Combination of Power of All tools for SHORTs ...
|
|
bool XTESTHasShortSignal()
|
|
{
|
|
//
|
|
bool result = false;
|
|
ENUM_X_SIGNAL_METHODS methods[];
|
|
|
|
//
|
|
// Retrieve all Long Signals based on Stuffs ...
|
|
bool isXTMHasSignal = XTMHasShortConditions(xTESTNumberOfItemsPerTick);
|
|
bool isXTDHasSignal = XTDHasShortConditions(xTESTNumberOfItemsPerTick);
|
|
bool isXRSIHasSignal = XRSIHasShortConditions(xTESTNumberOfItemsPerTick);
|
|
bool isXOBDHasSignal = XOBDHasShortConditions(xTESTNumberOfItemsPerTick);
|
|
bool isXCHLHHasSignal = XCHLHHasShortConditions(xTESTNumberOfItemsPerTick);
|
|
bool isXCHMAHasSignal = XCHMAHasShortConditions(xTESTNumberOfItemsPerTick);
|
|
|
|
//
|
|
// START Method 1 ...
|
|
//
|
|
|
|
//
|
|
// XTM ...
|
|
bool isXTMMethod1Verified = conditions.isXTMPeak;
|
|
|
|
//
|
|
// XTD ...
|
|
bool isXTDMethod1Verifier = conditions.isXTDSignalUnderBear;
|
|
|
|
//
|
|
// XRSI ...
|
|
// There is no RSI Verification ...
|
|
|
|
//
|
|
// XOBD ...
|
|
bool isXOBDMethod1Verified = conditions.isXOBDSignalUnderSwingHigh;
|
|
|
|
//
|
|
// XCHLH Case 1
|
|
bool isXCHLHCase1 =
|
|
conditions.isXCHLHSignalBOverSignalT &&
|
|
conditions.isXCHLHSignalBOverLCLL &&
|
|
!conditions.isXCHLHMCLCHHSame;
|
|
|
|
//
|
|
// XCHLH Case 2
|
|
bool isXCHLHCase2 =
|
|
conditions.isXCHLHSignalBCrossedUnderSignalT &&
|
|
conditions.isXCHLHSignalBUnderSignalT;
|
|
|
|
//
|
|
// XCHLH ...
|
|
bool isXCHLHMethod1Verified =
|
|
//
|
|
(
|
|
isXCHLHCase1 ||
|
|
isXCHLHCase2)
|
|
//
|
|
;
|
|
|
|
//
|
|
// XCHMA Case1 ...
|
|
bool isCHMACase1 =
|
|
(conditions.isXCHMASCFastUnderSlow || conditions.isXCHMASCFastCrossedUnderSlow) &&
|
|
conditions.isXCHMAMCFastOverSlow &&
|
|
(conditions.isXCHMALCFastUnderSlow || conditions.isXCHMALCFastOverSlow);
|
|
|
|
//
|
|
// XCHMA Case2 ...
|
|
bool isCHMACase2 =
|
|
conditions.isXCHMASCFastOverSlow &&
|
|
conditions.isXCHMAMCFastOverSlow &&
|
|
conditions.isXCHMALCFastUnderSlow;
|
|
|
|
//
|
|
// XCHMA Case3 ...
|
|
bool isCHMACase3 =
|
|
conditions.isXCHMASCFastUnderSlow &&
|
|
conditions.isXCHMAMCFastOverSlow &&
|
|
conditions.isXCHMALCFastOverSlow;
|
|
|
|
//
|
|
// XCHMA ...
|
|
bool isXCHMAMethod1Verified =
|
|
//
|
|
(
|
|
//
|
|
isXCHLHCase1 ?
|
|
//
|
|
(
|
|
//
|
|
isCHMACase1 ||
|
|
isCHMACase2 ||
|
|
isCHMACase3
|
|
//
|
|
)
|
|
:
|
|
//
|
|
false
|
|
//
|
|
)
|
|
//
|
|
||
|
|
//
|
|
(
|
|
//
|
|
isXCHLHCase2 ?
|
|
//
|
|
(
|
|
//
|
|
true
|
|
//
|
|
)
|
|
:
|
|
//
|
|
false
|
|
//
|
|
)
|
|
//
|
|
;
|
|
|
|
//
|
|
// In this Method we give XTM Signals as a Base and then try to
|
|
// get Verifications from other stuffs ...
|
|
bool isMethod1HasSignal =
|
|
//
|
|
isXTMMethod1Verified
|
|
//
|
|
&&
|
|
//
|
|
isXTDMethod1Verifier
|
|
//
|
|
&&
|
|
//
|
|
isXOBDMethod1Verified
|
|
//
|
|
&&
|
|
//
|
|
isXCHLHMethod1Verified
|
|
//
|
|
&&
|
|
//
|
|
isXCHMAMethod1Verified
|
|
//
|
|
;
|
|
|
|
//
|
|
// Filling Methods Buffer ...
|
|
if (isMethod1HasSignal)
|
|
{
|
|
//
|
|
ArrayResize(
|
|
methods,
|
|
ArraySize(methods) + 1);
|
|
|
|
//
|
|
methods[ArraySize(methods) - 1] = X_SIGNAL_METHOD_ONE;
|
|
}
|
|
|
|
//
|
|
// END Method 1 ...
|
|
//
|
|
|
|
//
|
|
// START Method 2 ...
|
|
//
|
|
|
|
//
|
|
// END Method 2 ...
|
|
//
|
|
|
|
//
|
|
result =
|
|
isMethod1HasSignal;
|
|
|
|
//
|
|
// XTESTClearConditions();
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
//
|
|
//
|
|
// END Combination ignaling ...
|
|
//
|
|
//
|