353 lines
16 KiB
Plaintext
353 lines
16 KiB
Plaintext
///////////////////////////////////////////////////////
|
|
//
|
|
// SaherElm IT Center MQL5 Strategy Parser Library
|
|
// ------------------------------------------------
|
|
// Name: XCHStartegyConditionsParser
|
|
// Description: provide all conditions parsing
|
|
// for XCH Strategy ...
|
|
//
|
|
//
|
|
// Maintainer:
|
|
// ------------
|
|
// Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com)
|
|
//
|
|
//////////////////////////////////////////////////////
|
|
//
|
|
// Global Properties ...
|
|
#property library
|
|
#property copyright "Copyright 2023, SaherElm IT Center"
|
|
#property link "https://www.saherelm.ir"
|
|
#property version "1.00"
|
|
#property strict
|
|
|
|
//
|
|
// Imports ...
|
|
#include "../../../../Strategies/x-saherelm.x121.strategy.mq5"
|
|
|
|
//
|
|
// Conditions Parser ...
|
|
struct X121StartegyAMarketsAUDUSD2024ShortConditionsParser
|
|
{
|
|
//
|
|
string _version;
|
|
|
|
//
|
|
bool IsFiltered(
|
|
X121StrategyConditions &conditions //
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
result =
|
|
//
|
|
(
|
|
// Symbol: AUDUSDb
|
|
// ---------------
|
|
// Scores:
|
|
// ---------------
|
|
// Bullish: 1.0
|
|
// Bearish: 71.0
|
|
// ---------------
|
|
// Time: 2024.03.20 10:15:02
|
|
// ---------------
|
|
//
|
|
// XPV ...
|
|
//
|
|
conditions.pvConditions.isNewVale &&
|
|
conditions.pvConditions.isNewValeUnderLast &&
|
|
conditions.pvConditions.isFiboDecreased &&
|
|
conditions.pvConditions.isCloseUnderFib1 &&
|
|
conditions.pvConditions.isCloseUnderFib2 &&
|
|
conditions.pvConditions.isCloseUnderFib3 &&
|
|
conditions.pvConditions.isCloseUnderFib4 &&
|
|
conditions.pvConditions.isCloseUnderFib5 &&
|
|
conditions.pvConditions.isSCBearish &&
|
|
conditions.pvConditions.isSCHHBearish &&
|
|
conditions.pvConditions.isSCLLBearish &&
|
|
conditions.pvConditions.isMCBearish &&
|
|
conditions.pvConditions.isMCHHBearish &&
|
|
conditions.pvConditions.isMCLLBearish &&
|
|
conditions.pvConditions.isMCSwitchedToBearish &&
|
|
conditions.pvConditions.isMCHHSwitchedToBearish &&
|
|
conditions.pvConditions.isLCLLBearish &&
|
|
conditions.pvConditions.isHCLLBearish &&
|
|
//
|
|
// XCHM ...
|
|
//
|
|
conditions.chmConditions.hasBearishPower &&
|
|
conditions.chmConditions.isBearishPowerIncreasing &&
|
|
conditions.chmConditions.isFastUnderSlow &&
|
|
conditions.chmConditions.isClosedUnderFast &&
|
|
conditions.chmConditions.isCFastUnderSlow &&
|
|
conditions.chmConditions.isClosedUnderCFast &&
|
|
conditions.chmConditions.isSFastUnderSlow &&
|
|
conditions.chmConditions.isClosedUnderSFast &&
|
|
conditions.chmConditions.isMFastUnderSlow &&
|
|
conditions.chmConditions.isClosedUnderMFast &&
|
|
conditions.chmConditions.isLFastUnderSlow &&
|
|
conditions.chmConditions.isClosedUnderLFast &&
|
|
conditions.chmConditions.isHFastUnderSlow &&
|
|
conditions.chmConditions.isClosedUnderHFast &&
|
|
//
|
|
// XCHHK ...
|
|
//
|
|
conditions.chhkConditions.hasBearishPower &&
|
|
conditions.chhkConditions.isBearishPowerIncreasing &&
|
|
conditions.chhkConditions.isCBearish &&
|
|
conditions.chhkConditions.isCloseUnderCLow &&
|
|
conditions.chhkConditions.isSBearish &&
|
|
conditions.chhkConditions.isCloseUnderSLow &&
|
|
conditions.chhkConditions.isMBearish &&
|
|
conditions.chhkConditions.isCloseUnderMLow &&
|
|
conditions.chhkConditions.isLBearish &&
|
|
conditions.chhkConditions.isCloseUnderLLow &&
|
|
conditions.chhkConditions.isHBearish &&
|
|
conditions.chhkConditions.isCloseUnderHLow &&
|
|
//
|
|
// XCHTD ...
|
|
//
|
|
conditions.chtdConditions.hasBearishPower &&
|
|
conditions.chtdConditions.isBearishPowerIncreasing &&
|
|
conditions.chtdConditions.isCBearish &&
|
|
conditions.chtdConditions.isSBearish &&
|
|
conditions.chtdConditions.isMBearish &&
|
|
conditions.chtdConditions.isLBearish &&
|
|
conditions.chtdConditions.isHBearish &&
|
|
//
|
|
// XCHICHWAP ...
|
|
//
|
|
conditions.chcheConditions.hasBearishPower &&
|
|
conditions.chcheConditions.isBearishPowerDecreasing &&
|
|
conditions.chcheConditions.isCBearish &&
|
|
conditions.chcheConditions.isCStrongBearish &&
|
|
conditions.chcheConditions.isSBearish &&
|
|
conditions.chcheConditions.isSStrongBearish &&
|
|
conditions.chcheConditions.isMBearish &&
|
|
conditions.chcheConditions.isMStrongBearish &&
|
|
conditions.chcheConditions.isLBearish &&
|
|
conditions.chcheConditions.isLStrongBearish &&
|
|
conditions.chcheConditions.isHBearish &&
|
|
conditions.chcheConditions.isHStrongBearish &&
|
|
//
|
|
// XCHSTR ...
|
|
//
|
|
conditions.chstrConditions.hasBearishPower &&
|
|
conditions.chstrConditions.isCBearish &&
|
|
conditions.chstrConditions.isSBearish &&
|
|
conditions.chstrConditions.isMBearish &&
|
|
conditions.chstrConditions.isLBearish &&
|
|
conditions.chstrConditions.isHBearish &&
|
|
//
|
|
// XCHVLM ...
|
|
//
|
|
conditions.chvlmConditions.hasBearishPower &&
|
|
conditions.chvlmConditions.isBearishPowerIncreasing &&
|
|
conditions.chvlmConditions.isCBearish &&
|
|
conditions.chvlmConditions.isSBearish &&
|
|
conditions.chvlmConditions.isMBearish &&
|
|
conditions.chvlmConditions.isLBearish &&
|
|
conditions.chvlmConditions.isHBearish &&
|
|
//
|
|
// XCHVWAP ...
|
|
//
|
|
conditions.chvwapConditions.hasBearishPower &&
|
|
conditions.chvwapConditions.isMBearish &&
|
|
conditions.chvwapConditions.isLBearish &&
|
|
conditions.chvwapConditions.isHBearish &&
|
|
//
|
|
// XCHICH ...
|
|
//
|
|
conditions.chichConditions.isCClosedUnderKijunSen &&
|
|
conditions.chichConditions.isCTenkanSenUnderKijunSen &&
|
|
conditions.chichConditions.isCSenkouSpanAUnderB &&
|
|
conditions.chichConditions.isCFutureSenkouSpanAUnderB &&
|
|
conditions.chichConditions.isSClosedUnderKijunSen &&
|
|
conditions.chichConditions.isSTenkanSenUnderKijunSen &&
|
|
conditions.chichConditions.isSSenkouSpanAOverB &&
|
|
conditions.chichConditions.isSFutureSenkouSpanAOverB &&
|
|
conditions.chichConditions.isMClosedUnderKijunSen &&
|
|
conditions.chichConditions.isMTenkanSenOverKijunSen &&
|
|
conditions.chichConditions.isMSenkouSpanAUnderB &&
|
|
conditions.chichConditions.isMFutureSenkouSpanAUnderB &&
|
|
conditions.chichConditions.isLClosedUnderKijunSen &&
|
|
conditions.chichConditions.isLTenkanSenUnderKijunSen &&
|
|
conditions.chichConditions.isLSenkouSpanAUnderB &&
|
|
conditions.chichConditions.isLFutureSenkouSpanAUnderB &&
|
|
conditions.chichConditions.isHClosedUnderKijunSen &&
|
|
conditions.chichConditions.isHTenkanSenUnderKijunSen &&
|
|
conditions.chichConditions.isHSenkouSpanAOverB &&
|
|
conditions.chichConditions.isHFutureSenkouSpanAOverB
|
|
//
|
|
)
|
|
//
|
|
||
|
|
//
|
|
(
|
|
// Symbol: AUDUSDb
|
|
// ---------------
|
|
// Scores:
|
|
// ---------------
|
|
// Bullish: 8.0
|
|
// Bearish: 81.0
|
|
// ---------------
|
|
// Time: 2024.05.14 15:35:00
|
|
// ---------------
|
|
//
|
|
// XPV ...
|
|
//
|
|
conditions.pvConditions.isNewVale &&
|
|
conditions.pvConditions.isNewValeUnderLast &&
|
|
conditions.pvConditions.isFiboDecreased &&
|
|
conditions.pvConditions.isCloseOverFib3 &&
|
|
conditions.pvConditions.isCloseOverFib4 &&
|
|
conditions.pvConditions.isCloseOverFib5 &&
|
|
conditions.pvConditions.isCloseUnderFib1 &&
|
|
conditions.pvConditions.isCloseUnderFib2 &&
|
|
conditions.pvConditions.isCloseCrossedUnderFib2 &&
|
|
conditions.pvConditions.isSCLLBearish &&
|
|
conditions.pvConditions.isMCLLBearish &&
|
|
conditions.pvConditions.isLCLLBearish &&
|
|
conditions.pvConditions.isLCSwitchedToBearish &&
|
|
conditions.pvConditions.isLCLLSwitchedToBeraish &&
|
|
conditions.pvConditions.isHCLLBearish &&
|
|
conditions.pvConditions.isHCSwitchedToBearish &&
|
|
conditions.pvConditions.isHCLLSwitchedToBeraish &&
|
|
//
|
|
// XCHM ...
|
|
//
|
|
conditions.chmConditions.hasBullishPower &&
|
|
conditions.chmConditions.isFastOverSlow &&
|
|
conditions.chmConditions.isClosedUnderFast &&
|
|
conditions.chmConditions.isCFastUnderSlow &&
|
|
conditions.chmConditions.isCFastCrossedUnderSlow &&
|
|
conditions.chmConditions.isClosedUnderCFast &&
|
|
conditions.chmConditions.isSFastOverSlow &&
|
|
conditions.chmConditions.isClosedUnderSFast &&
|
|
conditions.chmConditions.isMFastOverSlow &&
|
|
conditions.chmConditions.isClosedUnderMFast &&
|
|
conditions.chmConditions.isLFastOverSlow &&
|
|
conditions.chmConditions.isClosedUnderLFast &&
|
|
conditions.chmConditions.isHFastOverSlow &&
|
|
conditions.chmConditions.isClosedUnderHFast &&
|
|
//
|
|
// XCHHK ...
|
|
//
|
|
conditions.chhkConditions.hasBearishPower &&
|
|
conditions.chhkConditions.isBearishPowerUp &&
|
|
conditions.chhkConditions.isCBearish &&
|
|
conditions.chhkConditions.isCSwitchedToBearish &&
|
|
conditions.chhkConditions.isCloseUnderCLow &&
|
|
conditions.chhkConditions.isSBearish &&
|
|
conditions.chhkConditions.isSSwitchedToBearish &&
|
|
conditions.chhkConditions.isCloseUnderSLow &&
|
|
conditions.chhkConditions.isMBearish &&
|
|
conditions.chhkConditions.isMSwitchedToBearish &&
|
|
conditions.chhkConditions.isCloseUnderMLow &&
|
|
conditions.chhkConditions.isLBearish &&
|
|
conditions.chhkConditions.isLSwitchedToBearish &&
|
|
conditions.chhkConditions.isCloseUnderLLow &&
|
|
conditions.chhkConditions.isHBullish &&
|
|
conditions.chhkConditions.isCloseUnderHLow &&
|
|
//
|
|
// XCHTD ...
|
|
//
|
|
conditions.chtdConditions.hasBearishPower &&
|
|
conditions.chtdConditions.isBearishPowerUp &&
|
|
conditions.chtdConditions.isCBearish &&
|
|
conditions.chtdConditions.isSBearish &&
|
|
conditions.chtdConditions.isSSwitchedToBearish &&
|
|
conditions.chtdConditions.isMBearish &&
|
|
conditions.chtdConditions.isMSwitchedToBearish &&
|
|
conditions.chtdConditions.isLBullish &&
|
|
conditions.chtdConditions.isHBearish &&
|
|
conditions.chtdConditions.isHSwitchedToBearish &&
|
|
//
|
|
// XCHICHWAP ...
|
|
//
|
|
conditions.chcheConditions.hasBearishPower &&
|
|
conditions.chcheConditions.isBearishPowerUp &&
|
|
conditions.chcheConditions.isCBearish &&
|
|
conditions.chcheConditions.isCStrongBearish &&
|
|
conditions.chcheConditions.isCSwitchedToBearish &&
|
|
conditions.chcheConditions.isCStrongSwitchedToBearish &&
|
|
conditions.chcheConditions.isSBearish &&
|
|
conditions.chcheConditions.isSStrongBearish &&
|
|
conditions.chcheConditions.isSSwitchedToBearish &&
|
|
conditions.chcheConditions.isSStrongSwitchedToBearish &&
|
|
conditions.chcheConditions.isMBearish &&
|
|
conditions.chcheConditions.isMStrongBearish &&
|
|
conditions.chcheConditions.isMSwitchedToBearish &&
|
|
conditions.chcheConditions.isMStrongSwitchedToBearish &&
|
|
conditions.chcheConditions.isLBearish &&
|
|
conditions.chcheConditions.isLStrongBearish &&
|
|
conditions.chcheConditions.isLSwitchedToBearish &&
|
|
conditions.chcheConditions.isLStrongSwitchedToBearish &&
|
|
conditions.chcheConditions.isHBearish &&
|
|
conditions.chcheConditions.isHStrongBearish &&
|
|
conditions.chcheConditions.isHSwitchedToBearish &&
|
|
conditions.chcheConditions.isHStrongSwitchedToBearish &&
|
|
//
|
|
// XCHSTR ...
|
|
//
|
|
conditions.chstrConditions.hasBearishPower &&
|
|
conditions.chstrConditions.isBearishPowerUp &&
|
|
conditions.chstrConditions.isCBearish &&
|
|
conditions.chstrConditions.isCSwitchedToBearish &&
|
|
conditions.chstrConditions.isSBearish &&
|
|
conditions.chstrConditions.isSSwitchedToBearish &&
|
|
conditions.chstrConditions.isMBearish &&
|
|
conditions.chstrConditions.isMSwitchedToBearish &&
|
|
conditions.chstrConditions.isLBearish &&
|
|
conditions.chstrConditions.isLSwitchedToBearish &&
|
|
conditions.chstrConditions.isHBearish &&
|
|
conditions.chstrConditions.isHSwitchedToBearish &&
|
|
//
|
|
// XCHVLM ...
|
|
//
|
|
conditions.chvlmConditions.hasBearishPower &&
|
|
conditions.chvlmConditions.isCBearish &&
|
|
conditions.chvlmConditions.isSBearish &&
|
|
conditions.chvlmConditions.isSSwitchedToBearish &&
|
|
conditions.chvlmConditions.isMBearish &&
|
|
conditions.chvlmConditions.isLBearish &&
|
|
conditions.chvlmConditions.isHBearish &&
|
|
//
|
|
// XCHVWAP ...
|
|
//
|
|
//
|
|
// XCHICH ...
|
|
//
|
|
conditions.chichConditions.isCTenkanSenUnderKijunSen &&
|
|
conditions.chichConditions.isCTenkanSenCrossedUnderKijunSen &&
|
|
conditions.chichConditions.isCSenkouSpanAOverB &&
|
|
conditions.chichConditions.isCSenkouSpanAOverLast &&
|
|
conditions.chichConditions.isCFutureSenkouSpanAOverB &&
|
|
conditions.chichConditions.isCFutureSenkouSpanAOverLast &&
|
|
conditions.chichConditions.isSSenkouSpanAUnderB &&
|
|
conditions.chichConditions.isSSenkouSpanAUnderLast &&
|
|
conditions.chichConditions.isSFutureSenkouSpanAUnderB &&
|
|
conditions.chichConditions.isSFutureSenkouSpanAUnderLast &&
|
|
conditions.chichConditions.isMTenkanSenUnderKijunSen &&
|
|
conditions.chichConditions.isMSenkouSpanAOverB &&
|
|
conditions.chichConditions.isMFutureSenkouSpanAOverB &&
|
|
conditions.chichConditions.isLTenkanSenUnderKijunSen &&
|
|
conditions.chichConditions.isLSenkouSpanAUnderB &&
|
|
conditions.chichConditions.isLFutureSenkouSpanAUnderB &&
|
|
conditions.chichConditions.isHTenkanSenOverKijunSen &&
|
|
conditions.chichConditions.isHSenkouSpanAOverB &&
|
|
conditions.chichConditions.isHSenkouSpanAOverLast &&
|
|
conditions.chichConditions.isHFutureSenkouSpanAOverB &&
|
|
conditions.chichConditions.isHFutureSenkouSpanAOverLast
|
|
//
|
|
)
|
|
//
|
|
;
|
|
|
|
//
|
|
return result;
|
|
}
|
|
};
|
|
|
|
// |