apply last POI Changes Refctor and Resolve all Side Affect Issues on X121 SMC Expert Projects ...

This commit is contained in:
2025-03-17 23:40:00 +03:30
parent f8ff7a0dbe
commit 5ac08cf97b
12 changed files with 4415 additions and 1160 deletions
@@ -23,6 +23,7 @@
// Imports ...
#include "../Classes/x-saherelm.base.class.mq5"
#include "../Classes/x-saherelm.x-cobject.class.mq5"
#include "../Libraries/x-saherelm.x-poi.state.lib.mq5"
#include "../Libraries/x-saherelm.x-poi.extensions.lib.mq5"
//
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-98
View File
@@ -220,22 +220,6 @@ struct X121XATRConditions
bool isClosedUnderAtrUpper;
bool isClosedUnderAtrLower;
//
bool isRejectedUpAtrUpper;
bool isRejectedDownAtrUpper;
//
bool isRejectedUpAtrLower;
bool isRejectedDownAtrLower;
//
bool isBreakedUpAtrUpper;
bool isBreakedDownAtrUpper;
//
bool isBreakedUpAtrLower;
bool isBreakedDownAtrLower;
//
// bool isCloseLower
@@ -306,22 +290,6 @@ struct X121XATRConditions
isClosedUnderAtrUpper = false;
isClosedUnderAtrLower = false;
//
isRejectedUpAtrUpper = false;
isRejectedDownAtrUpper = false;
//
isRejectedUpAtrLower = false;
isRejectedDownAtrLower = false;
//
isBreakedUpAtrUpper = false;
isBreakedDownAtrUpper = false;
//
isBreakedUpAtrLower = false;
isBreakedDownAtrLower = false;
//
ZeroMemory(this);
}
@@ -409,14 +377,6 @@ struct X121XATRConditions
ToString("isClosedOverAtrLower", isClosedOverAtrLower, ignoreFalseConditions, separator) +
ToString("isClosedUnderAtrUpper", isClosedUnderAtrUpper, ignoreFalseConditions, separator) +
ToString("isClosedUnderAtrLower", isClosedUnderAtrLower, ignoreFalseConditions, separator) +
ToString("isRejectedUpAtrUpper", isRejectedUpAtrUpper, ignoreFalseConditions, separator) +
ToString("isRejectedDownAtrUpper", isRejectedDownAtrUpper, ignoreFalseConditions, separator) +
ToString("isRejectedUpAtrLower", isRejectedUpAtrLower, ignoreFalseConditions, separator) +
ToString("isRejectedDownAtrLower", isRejectedDownAtrLower, ignoreFalseConditions, separator) +
ToString("isBreakedUpAtrUpper", isBreakedUpAtrUpper, ignoreFalseConditions, separator) +
ToString("isBreakedDownAtrUpper", isBreakedDownAtrUpper, ignoreFalseConditions, separator) +
ToString("isBreakedUpAtrLower", isBreakedUpAtrLower, ignoreFalseConditions, separator) +
ToString("isBreakedDownAtrLower", isBreakedDownAtrLower, ignoreFalseConditions, separator) +
//
""
//
@@ -1048,69 +1008,11 @@ class XCX121XATRHelper : public XCBaseHelper
bool isClosedUnderAtrUpper = cBar.close < conditions.atrUpperBuffer[cIDX];
bool isClosedUnderAtrLower = cBar.close < conditions.atrLowerBuffer[cIDX];
//
bool isRejectedUpAtrUpper = IsBarReject(
atrUpperBuffer[cIDX],
X_DIRECTION_BULLISH,
cBar //
);
bool isRejectedDownAtrUpper = IsBarReject(
atrUpperBuffer[cIDX],
X_DIRECTION_BEARISH,
cBar //
);
//
bool isRejectedUpAtrLower = IsBarReject(
atrLowerBuffer[cIDX],
X_DIRECTION_BULLISH,
cBar //
);
;
bool isRejectedDownAtrLower = IsBarReject(
atrLowerBuffer[cIDX],
X_DIRECTION_BEARISH,
cBar //
);
;
//
bool isBreakedUpAtrUpper = IsBarBreak(
atrUpperBuffer[cIDX],
X_DIRECTION_BULLISH,
cBar //
);
bool isBreakedDownAtrUpper = IsBarBreak(
atrUpperBuffer[cIDX],
X_DIRECTION_BEARISH,
cBar //
);
//
bool isBreakedUpAtrLower = IsBarBreak(
atrLowerBuffer[cIDX],
X_DIRECTION_BULLISH,
cBar //
);
bool isBreakedDownAtrLower = IsBarBreak(
atrLowerBuffer[cIDX],
X_DIRECTION_BEARISH,
cBar //
);
//
conditions.isRsiOverSold = isRsiOverSold;
conditions.isRsiOverBought = isRsiOverBought;
conditions.isRejectedUpAtrUpper = isRejectedUpAtrUpper;
conditions.isRejectedUpAtrLower = isRejectedUpAtrLower;
conditions.isBreakedUpAtrUpper = isBreakedUpAtrUpper;
conditions.isBreakedUpAtrLower = isBreakedUpAtrLower;
conditions.isRejectedDownAtrUpper = isRejectedDownAtrUpper;
conditions.isRejectedDownAtrLower = isRejectedDownAtrLower;
conditions.isClosedOverAtrUpper = isClosedOverAtrUpper;
conditions.isClosedOverAtrLower = isClosedOverAtrLower;
conditions.isBreakedDownAtrUpper = isBreakedDownAtrUpper;
conditions.isBreakedDownAtrLower = isBreakedDownAtrLower;
conditions.isClosedUnderAtrUpper = isClosedUnderAtrUpper;
conditions.isClosedUnderAtrLower = isClosedUnderAtrLower;
conditions.isRsiCrossedOverOverSold = isRsiCrossedOverOverSold;
-173
View File
@@ -178,30 +178,6 @@ struct X121XDONConditions
//
// Conditions ...
//
bool isRejectedDonOpenUpper;
bool isRejectedDonHighUpper;
bool isRejectedDonLowUpper;
bool isRejectedDonCloseUpper;
//
bool isRejectedDonOpenLower;
bool isRejectedDonHighLower;
bool isRejectedDonLowLower;
bool isRejectedDonCloseLower;
//
bool isBreakedDonOpenUpper;
bool isBreakedDonHighUpper;
bool isBreakedDonLowUpper;
bool isBreakedDonCloseUpper;
//
bool isBreakedDonOpenLower;
bool isBreakedDonHighLower;
bool isBreakedDonLowLower;
bool isBreakedDonCloseLower;
//
// Constructor ...
X121XDONConditions()
@@ -249,30 +225,6 @@ struct X121XDONConditions
//
// Conditions ...
//
isRejectedDonOpenUpper = false;
isRejectedDonHighUpper = false;
isRejectedDonLowUpper = false;
isRejectedDonCloseUpper = false;
//
isRejectedDonOpenLower = false;
isRejectedDonHighLower = false;
isRejectedDonLowLower = false;
isRejectedDonCloseLower = false;
//
isBreakedDonOpenUpper = false;
isBreakedDonHighUpper = false;
isBreakedDonLowUpper = false;
isBreakedDonCloseUpper = false;
//
isBreakedDonOpenLower = false;
isBreakedDonHighLower = false;
isBreakedDonLowLower = false;
isBreakedDonCloseLower = false;
//
ZeroMemory(this);
}
@@ -347,25 +299,6 @@ struct X121XDONConditions
//
string conditionsStr =
//
ToString("isRejectedDonOpenUpper", isRejectedDonOpenUpper, ignoreFalseConditions, separator) +
ToString("isRejectedDonHighUpper", isRejectedDonHighUpper, ignoreFalseConditions, separator) +
ToString("isRejectedDonLowUpper", isRejectedDonLowUpper, ignoreFalseConditions, separator) +
ToString("isRejectedDonCloseUpper", isRejectedDonCloseUpper, ignoreFalseConditions, separator) +
//
ToString("isRejectedDonOpenLower", isRejectedDonOpenLower, ignoreFalseConditions, separator) +
ToString("isRejectedDonHighLower", isRejectedDonHighLower, ignoreFalseConditions, separator) +
ToString("isRejectedDonLowLower", isRejectedDonLowLower, ignoreFalseConditions, separator) +
ToString("isRejectedDonCloseLower", isRejectedDonCloseLower, ignoreFalseConditions, separator) +
//
ToString("isBreakedDonOpenUpper", isBreakedDonOpenUpper, ignoreFalseConditions, separator) +
ToString("isBreakedDonHighUpper", isBreakedDonHighUpper, ignoreFalseConditions, separator) +
ToString("isBreakedDonLowUpper", isBreakedDonLowUpper, ignoreFalseConditions, separator) +
ToString("isBreakedDonCloseUpper", isBreakedDonCloseUpper, ignoreFalseConditions, separator) +
//
ToString("isBreakedDonOpenLower", isBreakedDonOpenLower, ignoreFalseConditions, separator) +
ToString("isBreakedDonHighLower", isBreakedDonHighLower, ignoreFalseConditions, separator) +
ToString("isBreakedDonLowLower", isBreakedDonLowLower, ignoreFalseConditions, separator) +
ToString("isBreakedDonCloseLower", isBreakedDonCloseLower, ignoreFalseConditions, separator) +
//
""
//
@@ -1102,112 +1035,6 @@ class XCX121XDONHelper : public XCBaseHelper
//
int cIDX = 1;
int pIDX = cIDX + 1;
//
bool isRejectedDonOpenUpper = IsBarReject(
donOpenUpperBuffer[cIDX],
X_DIRECTION_BEARISH,
cBar //
);
bool isRejectedDonHighUpper = IsBarReject(
donHighUpperBuffer[cIDX],
X_DIRECTION_BEARISH,
cBar //
);
bool isRejectedDonLowUpper = IsBarReject(
donLowUpperBuffer[cIDX],
X_DIRECTION_BEARISH,
cBar //
);
bool isRejectedDonCloseUpper = IsBarReject(
donCloseUpperBuffer[cIDX],
X_DIRECTION_BEARISH,
cBar //
);
//
bool isRejectedDonOpenLower = IsBarReject(
donOpenLowerBuffer[cIDX],
X_DIRECTION_BULLISH,
cBar //
);
bool isRejectedDonHighLower = IsBarReject(
donHighLowerBuffer[cIDX],
X_DIRECTION_BULLISH,
cBar //
);
bool isRejectedDonLowLower = IsBarReject(
donLowLowerBuffer[cIDX],
X_DIRECTION_BULLISH,
cBar //
);
bool isRejectedDonCloseLower = IsBarReject(
donCloseLowerBuffer[cIDX],
X_DIRECTION_BULLISH,
cBar //
);
//
bool isBreakedDonOpenUpper = IsBarBreak(
donOpenUpperBuffer[cIDX],
X_DIRECTION_BEARISH,
cBar //
);
bool isBreakedDonHighUpper = IsBarBreak(
donHighUpperBuffer[cIDX],
X_DIRECTION_BEARISH,
cBar //
);
bool isBreakedDonLowUpper = IsBarBreak(
donLowUpperBuffer[cIDX],
X_DIRECTION_BEARISH,
cBar //
);
bool isBreakedDonCloseUpper = IsBarBreak(
donCloseUpperBuffer[cIDX],
X_DIRECTION_BEARISH,
cBar //
);
//
bool isBreakedDonOpenLower = IsBarBreak(
donOpenLowerBuffer[cIDX],
X_DIRECTION_BULLISH,
cBar //
);
bool isBreakedDonHighLower = IsBarBreak(
donHighLowerBuffer[cIDX],
X_DIRECTION_BULLISH,
cBar //
);
bool isBreakedDonLowLower = IsBarBreak(
donLowLowerBuffer[cIDX],
X_DIRECTION_BULLISH,
cBar //
);
bool isBreakedDonCloseLower = IsBarBreak(
donCloseLowerBuffer[cIDX],
X_DIRECTION_BULLISH,
cBar //
);
//
conditions.isBreakedDonLowUpper = isBreakedDonLowUpper;
conditions.isBreakedDonLowLower = isBreakedDonLowLower;
conditions.isRejectedDonLowUpper = isRejectedDonLowUpper;
conditions.isRejectedDonLowLower = isRejectedDonLowLower;
conditions.isBreakedDonOpenUpper = isBreakedDonOpenUpper;
conditions.isBreakedDonHighUpper = isBreakedDonHighUpper;
conditions.isBreakedDonOpenLower = isBreakedDonOpenLower;
conditions.isBreakedDonHighLower = isBreakedDonHighLower;
conditions.isRejectedDonOpenUpper = isRejectedDonOpenUpper;
conditions.isRejectedDonOpenLower = isRejectedDonOpenLower;
conditions.isRejectedDonHighUpper = isRejectedDonHighUpper;
conditions.isRejectedDonHighLower = isRejectedDonHighLower;
conditions.isBreakedDonCloseUpper = isBreakedDonCloseUpper;
conditions.isBreakedDonCloseLower = isBreakedDonCloseLower;
conditions.isRejectedDonCloseUpper = isRejectedDonCloseUpper;
conditions.isRejectedDonCloseLower = isRejectedDonCloseLower;
//
Cleanup();
-110
View File
@@ -179,20 +179,6 @@ struct X121XHKConditions
bool isRawHKClosedOverSMHK;
bool isRawHKClosedUnderSMHK;
//
bool isBreakedUpSMHK;
bool isBreakedUpRawHK;
bool isRejectedUpSMHK;
bool isRejectedUpRawHK;
bool isRawHKBreakedUpSMHK;
//
bool isBreakedDownSMHK;
bool isBreakedDownRawHK;
bool isRejectedDownSMHK;
bool isRejectedDownRawHK;
bool isRawHKBreakedDownSMHK;
//
// Constructor ...
X121XHKConditions()
@@ -262,20 +248,6 @@ struct X121XHKConditions
isRawHKClosedOverSMHK = false;
isRawHKClosedUnderSMHK = false;
//
isBreakedUpSMHK = false;
isBreakedUpRawHK = false;
isRejectedUpSMHK = false;
isRejectedUpRawHK = false;
isRawHKBreakedUpSMHK = false;
//
isBreakedDownSMHK = false;
isBreakedDownRawHK = false;
isRejectedDownSMHK = false;
isRejectedDownRawHK = false;
isRawHKBreakedDownSMHK = false;
//
ZeroMemory(this);
}
@@ -364,16 +336,6 @@ struct X121XHKConditions
ToString("isClosedUnderRawHK", isClosedUnderRawHK, ignoreFalseConditions, separator) +
ToString("isRawHKClosedOverSMHK", isRawHKClosedOverSMHK, ignoreFalseConditions, separator) +
ToString("isRawHKClosedUnderSMHK", isRawHKClosedUnderSMHK, ignoreFalseConditions, separator) +
ToString("isBreakedUpSMHK", isBreakedUpSMHK, ignoreFalseConditions, separator) +
ToString("isBreakedUpRawHK", isBreakedUpRawHK, ignoreFalseConditions, separator) +
ToString("isRejectedUpSMHK", isRejectedUpSMHK, ignoreFalseConditions, separator) +
ToString("isRejectedUpRawHK", isRejectedUpRawHK, ignoreFalseConditions, separator) +
ToString("isRawHKBreakedUpSMHK", isRawHKBreakedUpSMHK, ignoreFalseConditions, separator) +
ToString("isBreakedDownSMHK", isBreakedDownSMHK, ignoreFalseConditions, separator) +
ToString("isBreakedDownRawHK", isBreakedDownRawHK, ignoreFalseConditions, separator) +
ToString("isRejectedDownSMHK", isRejectedDownSMHK, ignoreFalseConditions, separator) +
ToString("isRejectedDownRawHK", isRejectedDownRawHK, ignoreFalseConditions, separator) +
ToString("isRawHKBreakedDownSMHK", isRawHKBreakedDownSMHK, ignoreFalseConditions, separator) +
//
""
//
@@ -1240,68 +1202,6 @@ class XCX121XHKHelper : public XCBaseHelper
bool isRawHKClosedOverSMHK = rawHKClose > smHKUp;
bool isRawHKClosedUnderSMHK = rawHKClose < smHKDown;
//
bool isBreakedUpSMHK = IsBarBreak(
smHKUp,
X_DIRECTION_BULLISH,
cBar //
);
bool isBreakedUpRawHK = IsBarBreak(
rawHKUp,
X_DIRECTION_BULLISH,
cBar //
);
bool isRejectedUpSMHK = IsBarReject(
smHKUp,
X_DIRECTION_BULLISH,
cBar //
);
bool isRejectedUpRawHK = IsBarReject(
rawHKUp,
X_DIRECTION_BULLISH,
cBar //
);
//
bool isRawHKBreakedUpSMHK =
hasRawHKBar &&
IsBarBreak(
smHKUp,
X_DIRECTION_BULLISH,
rawHKCBar //
);
//
bool isBreakedDownSMHK = IsBarBreak(
smHKDown,
X_DIRECTION_BEARISH,
cBar //
);
bool isBreakedDownRawHK = IsBarBreak(
rawHKDown,
X_DIRECTION_BEARISH,
cBar //
);
bool isRejectedDownSMHK = IsBarReject(
smHKDown,
X_DIRECTION_BEARISH,
cBar //
);
bool isRejectedDownRawHK = IsBarReject(
rawHKDown,
X_DIRECTION_BEARISH,
cBar //
);
//
bool isRawHKBreakedDownSMHK =
hasRawHKBar &&
IsBarBreak(
smHKDown,
X_DIRECTION_BEARISH,
rawHKCBar //
);
//
conditions.isSMHKBullish = isSMHKBullish;
conditions.isRawHKBullish = isRawHKBullish;
@@ -1317,16 +1217,6 @@ class XCX121XHKHelper : public XCBaseHelper
conditions.isClosedUnderRawHK = isClosedUnderRawHK;
conditions.isRawHKClosedOverSMHK = isRawHKClosedOverSMHK;
conditions.isRawHKClosedUnderSMHK = isRawHKClosedUnderSMHK;
conditions.isBreakedUpSMHK = isBreakedUpSMHK;
conditions.isBreakedUpRawHK = isBreakedUpRawHK;
conditions.isRejectedUpSMHK = isRejectedUpSMHK;
conditions.isRejectedUpRawHK = isRejectedUpRawHK;
conditions.isRawHKBreakedUpSMHK = isRawHKBreakedUpSMHK;
conditions.isBreakedDownSMHK = isBreakedDownSMHK;
conditions.isBreakedDownRawHK = isBreakedDownRawHK;
conditions.isRejectedDownSMHK = isRejectedDownSMHK;
conditions.isRejectedDownRawHK = isRejectedDownRawHK;
conditions.isRawHKBreakedDownSMHK = isRawHKBreakedDownSMHK;
//
Cleanup();
-36
View File
@@ -324,15 +324,11 @@ struct X121XPVConditions
bool isNewPeak;
bool isNewPeakOverLast;
bool isNewPeakUnderLast;
bool isRejectedPrevPeak;
bool isBreakedUpPrevPeak;
//
bool isNewVale;
bool isNewValeOverLast;
bool isNewValeUnderLast;
bool isRejectedPrevVale;
bool isBreakedDownPrevVale;
//
// Constructor ...
@@ -419,15 +415,11 @@ struct X121XPVConditions
isNewPeak = false;
isNewPeakOverLast = false;
isNewPeakUnderLast = false;
isRejectedPrevPeak = false;
isBreakedUpPrevPeak = false;
//
isNewVale = false;
isNewValeOverLast = false;
isNewValeUnderLast = false;
isRejectedPrevVale = false;
isBreakedDownPrevVale = false;
//
ZeroMemory(this);
@@ -510,13 +502,9 @@ struct X121XPVConditions
ToString("isNewPeak", isNewPeak, ignoreFalseConditions, separator) +
ToString("isNewPeakOverLast", isNewPeakOverLast, ignoreFalseConditions, separator) +
ToString("isNewPeakUnderLast", isNewPeakUnderLast, ignoreFalseConditions, separator) +
ToString("isRejectedPrevPeak", isRejectedPrevPeak, ignoreFalseConditions, separator) +
ToString("isBreakedUpPrevPeak", isBreakedUpPrevPeak, ignoreFalseConditions, separator) +
ToString("isNewVale", isNewVale, ignoreFalseConditions, separator) +
ToString("isNewValeOverLast", isNewValeOverLast, ignoreFalseConditions, separator) +
ToString("isNewValeUnderLast", isNewValeUnderLast, ignoreFalseConditions, separator) +
ToString("isRejectedPrevVale", isRejectedPrevVale, ignoreFalseConditions, separator) +
ToString("isBreakedDownPrevVale", isBreakedDownPrevVale, ignoreFalseConditions, separator) +
//
""
//
@@ -2447,16 +2435,6 @@ class XCX121XPVHelper : public XCBaseHelper
conditions.peaksBuffer[cIDX] > conditions.peaksBuffer[pIDX];
bool isNewPeakUnderLast = isNewPeak &&
conditions.peaksBuffer[cIDX] < conditions.peaksBuffer[pIDX];
bool isRejectedPrevPeak = IsBarReject(
conditions.peaksBuffer[pIDX],
X_DIRECTION_BEARISH,
cBar //
);
bool isBreakedUpPrevPeak = IsBarBreak(
conditions.peaksBuffer[pIDX],
X_DIRECTION_BULLISH,
cBar //
);
//
bool isNewVale = conditions.valesBuffer[cIDX] != conditions.valesBuffer[pIDX];
@@ -2464,16 +2442,6 @@ class XCX121XPVHelper : public XCBaseHelper
conditions.valesBuffer[cIDX] > conditions.valesBuffer[pIDX];
bool isNewValeUnderLast = isNewVale &&
conditions.valesBuffer[cIDX] < conditions.valesBuffer[pIDX];
bool isRejectedPrevVale = IsBarReject(
conditions.valesBuffer[pIDX],
X_DIRECTION_BULLISH,
cBar //
);
bool isBreakedDownPrevVale = IsBarBreak(
conditions.valesBuffer[pIDX],
X_DIRECTION_BEARISH,
cBar //
);
//
conditions.isSarBullish = isSarBullish;
@@ -2483,13 +2451,9 @@ class XCX121XPVHelper : public XCBaseHelper
conditions.isNewPeak = isNewPeak;
conditions.isNewPeakOverLast = isNewPeakOverLast;
conditions.isNewPeakUnderLast = isNewPeakUnderLast;
conditions.isRejectedPrevPeak = isRejectedPrevPeak;
conditions.isBreakedUpPrevPeak = isBreakedUpPrevPeak;
conditions.isNewVale = isNewVale;
conditions.isNewValeOverLast = isNewValeOverLast;
conditions.isNewValeUnderLast = isNewValeUnderLast;
conditions.isRejectedPrevVale = isRejectedPrevVale;
conditions.isBreakedDownPrevVale = isBreakedDownPrevVale;
//
Cleanup();
@@ -1003,6 +1003,17 @@ double GetExit(
return result;
}
/**
* Retrieve Current Tick ...
*/
bool GetTick(
string mSymbol,
MqlTick &tick //
)
{
return SymbolInfoTick(mSymbol, tick);
}
//
// END Position ...
//
+368
View File
@@ -22,3 +22,371 @@
//
#include "../Libraries/x-saherelm.common.extensions.lib.mq5"
//
// Use To Parse Symbols for
// Ignore Brokers Additional Suffixes ...
struct XSymbolParser
{
//
string version; // Temp ...
//
// Symbol Parsing ...
//
// Forext ...
//
bool IsEURUSD(string symbol)
{
//
string symbolIdentifiers[] = {
"EUR",
"USD" //
};
//
bool result = Contains(
symbolIdentifiers,
symbol //
);
//
return result;
}
//
bool IsUSDJPY(string symbol)
{
//
string symbolIdentifiers[] = {
"USD",
"JPY" //
};
//
bool result = Contains(
symbolIdentifiers,
symbol //
);
//
return result;
}
//
bool IsEURJPY(string symbol)
{
//
string symbolIdentifiers[] = {
"EUR",
"JPY" //
};
//
bool result = Contains(
symbolIdentifiers,
symbol //
);
//
return result;
}
//
bool IsUSDCHF(string symbol)
{
//
string symbolIdentifiers[] = {
"USD",
"CHF" //
};
//
bool result = Contains(
symbolIdentifiers,
symbol //
);
//
return result;
}
//
bool IsEURCHF(string symbol)
{
//
string symbolIdentifiers[] = {
"EUR",
"CHF" //
};
//
bool result = Contains(
symbolIdentifiers,
symbol //
);
//
return result;
}
//
bool IsGBPUSD(string symbol)
{
//
string symbolIdentifiers[] = {
"GBP",
"USD" //
};
//
bool result = Contains(
symbolIdentifiers,
symbol //
);
//
return result;
}
//
bool IsEURGBP(string symbol)
{
//
string symbolIdentifiers[] = {
"EUR",
"GBP" //
};
//
bool result = Contains(
symbolIdentifiers,
symbol //
);
//
return result;
}
//
bool IsAUDUSD(string symbol)
{
//
string symbolIdentifiers[] = {
"AUD",
"USD" //
};
//
bool result = Contains(
symbolIdentifiers,
symbol //
);
//
return result;
}
//
bool IsEURAUD(string symbol)
{
//
string symbolIdentifiers[] = {
"EUR",
"AUD" //
};
//
bool result = Contains(
symbolIdentifiers,
symbol //
);
//
return result;
}
//
bool IsUSDCAD(string symbol)
{
//
string symbolIdentifiers[] = {
"USD",
"CAD" //
};
//
bool result = Contains(
symbolIdentifiers,
symbol //
);
//
return result;
}
//
bool IsEURCAD(string symbol)
{
//
string symbolIdentifiers[] = {
"EUR",
"CAD" //
};
//
bool result = Contains(
symbolIdentifiers,
symbol //
);
//
return result;
}
//
bool IsNZDUSD(string symbol)
{
//
string symbolIdentifiers[] = {
"NZD",
"USD" //
};
//
bool result = Contains(
symbolIdentifiers,
symbol //
);
//
return result;
}
//
bool IsEURNZD(string symbol)
{
//
string symbolIdentifiers[] = {
"EUR",
"NZD" //
};
//
bool result = Contains(
symbolIdentifiers,
symbol //
);
//
return result;
}
//
// Metals ...
//
bool IsXAUUSD(string symbol)
{
//
string symbolIdentifiers[] = {
"XAU",
"USD" //
};
//
bool result = Contains(
symbolIdentifiers,
symbol //
);
//
return result;
}
//
bool IsXAGUSD(string symbol)
{
//
string symbolIdentifiers[] = {
"XAG",
"USD" //
};
//
bool result = Contains(
symbolIdentifiers,
symbol //
);
//
return result;
}
//
// Indexes ...
//
bool IsDowJones(string symbol)
{
//
bool result = Contains(
"DowJones30",
symbol //
);
//
return result;
}
//
// Oil ...
//
bool IsBrent(string symbol)
{
//
bool result = Contains(
"BRENT",
symbol //
);
//
return result;
}
//
// Symbol Finder ...
string GetEURUSDSymbol()
{
//
string result = NULL;
//
string symbols[];
int symbolsCount = GetAllSymbols(
symbols //
);
if (!IsValidSize(symbolsCount))
{
return result;
}
//
for (int i = 0; i < symbolsCount; i++)
{
//
string iSymbol = symbols[i];
if (IsEURUSD(iSymbol))
{
//
result = iSymbol;
break;
}
}
//
return result;
}
};
@@ -3571,70 +3571,7 @@ struct X121SMCStrategyConditionParser
isBullish =
//
// Base Condition ...
(
//
cBar.IsBullish() &&
zBar.open >= cBar.close &&
(
//
// Regular Reject ...
(pBar.low > cBar.low &&
cBar.low < cXConditions.valesGoldenBuffer[cIDX] &&
cBar.GetDown() > cXConditions.valesGoldenBuffer[cIDX])
//
||
//
// Regular Exit ...
(pBar.low < cXConditions.valesGoldenBuffer[cIDX] &&
(cBar.low > cXConditions.valesGoldenBuffer[cIDX] ||
cBar.GetUp() > cXConditions.valesGoldenBuffer[cIDX]))
//
||
//
IsBarBreak(
cXConditions.valesGoldenBuffer[cIDX],
X_DIRECTION_BULLISH,
cBar //
)
//
||
//
IsBarReject(
cXConditions.valesGoldenBuffer[cIDX],
X_DIRECTION_BULLISH,
cBar //
)
//
)
//
)
//
&&
//
// Checking other Conditions ...
(
//
// XSAR ...
cXConditions.isSarBullish &&
//
// XSTR ...
cXConditions.isStrSwitchedToBullish &&
//
// // X3MA ...
// // XVWAP ...
// (cXConditions.isX3MaFastOverMid ||
// cXConditions.isVWapFastOverMid) &&
//
// XHK ...
cXConditions.isSMHKBullish &&
cXConditions.isRawHKBullish &&
//
// XCHE ...
cXConditions.isCheBullish &&
cXConditions.le1Buffer[cIDX] < cBar.low &&
cXConditions.le2Buffer[cIDX] < cBar.low
//
)
false
//
;
@@ -3643,70 +3580,7 @@ struct X121SMCStrategyConditionParser
isBearish =
//
// Base Condition ...
(
//
cBar.IsBearish() &&
zBar.open <= cBar.close &&
(
//
// Regular Reject ...
(pBar.high < cBar.high &&
cBar.high > cXConditions.peaksGoldenBuffer[cIDX] &&
cBar.GetUp() < cXConditions.peaksGoldenBuffer[cIDX])
//
||
//
// Regular Exit ...
(pBar.high > cXConditions.peaksGoldenBuffer[cIDX] &&
(cBar.high < cXConditions.peaksGoldenBuffer[cIDX] ||
cBar.GetDown() < cXConditions.peaksGoldenBuffer[cIDX]))
//
||
//
IsBarBreak(
cXConditions.peaksGoldenBuffer[cIDX],
X_DIRECTION_BEARISH,
cBar //
)
//
||
//
IsBarReject(
cXConditions.peaksGoldenBuffer[cIDX],
X_DIRECTION_BEARISH,
cBar //
)
//
)
//
)
//
&&
//
// Checking other Conditions ...
(
//
// XSAR ...
cXConditions.isSarBearish &&
//
// XSTR ...
cXConditions.isStrSwitchedToBearish &&
//
// // X3MA ...
// // XVWAP ...
// (cXConditions.isX3MaFastUnderMid ||
// cXConditions.isVWapFastUnderMid) &&
//
// XHK ...
cXConditions.isSMHKBearish &&
cXConditions.isRawHKBearish &&
//
// XCHE ...
cXConditions.isCheBearish &&
cXConditions.se1Buffer[cIDX] > cBar.high &&
cXConditions.se2Buffer[cIDX] > cBar.high
//
)
false
//
;