resolved 14 sls from 2022 till 2024.07 - 8 Long 6 Short ...
This commit is contained in:
@@ -4127,15 +4127,28 @@ struct X121SignalGenerator
|
|||||||
//
|
//
|
||||||
||
|
||
|
||||||
//
|
//
|
||||||
(!conditions.ichConditions.isTenkanSenOverKijunSen &&
|
((!conditions.ichConditions.isTenkanSenOverKijunSen &&
|
||||||
!conditions.ichConditions.isTenkanSenUnderKijunSen &&
|
!conditions.ichConditions.isTenkanSenUnderKijunSen) &&
|
||||||
conditions.ichConditions.isSenkouSpanAUnderB &&
|
(
|
||||||
|
//
|
||||||
|
(conditions.ichConditions.isSenkouSpanAUnderB &&
|
||||||
conditions.ichConditions.isClosedUnderKijunSen &&
|
conditions.ichConditions.isClosedUnderKijunSen &&
|
||||||
conditions.ichConditions.isSenkouSpanAOverLast &&
|
conditions.ichConditions.isSenkouSpanAOverLast &&
|
||||||
conditions.ichConditions.isSenkouSpanACrossedOverLast)
|
conditions.ichConditions.isSenkouSpanACrossedOverLast)
|
||||||
//
|
//
|
||||||
||
|
||
|
||||||
//
|
//
|
||||||
|
(conditions.ichConditions.isClosedUnderKijunSen &&
|
||||||
|
conditions.ichConditions.isSenkouSpanAOverB &&
|
||||||
|
conditions.ichConditions.isFutureSenkouSpanAUnderB &&
|
||||||
|
conditions.ichConditions.isFutureSenkouSpanAUnderLast)
|
||||||
|
//
|
||||||
|
)
|
||||||
|
//
|
||||||
|
)
|
||||||
|
//
|
||||||
|
||
|
||||||
|
//
|
||||||
((conditions.ichConditions.isTenkanSenUnderKijunSen &&
|
((conditions.ichConditions.isTenkanSenUnderKijunSen &&
|
||||||
conditions.ichConditions.isClosedUnderKijunSen) &&
|
conditions.ichConditions.isClosedUnderKijunSen) &&
|
||||||
//
|
//
|
||||||
@@ -4312,6 +4325,264 @@ struct X121SignalGenerator
|
|||||||
//
|
//
|
||||||
)
|
)
|
||||||
//
|
//
|
||||||
|
||
|
||||||
|
//
|
||||||
|
// CUSTOM ...
|
||||||
|
(
|
||||||
|
//
|
||||||
|
// XPV ...
|
||||||
|
(
|
||||||
|
//
|
||||||
|
(
|
||||||
|
//
|
||||||
|
// 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)
|
||||||
|
//
|
||||||
|
&&
|
||||||
|
//
|
||||||
|
(
|
||||||
|
//
|
||||||
|
(
|
||||||
|
//
|
||||||
|
// XPV ...
|
||||||
|
conditions.pvConditions.isSCBearish &&
|
||||||
|
conditions.pvConditions.isSCHHBearish &&
|
||||||
|
conditions.pvConditions.isSCLLBearish &&
|
||||||
|
conditions.pvConditions.isMCBearish &&
|
||||||
|
conditions.pvConditions.isMCHHBearish &&
|
||||||
|
conditions.pvConditions.isMCLLBearish &&
|
||||||
|
conditions.pvConditions.isMCHHSwitchedToBearish &&
|
||||||
|
conditions.pvConditions.isLCLLBearish &&
|
||||||
|
conditions.pvConditions.isHCLLBearish &&
|
||||||
|
!conditions.pvConditions.isHCBearish &&
|
||||||
|
!conditions.pvConditions.isHCHHBearish &&
|
||||||
|
!conditions.pvConditions.isLCBearish &&
|
||||||
|
!conditions.pvConditions.isLCHHBearish &&
|
||||||
|
!conditions.pvConditions.isMCSwitchedToBearish &&
|
||||||
|
!conditions.pvConditions.isMCLLSwitchedToBeraish &&
|
||||||
|
//
|
||||||
|
// XICH ...
|
||||||
|
conditions.ichConditions.isSenkouSpanAOverB &&
|
||||||
|
!conditions.ichConditions.isTenkanSenOverKijunSen &&
|
||||||
|
!conditions.ichConditions.isTenkanSenUnderKijunSen
|
||||||
|
//
|
||||||
|
)
|
||||||
|
//
|
||||||
|
||
|
||||||
|
//
|
||||||
|
(
|
||||||
|
//
|
||||||
|
// XPV ...
|
||||||
|
conditions.pvConditions.isSCBearish &&
|
||||||
|
conditions.pvConditions.isSCHHBearish &&
|
||||||
|
conditions.pvConditions.isSCLLBearish &&
|
||||||
|
conditions.pvConditions.isMCLLBearish &&
|
||||||
|
conditions.pvConditions.isLCBearish &&
|
||||||
|
conditions.pvConditions.isLCHHBearish &&
|
||||||
|
conditions.pvConditions.isLCLLBearish &&
|
||||||
|
conditions.pvConditions.isLCSwitchedToBearish &&
|
||||||
|
conditions.pvConditions.isLCHHSwitchedToBearish &&
|
||||||
|
conditions.pvConditions.isHCBearish &&
|
||||||
|
conditions.pvConditions.isHCHHBearish &&
|
||||||
|
conditions.pvConditions.isHCLLBearish &&
|
||||||
|
!conditions.pvConditions.isMCBearish &&
|
||||||
|
!conditions.pvConditions.isMCHHBearish &&
|
||||||
|
!conditions.pvConditions.isLCLLSwitchedToBeraish &&
|
||||||
|
//
|
||||||
|
// XICH ...
|
||||||
|
conditions.ichConditions.isClosedUnderKijunSen &&
|
||||||
|
conditions.ichConditions.isTenkanSenUnderKijunSen &&
|
||||||
|
!conditions.ichConditions.isSenkouSpanAUnderB &&
|
||||||
|
!conditions.ichConditions.isSenkouSpanAUnderLast &&
|
||||||
|
//
|
||||||
|
// XCHMA ...
|
||||||
|
conditions.chmaConditions.isFastUnderSlow &&
|
||||||
|
conditions.chmaConditions.isCloseUnderFast &&
|
||||||
|
conditions.chmaConditions.isCloseUnderSlow &&
|
||||||
|
conditions.chmaConditions.isFastResistance &&
|
||||||
|
conditions.chmaConditions.isSlowResistance
|
||||||
|
//
|
||||||
|
)
|
||||||
|
//
|
||||||
|
)
|
||||||
|
//
|
||||||
|
)
|
||||||
|
//
|
||||||
|
||
|
||||||
|
//
|
||||||
|
(
|
||||||
|
//
|
||||||
|
// XPV ...
|
||||||
|
(conditions.pvConditions.isCloseUnderFib1 &&
|
||||||
|
conditions.pvConditions.isCloseUnderFib2 &&
|
||||||
|
conditions.pvConditions.isCloseUnderFib3 &&
|
||||||
|
conditions.pvConditions.isCloseUnderFib4 &&
|
||||||
|
conditions.pvConditions.isCloseUnderFib5)
|
||||||
|
//
|
||||||
|
&&
|
||||||
|
//
|
||||||
|
(
|
||||||
|
//
|
||||||
|
(
|
||||||
|
//
|
||||||
|
// XPV ...
|
||||||
|
conditions.pvConditions.isSCBearish &&
|
||||||
|
conditions.pvConditions.isSCHHBearish &&
|
||||||
|
conditions.pvConditions.isSCLLBearish &&
|
||||||
|
conditions.pvConditions.isMCLLBearish &&
|
||||||
|
!conditions.pvConditions.isMCBearish &&
|
||||||
|
!conditions.pvConditions.isMCHHBearish &&
|
||||||
|
!conditions.pvConditions.isLCBearish &&
|
||||||
|
!conditions.pvConditions.isLCHHBearish &&
|
||||||
|
!conditions.pvConditions.isLCLLBearish &&
|
||||||
|
!conditions.pvConditions.isHCBearish &&
|
||||||
|
!conditions.pvConditions.isHCHHBearish &&
|
||||||
|
!conditions.pvConditions.isHCLLBearish &&
|
||||||
|
//
|
||||||
|
// XHTD ...
|
||||||
|
conditions.tdConditions.isSwitchedToBearish &&
|
||||||
|
//
|
||||||
|
// XICH ...
|
||||||
|
conditions.ichConditions.isClosedUnderKijunSen &&
|
||||||
|
conditions.ichConditions.isTenkanSenOverKijunSen &&
|
||||||
|
//
|
||||||
|
// XVLM ...
|
||||||
|
conditions.vlmConditions.isVolumeChangedToBearish &&
|
||||||
|
//
|
||||||
|
// XCHMA ...
|
||||||
|
conditions.chmaConditions.isFastUnderSlow &&
|
||||||
|
conditions.chmaConditions.isCloseUnderFast &&
|
||||||
|
conditions.chmaConditions.isCloseUnderSlow &&
|
||||||
|
conditions.chmaConditions.isSlowResistance &&
|
||||||
|
!conditions.chmaConditions.isFastResistance
|
||||||
|
//
|
||||||
|
)
|
||||||
|
//
|
||||||
|
||
|
||||||
|
//
|
||||||
|
(
|
||||||
|
//
|
||||||
|
// XPV ...
|
||||||
|
conditions.pvConditions.isNewVale &&
|
||||||
|
conditions.pvConditions.isNewValeOverLast &&
|
||||||
|
conditions.pvConditions.isFiboIncreased &&
|
||||||
|
conditions.pvConditions.isFiboSectionChanged &&
|
||||||
|
conditions.pvConditions.isCloseCrossedUnderFib5 &&
|
||||||
|
conditions.pvConditions.isHCLLBullish &&
|
||||||
|
conditions.pvConditions.isHCLLSwitchedToBullish &&
|
||||||
|
//
|
||||||
|
// XMRB ...
|
||||||
|
conditions.mrbConditions.isFastCrossedUnderSlow &&
|
||||||
|
//
|
||||||
|
// XCHE ...
|
||||||
|
conditions.cheConditions.isSwitchedToBearish &&
|
||||||
|
conditions.cheConditions.isStrongSwitchedToBearish &&
|
||||||
|
//
|
||||||
|
// XCHMA ...
|
||||||
|
conditions.chmaConditions.isFastUnderSlow &&
|
||||||
|
conditions.chmaConditions.isCloseUnderFast &&
|
||||||
|
conditions.chmaConditions.isCloseUnderSlow
|
||||||
|
//
|
||||||
|
)
|
||||||
|
//
|
||||||
|
||
|
||||||
|
//
|
||||||
|
(
|
||||||
|
//
|
||||||
|
// XPV ...
|
||||||
|
conditions.pvConditions.isSCBearish &&
|
||||||
|
conditions.pvConditions.isSCHHBearish &&
|
||||||
|
conditions.pvConditions.isSCLLBearish &&
|
||||||
|
conditions.pvConditions.isMCLLBearish &&
|
||||||
|
!conditions.pvConditions.isMCBearish &&
|
||||||
|
!conditions.pvConditions.isMCHHBearish &&
|
||||||
|
!conditions.pvConditions.isLCBearish &&
|
||||||
|
!conditions.pvConditions.isLCHHBearish &&
|
||||||
|
!conditions.pvConditions.isLCLLBearish &&
|
||||||
|
!conditions.pvConditions.isHCBearish &&
|
||||||
|
!conditions.pvConditions.isHCHHBearish &&
|
||||||
|
!conditions.pvConditions.isHCLLBearish &&
|
||||||
|
//
|
||||||
|
// XVLM ...
|
||||||
|
conditions.vlmConditions.isVolumeBearish &&
|
||||||
|
conditions.vlmConditions.isVolumeUnderLast &&
|
||||||
|
//
|
||||||
|
// XCHMA ...
|
||||||
|
conditions.chmaConditions.isFastUnderSlow &&
|
||||||
|
conditions.chmaConditions.isCloseUnderFast &&
|
||||||
|
conditions.chmaConditions.isCloseUnderSlow &&
|
||||||
|
conditions.chmaConditions.isFastResistance &&
|
||||||
|
conditions.chmaConditions.isSlowResistance
|
||||||
|
//
|
||||||
|
)
|
||||||
|
//
|
||||||
|
)
|
||||||
|
//
|
||||||
|
)
|
||||||
|
//
|
||||||
|
||
|
||||||
|
//
|
||||||
|
(
|
||||||
|
//
|
||||||
|
// XPV ...
|
||||||
|
(
|
||||||
|
//
|
||||||
|
// XPV ...
|
||||||
|
(conditions.pvConditions.isCloseOverFib5 &&
|
||||||
|
conditions.pvConditions.isCloseUnderFib1 &&
|
||||||
|
conditions.pvConditions.isCloseUnderFib2 &&
|
||||||
|
conditions.pvConditions.isCloseUnderFib3 &&
|
||||||
|
conditions.pvConditions.isCloseUnderFib4 &&
|
||||||
|
conditions.pvConditions.isCloseCrossedUnderFib4)
|
||||||
|
//
|
||||||
|
&&
|
||||||
|
//
|
||||||
|
(
|
||||||
|
//
|
||||||
|
// XPV ...
|
||||||
|
conditions.pvConditions.isSCLLBearish &&
|
||||||
|
conditions.pvConditions.isSCSwitchedToBearish &&
|
||||||
|
conditions.pvConditions.isSCLLSwitchedToBeraish &&
|
||||||
|
conditions.pvConditions.isMCLLBearish &&
|
||||||
|
conditions.pvConditions.isMCSwitchedToBearish &&
|
||||||
|
conditions.pvConditions.isMCLLSwitchedToBeraish &&
|
||||||
|
!conditions.pvConditions.isSCHHSwitchedToBearish &&
|
||||||
|
!conditions.pvConditions.isMCHHSwitchedToBearish &&
|
||||||
|
!conditions.pvConditions.isLCBearish &&
|
||||||
|
!conditions.pvConditions.isLCHHBearish &&
|
||||||
|
!conditions.pvConditions.isLCLLBearish &&
|
||||||
|
!conditions.pvConditions.isHCBearish &&
|
||||||
|
!conditions.pvConditions.isHCHHBearish &&
|
||||||
|
!conditions.pvConditions.isHCLLBearish &&
|
||||||
|
//
|
||||||
|
// XICH ...
|
||||||
|
conditions.ichConditions.isClosedOverKijunSen &&
|
||||||
|
conditions.ichConditions.isTenkanSenOverKijunSen &&
|
||||||
|
//
|
||||||
|
// XCHMA ...
|
||||||
|
conditions.chmaConditions.isFastUnderSlow &&
|
||||||
|
conditions.chmaConditions.isCloseUnderFast &&
|
||||||
|
conditions.chmaConditions.isCloseUnderSlow &&
|
||||||
|
conditions.chmaConditions.isFastResistance &&
|
||||||
|
conditions.chmaConditions.isSlowResistance
|
||||||
|
//
|
||||||
|
)
|
||||||
|
//
|
||||||
|
)
|
||||||
|
//
|
||||||
|
)
|
||||||
|
//
|
||||||
|
)
|
||||||
|
//
|
||||||
|
)
|
||||||
|
//
|
||||||
)
|
)
|
||||||
//
|
//
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -0,0 +1,75 @@
|
|||||||
|
//
|
||||||
|
// Longs ...
|
||||||
|
|
||||||
|
//
|
||||||
|
// 1 ...
|
||||||
|
2022.03.07 04:00:00 16 AUDUSDb buy in 0.01 0.74269 16 0.00 0.00 0.00 1 002.13 PRV(XPVF)PR(H2)
|
||||||
|
2022.03.07 15:44:19 17 AUDUSDb sell out 0.01 0.73769 17 0.00 0.00 -5.00 997.13 sl 0.73769
|
||||||
|
|
||||||
|
//
|
||||||
|
// 2 ...
|
||||||
|
2022.05.12 08:00:00 24 EURNZDb buy in 0.01 1.68355 24 0.00 0.00 0.00 994.45 PRV(XPVF)PR(H2)
|
||||||
|
2022.05.12 09:23:54 25 EURNZDb sell out 0.01 1.67855 25 0.00 0.00 -5.00 989.45 sl 1.67855
|
||||||
|
|
||||||
|
//
|
||||||
|
// 3 ...
|
||||||
|
2022.09.12 12:00:00 48 EURGBPb buy in 0.01 0.87175 48 0.00 0.00 0.00 993.91 PRV(XPVF)PR(H2)
|
||||||
|
2022.09.12 16:05:33 49 EURGBPb sell out 0.01 0.86674 49 0.00 0.00 -5.01 988.90 sl 0.86675
|
||||||
|
|
||||||
|
//
|
||||||
|
// 4 ...
|
||||||
|
2022.12.07 20:00:00 58 EURCHFb buy in 0.01 0.98922 58 0.00 0.00 0.00 992.16 PRV(XHULL)PR(M15)
|
||||||
|
2022.12.09 13:57:47 59 EURCHFb sell out 0.01 0.98419 59 0.00 0.00 -5.03 987.13 sl 0.98422
|
||||||
|
|
||||||
|
//
|
||||||
|
// 5 ...
|
||||||
|
2022.12.12 16:00:00 60 EURUSDb buy in 0.01 1.05716 60 0.00 0.00 0.00 987.13 PRV(XHTD)PR(H1)
|
||||||
|
2022.12.12 17:58:08 61 EURUSDb sell out 0.01 1.05216 61 0.00 0.00 -5.00 982.13 sl 1.05216
|
||||||
|
|
||||||
|
//
|
||||||
|
// 6 ...
|
||||||
|
2023.05.12 20:00:01 82 USDCHFb buy in 0.01 0.89811 82 0.00 0.00 0.00 981.00 PRV(XPVF)PR(H1)
|
||||||
|
2023.05.16 10:52:51 83 USDCHFb sell out 0.01 0.89311 83 0.00 0.00 -5.00 976.00 sl 0.89311
|
||||||
|
|
||||||
|
//
|
||||||
|
// 7 ...
|
||||||
|
2023.08.10 20:00:00 104 EURGBPb buy in 0.01 0.86616 104 0.00 0.00 0.00 986.00 PRV(XPVF)PR(H2)
|
||||||
|
2023.08.14 17:06:19 107 EURGBPb sell out 0.01 0.86115 107 0.00 0.00 -5.01 981.58 sl 0.86116
|
||||||
|
|
||||||
|
//
|
||||||
|
// 8 ...
|
||||||
|
2023.09.22 16:00:00 118 NZDUSDb buy in 0.01 0.59810 118 0.00 0.00 0.00 979.59 PRV(XHTSRD)PR(H2)
|
||||||
|
2023.09.27 05:32:30 123 NZDUSDb sell out 0.01 0.59310 123 0.00 0.00 -5.00 976.64 sl 0.59310
|
||||||
|
|
||||||
|
//
|
||||||
|
// Shorts ...
|
||||||
|
|
||||||
|
//
|
||||||
|
// 1 ...
|
||||||
|
2022.02.18 20:00:00 10 EURUSDb sell in 0.01 1.13219 10 0.00 0.00 0.00 1 004.49 PRV(XPVF)PR(H1)
|
||||||
|
2022.02.21 09:01:13 11 EURUSDb buy out 0.01 1.13719 11 0.00 0.00 -5.00 999.49 sl 1.13719
|
||||||
|
|
||||||
|
//
|
||||||
|
// 2 ...
|
||||||
|
2022.04.20 20:00:00 20 EURAUDb sell in 0.01 1.45617 20 0.00 0.00 0.00 998.61 PRV(XVLM)PR(M5)
|
||||||
|
2022.04.21 09:30:40 21 EURAUDb buy out 0.01 1.46123 21 0.00 0.00 -5.06 993.55 sl 1.46117
|
||||||
|
|
||||||
|
//
|
||||||
|
// 3 ...
|
||||||
|
2022.07.06 16:00:00 40 EURJPYb sell in 0.01 137.669 40 0.00 0.00 0.00 996.25 PRV(XPVF)PR(H1)
|
||||||
|
2022.07.06 17:02:26 41 EURJPYb buy out 0.01 138.169 41 0.00 0.00 -5.00 991.25 sl 138.169
|
||||||
|
|
||||||
|
//
|
||||||
|
// 4 ...
|
||||||
|
2023.02.09 16:00:00 76 EURJPYb sell in 0.01 140.700 76 0.00 0.00 0.00 989.87 PRV(XHTSRD)PR(M15)
|
||||||
|
2023.02.09 21:00:34 77 EURJPYb buy out 0.01 141.202 77 0.00 0.00 -5.02 984.85 sl 141.200
|
||||||
|
|
||||||
|
//
|
||||||
|
// 5 ...
|
||||||
|
2023.02.14 03:00:00 78 EURCHFb sell in 0.01 0.98548 78 0.00 0.00 0.00 984.85 PRV(XHK)PR(M5)
|
||||||
|
2023.02.14 23:59:59 79 EURCHFb buy out 0.01 0.99053 79 0.00 0.00 -5.05 979.80 sl 0.99048
|
||||||
|
|
||||||
|
//
|
||||||
|
// 6 ...
|
||||||
|
2023.09.21 04:00:00 116 EURCADb sell in 0.01 1.43337 116 0.00 0.00 0.00 984.59 PRV(XTD)PR(M15)
|
||||||
|
2023.09.21 10:35:22 117 EURCADb buy out 0.01 1.43837 117 0.00 0.00 -5.00 979.59 sl 1.43837
|
||||||
+143
-82
@@ -44,6 +44,7 @@ XBarTracker eaBarTracker;
|
|||||||
|
|
||||||
//
|
//
|
||||||
XSCXTestSetupEA *mSetupEA;
|
XSCXTestSetupEA *mSetupEA;
|
||||||
|
XSCXTestSetup *iSetup;
|
||||||
XSCXCTHelper *mCTHelper;
|
XSCXCTHelper *mCTHelper;
|
||||||
XSCXCCHelper *mCCHelper;
|
XSCXCCHelper *mCCHelper;
|
||||||
|
|
||||||
@@ -108,6 +109,7 @@ void OnDeinit(const int reason)
|
|||||||
// On Tick Handler ...
|
// On Tick Handler ...
|
||||||
void OnTick()
|
void OnTick()
|
||||||
{
|
{
|
||||||
|
//
|
||||||
// mSetupEA.OnTick();
|
// mSetupEA.OnTick();
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -117,94 +119,138 @@ void OnTick()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
XOHCL cBar;
|
XTestConditions conditions;
|
||||||
bool isInit = cBar.Init(
|
bool hasConditions = iSetup.GetConditions(
|
||||||
_Symbol,
|
conditions,
|
||||||
_Period,
|
|
||||||
1 //
|
|
||||||
);
|
|
||||||
if (!isInit)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
datetime time1 = iTime(
|
|
||||||
_Symbol,
|
|
||||||
_Period,
|
|
||||||
2 //
|
|
||||||
);
|
|
||||||
|
|
||||||
//
|
|
||||||
double fib382 = 0;
|
|
||||||
|
|
||||||
//
|
|
||||||
bool isHammer = cBar.IsHammer();
|
|
||||||
if (isHammer)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
fib382 = GetFibonacciLevel(
|
|
||||||
cBar.high,
|
|
||||||
cBar.low,
|
|
||||||
0.382,
|
|
||||||
-1 //
|
|
||||||
);
|
|
||||||
DrawTrendLine(
|
|
||||||
ChartID(),
|
|
||||||
"HMR_TR",
|
|
||||||
0,
|
0,
|
||||||
time1,
|
5 //
|
||||||
fib382,
|
|
||||||
cBar.time,
|
|
||||||
fib382,
|
|
||||||
clrYellow //
|
|
||||||
);
|
);
|
||||||
Print("Hammer ...");
|
if (hasConditions)
|
||||||
eaBarTracker.Waits();
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
bool isShootingStar = cBar.IsShootingStar();
|
|
||||||
if (isShootingStar)
|
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
fib382 = GetFibonacciLevel(
|
bool isCHMAOverUnder1 =
|
||||||
cBar.high,
|
//
|
||||||
cBar.low,
|
(conditions.chmaConditions.isFastOverMin &&
|
||||||
0.382,
|
conditions.chmaConditions.isFastUnderMin)
|
||||||
1 //
|
//
|
||||||
);
|
;
|
||||||
DrawTrendLine(
|
//
|
||||||
ChartID(),
|
bool isCHMAOverUnder2 =
|
||||||
"HMR_TR",
|
//
|
||||||
0,
|
(conditions.chmaConditions.isSlowOverMin &&
|
||||||
time1,
|
conditions.chmaConditions.isSlowUnderMin)
|
||||||
fib382,
|
//
|
||||||
cBar.time,
|
;
|
||||||
fib382,
|
//
|
||||||
clrYellow //
|
bool isCHMAOverUnder3 =
|
||||||
);
|
//
|
||||||
Print("ShootingStar ...");
|
(conditions.chmaConditions.isFastOverMax &&
|
||||||
eaBarTracker.Waits();
|
conditions.chmaConditions.isFastUnderMax)
|
||||||
|
//
|
||||||
|
;
|
||||||
|
//
|
||||||
|
bool isCHMAOverUnder4 =
|
||||||
|
//
|
||||||
|
(conditions.chmaConditions.isSlowOverMax &&
|
||||||
|
conditions.chmaConditions.isSlowUnderMax)
|
||||||
|
//
|
||||||
|
;
|
||||||
|
//
|
||||||
|
if (isCHMAOverUnder1 || isCHMAOverUnder2 || isCHMAOverUnder3 || isCHMAOverUnder4)
|
||||||
|
{
|
||||||
|
Print("isCHMAOverUnder");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
// //
|
||||||
bool isBullishEngulf = cBar.IsBullishEngulf();
|
// XOHCL cBar;
|
||||||
if (isBullishEngulf)
|
// bool isInit = cBar.Init(
|
||||||
{
|
// _Symbol,
|
||||||
//
|
// _Period,
|
||||||
Print("Bullish Engulf ...");
|
// 1 //
|
||||||
eaBarTracker.Waits();
|
// );
|
||||||
}
|
// if (!isInit)
|
||||||
|
// {
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
//
|
// //
|
||||||
bool isBearishEngulf = cBar.IsBearishEngulf();
|
// datetime time1 = iTime(
|
||||||
if (isBearishEngulf)
|
// _Symbol,
|
||||||
{
|
// _Period,
|
||||||
//
|
// 2 //
|
||||||
Print("Bearish Engulf ...");
|
// );
|
||||||
eaBarTracker.Waits();
|
|
||||||
}
|
// //
|
||||||
|
// double fib382 = 0;
|
||||||
|
|
||||||
|
// //
|
||||||
|
// bool isHammer = cBar.IsHammer();
|
||||||
|
// if (isHammer)
|
||||||
|
// {
|
||||||
|
// //
|
||||||
|
// fib382 = GetFibonacciLevel(
|
||||||
|
// cBar.high,
|
||||||
|
// cBar.low,
|
||||||
|
// 0.382,
|
||||||
|
// -1 //
|
||||||
|
// );
|
||||||
|
// DrawTrendLine(
|
||||||
|
// ChartID(),
|
||||||
|
// "HMR_TR",
|
||||||
|
// 0,
|
||||||
|
// time1,
|
||||||
|
// fib382,
|
||||||
|
// cBar.time,
|
||||||
|
// fib382,
|
||||||
|
// clrYellow //
|
||||||
|
// );
|
||||||
|
// Print("Hammer ...");
|
||||||
|
// eaBarTracker.Waits();
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //
|
||||||
|
// bool isShootingStar = cBar.IsShootingStar();
|
||||||
|
// if (isShootingStar)
|
||||||
|
// {
|
||||||
|
// //
|
||||||
|
// fib382 = GetFibonacciLevel(
|
||||||
|
// cBar.high,
|
||||||
|
// cBar.low,
|
||||||
|
// 0.382,
|
||||||
|
// 1 //
|
||||||
|
// );
|
||||||
|
// DrawTrendLine(
|
||||||
|
// ChartID(),
|
||||||
|
// "HMR_TR",
|
||||||
|
// 0,
|
||||||
|
// time1,
|
||||||
|
// fib382,
|
||||||
|
// cBar.time,
|
||||||
|
// fib382,
|
||||||
|
// clrYellow //
|
||||||
|
// );
|
||||||
|
// Print("ShootingStar ...");
|
||||||
|
// eaBarTracker.Waits();
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //
|
||||||
|
// bool isBullishEngulf = cBar.IsBullishEngulf();
|
||||||
|
// if (isBullishEngulf)
|
||||||
|
// {
|
||||||
|
// //
|
||||||
|
// Print("Bullish Engulf ...");
|
||||||
|
// eaBarTracker.Waits();
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //
|
||||||
|
// bool isBearishEngulf = cBar.IsBearishEngulf();
|
||||||
|
// if (isBearishEngulf)
|
||||||
|
// {
|
||||||
|
// //
|
||||||
|
// Print("Bearish Engulf ...");
|
||||||
|
// eaBarTracker.Waits();
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -302,7 +348,7 @@ bool InitialEA()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
XSCXTestSetup *iSetup = new XSCXTestSetup();
|
iSetup = new XSCXTestSetup();
|
||||||
result = iSetup.Init(iInputs);
|
result = iSetup.Init(iInputs);
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
@@ -408,6 +454,21 @@ void PreConfigureStyles(XTestInputs &inputs)
|
|||||||
// XHULL ...
|
// XHULL ...
|
||||||
inputs.hullInputs.showUpZone = false;
|
inputs.hullInputs.showUpZone = false;
|
||||||
inputs.hullInputs.showDownZone = false;
|
inputs.hullInputs.showDownZone = false;
|
||||||
|
|
||||||
|
//
|
||||||
|
// XCHMA ...
|
||||||
|
inputs.chmaInputs.showFast = true;
|
||||||
|
inputs.chmaInputs.showSlow = true;
|
||||||
|
inputs.chmaInputs.showCCFast = true;
|
||||||
|
inputs.chmaInputs.showCCSlow = true;
|
||||||
|
inputs.chmaInputs.showSCFast = true;
|
||||||
|
inputs.chmaInputs.showSCSlow = true;
|
||||||
|
inputs.chmaInputs.showMCFast = true;
|
||||||
|
inputs.chmaInputs.showMCSlow = true;
|
||||||
|
inputs.chmaInputs.showLCFast = true;
|
||||||
|
inputs.chmaInputs.showLCSlow = true;
|
||||||
|
inputs.chmaInputs.showHCFast = true;
|
||||||
|
inputs.chmaInputs.showHCSlow = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -41,6 +41,7 @@
|
|||||||
#include "../Helpers/x-saherelm.xosc.helper.mq5"
|
#include "../Helpers/x-saherelm.xosc.helper.mq5"
|
||||||
#include "../Helpers/x-saherelm.xvlm.helper.mq5"
|
#include "../Helpers/x-saherelm.xvlm.helper.mq5"
|
||||||
#include "../Helpers/x-saherelm.xhtd.helper.mq5"
|
#include "../Helpers/x-saherelm.xhtd.helper.mq5"
|
||||||
|
#include "../Helpers/x-saherelm.xchma.helper.mq5"
|
||||||
#include "../Helpers/x-saherelm.xatsl.helper.mq5"
|
#include "../Helpers/x-saherelm.xatsl.helper.mq5"
|
||||||
#include "../Helpers/x-saherelm.xdmnt.helper.mq5"
|
#include "../Helpers/x-saherelm.xdmnt.helper.mq5"
|
||||||
#include "../Helpers/x-saherelm.xasct.helper.mq5"
|
#include "../Helpers/x-saherelm.xasct.helper.mq5"
|
||||||
@@ -79,6 +80,7 @@ struct XTestInputs
|
|||||||
XOSCInputs oscInputs; // XOSC Inputs
|
XOSCInputs oscInputs; // XOSC Inputs
|
||||||
XVLMInputs vlmInputs; // XVLM Inputs
|
XVLMInputs vlmInputs; // XVLM Inputs
|
||||||
XSLNInputs slnInputs; // XSLN Inputs
|
XSLNInputs slnInputs; // XSLN Inputs
|
||||||
|
XCHMAInputs chmaInputs; // XCHMA Inputs
|
||||||
XATSLInputs atslInputs; // XATSL Inputs
|
XATSLInputs atslInputs; // XATSL Inputs
|
||||||
XDMNTInputs dmntInputs; // XDMNT Inputs
|
XDMNTInputs dmntInputs; // XDMNT Inputs
|
||||||
XASCTInputs asctInputs; // XASCT Inputs
|
XASCTInputs asctInputs; // XASCT Inputs
|
||||||
@@ -123,6 +125,7 @@ struct XTestInputs
|
|||||||
XOSCInputs &_oscInputs, // XOSC Inputs
|
XOSCInputs &_oscInputs, // XOSC Inputs
|
||||||
XVLMInputs &_vlmInputs, // XVLM Inputs
|
XVLMInputs &_vlmInputs, // XVLM Inputs
|
||||||
XSLNInputs &_slnInputs, // XSLN Inputs
|
XSLNInputs &_slnInputs, // XSLN Inputs
|
||||||
|
XCHMAInputs &_chmaInputs, // XCHMA Inputs
|
||||||
XATSLInputs &_atslInputs, // XATSL Inputs
|
XATSLInputs &_atslInputs, // XATSL Inputs
|
||||||
XDMNTInputs &_dmntInputs, // XDMNT Inputs
|
XDMNTInputs &_dmntInputs, // XDMNT Inputs
|
||||||
XASCTInputs &_asctInputs, // XASCT Inputs
|
XASCTInputs &_asctInputs, // XASCT Inputs
|
||||||
@@ -149,6 +152,7 @@ struct XTestInputs
|
|||||||
this.mrbInputs = _mrbInputs;
|
this.mrbInputs = _mrbInputs;
|
||||||
this.oscInputs = _oscInputs;
|
this.oscInputs = _oscInputs;
|
||||||
this.vlmInputs = _vlmInputs;
|
this.vlmInputs = _vlmInputs;
|
||||||
|
this.chmaInputs = _chmaInputs;
|
||||||
this.atslInputs = _atslInputs;
|
this.atslInputs = _atslInputs;
|
||||||
this.dmntInputs = _dmntInputs;
|
this.dmntInputs = _dmntInputs;
|
||||||
this.asctInputs = _asctInputs;
|
this.asctInputs = _asctInputs;
|
||||||
@@ -189,6 +193,7 @@ struct XTestInputs
|
|||||||
vlmInputs.Clean();
|
vlmInputs.Clean();
|
||||||
slnInputs.Clean();
|
slnInputs.Clean();
|
||||||
htdInputs.Clean();
|
htdInputs.Clean();
|
||||||
|
chmaInputs.Clean();
|
||||||
asctInputs.Clean();
|
asctInputs.Clean();
|
||||||
sslcInputs.Clean();
|
sslcInputs.Clean();
|
||||||
hullInputs.Clean();
|
hullInputs.Clean();
|
||||||
@@ -219,6 +224,7 @@ struct XTestInputs
|
|||||||
vlmInputs.Default();
|
vlmInputs.Default();
|
||||||
slnInputs.Default();
|
slnInputs.Default();
|
||||||
htdInputs.Default();
|
htdInputs.Default();
|
||||||
|
chmaInputs.Default();
|
||||||
asctInputs.Default();
|
asctInputs.Default();
|
||||||
sslcInputs.Default();
|
sslcInputs.Default();
|
||||||
hullInputs.Default();
|
hullInputs.Default();
|
||||||
@@ -253,6 +259,13 @@ struct XTestInputs
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
result = chmaInputs.IsValid();
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
result = tdInputs.IsValid();
|
result = tdInputs.IsValid();
|
||||||
if (!result)
|
if (!result)
|
||||||
@@ -409,6 +422,7 @@ struct XTestConditions
|
|||||||
XVLMConditions vlmConditions;
|
XVLMConditions vlmConditions;
|
||||||
XHTDConditions htdConditions;
|
XHTDConditions htdConditions;
|
||||||
XSLNConditions slnConditions;
|
XSLNConditions slnConditions;
|
||||||
|
XCHMAConditions chmaConditions;
|
||||||
XATSLConditions atslConditions;
|
XATSLConditions atslConditions;
|
||||||
XASCTConditions asctConditions;
|
XASCTConditions asctConditions;
|
||||||
XSSLCConditions sslcConditions;
|
XSSLCConditions sslcConditions;
|
||||||
@@ -784,6 +798,7 @@ struct XTestConditions
|
|||||||
vlmConditions.Clean();
|
vlmConditions.Clean();
|
||||||
slnConditions.Clean();
|
slnConditions.Clean();
|
||||||
htdConditions.Clean();
|
htdConditions.Clean();
|
||||||
|
chmaConditions.Clean();
|
||||||
atslConditions.Clean();
|
atslConditions.Clean();
|
||||||
asctConditions.Clean();
|
asctConditions.Clean();
|
||||||
sslcConditions.Clean();
|
sslcConditions.Clean();
|
||||||
@@ -921,6 +936,14 @@ struct XTestConditions
|
|||||||
bullishScore += tempBullishScore;
|
bullishScore += tempBullishScore;
|
||||||
bearishScore += tempBearishScore;
|
bearishScore += tempBearishScore;
|
||||||
|
|
||||||
|
//
|
||||||
|
chmaConditions.GenerateScore(
|
||||||
|
tempBullishScore,
|
||||||
|
tempBearishScore //
|
||||||
|
);
|
||||||
|
bullishScore += tempBullishScore;
|
||||||
|
bearishScore += tempBearishScore;
|
||||||
|
|
||||||
//
|
//
|
||||||
hullConditions.GenerateScore(
|
hullConditions.GenerateScore(
|
||||||
tempBullishScore,
|
tempBullishScore,
|
||||||
@@ -1007,7 +1030,8 @@ struct XTestConditions
|
|||||||
string vlmSummary = vlmConditions.GenerateSummary(false, true, false, ignoreFalseConditions);
|
string vlmSummary = vlmConditions.GenerateSummary(false, true, false, ignoreFalseConditions);
|
||||||
string slnSummary = slnConditions.GenerateSummary(false, true, false, ignoreFalseConditions);
|
string slnSummary = slnConditions.GenerateSummary(false, true, false, ignoreFalseConditions);
|
||||||
string htdSummary = htdConditions.GenerateSummary(false, true, false, ignoreFalseConditions);
|
string htdSummary = htdConditions.GenerateSummary(false, true, false, ignoreFalseConditions);
|
||||||
string atsSummary = atslConditions.GenerateSummary(false, true, false, ignoreFalseConditions);
|
string chmaSummary = chmaConditions.GenerateSummary(false, true, false, ignoreFalseConditions);
|
||||||
|
string atslSummary = atslConditions.GenerateSummary(false, true, false, ignoreFalseConditions);
|
||||||
string asctSummary = asctConditions.GenerateSummary(false, true, false, ignoreFalseConditions);
|
string asctSummary = asctConditions.GenerateSummary(false, true, false, ignoreFalseConditions);
|
||||||
string sslcSummary = sslcConditions.GenerateSummary(false, true, false, ignoreFalseConditions);
|
string sslcSummary = sslcConditions.GenerateSummary(false, true, false, ignoreFalseConditions);
|
||||||
string hullSummary = hullConditions.GenerateSummary(false, true, false, ignoreFalseConditions);
|
string hullSummary = hullConditions.GenerateSummary(false, true, false, ignoreFalseConditions);
|
||||||
@@ -1033,8 +1057,9 @@ struct XTestConditions
|
|||||||
hullSummary + separator +
|
hullSummary + separator +
|
||||||
adxtdSummary + separator +
|
adxtdSummary + separator +
|
||||||
htdSummary + separator +
|
htdSummary + separator +
|
||||||
atsSummary + separator +
|
atslSummary + separator +
|
||||||
dmntSummary + separator +
|
dmntSummary + separator +
|
||||||
|
chmaSummary + separator +
|
||||||
""
|
""
|
||||||
//
|
//
|
||||||
;
|
;
|
||||||
@@ -1096,6 +1121,7 @@ public:
|
|||||||
XSCXSSLCHelper *sslcHelper;
|
XSCXSSLCHelper *sslcHelper;
|
||||||
XSCXHULLHelper *hullHelper;
|
XSCXHULLHelper *hullHelper;
|
||||||
XSCXATSLHelper *atslHelper;
|
XSCXATSLHelper *atslHelper;
|
||||||
|
XSCXCHMAHelper *chmaHelper;
|
||||||
XSCXDMNTHelper *dmntHelper;
|
XSCXDMNTHelper *dmntHelper;
|
||||||
XSCXADXTDHelper *adxtdHelper;
|
XSCXADXTDHelper *adxtdHelper;
|
||||||
|
|
||||||
@@ -1127,6 +1153,7 @@ public:
|
|||||||
delete sslcHelper;
|
delete sslcHelper;
|
||||||
delete hullHelper;
|
delete hullHelper;
|
||||||
delete atslHelper;
|
delete atslHelper;
|
||||||
|
delete chmaHelper;
|
||||||
delete dmntHelper;
|
delete dmntHelper;
|
||||||
delete adxtdHelper;
|
delete adxtdHelper;
|
||||||
}
|
}
|
||||||
@@ -1179,6 +1206,19 @@ public:
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// XCHMA ...
|
||||||
|
chmaHelper = new XSCXCHMAHelper();
|
||||||
|
result = chmaHelper.Init(
|
||||||
|
inputs.symbol,
|
||||||
|
inputs.period,
|
||||||
|
inputs.chmaInputs //
|
||||||
|
);
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// XSLN ...
|
// XSLN ...
|
||||||
slnHelper = new XSCXSLNHelper();
|
slnHelper = new XSCXSLNHelper();
|
||||||
@@ -1507,6 +1547,17 @@ public:
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
result = chmaHelper.GetConditions(
|
||||||
|
conditions.chmaConditions,
|
||||||
|
barIndex,
|
||||||
|
loopback //
|
||||||
|
);
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
result = atslHelper.GetConditions(
|
result = atslHelper.GetConditions(
|
||||||
conditions.atslConditions,
|
conditions.atslConditions,
|
||||||
|
|||||||
Reference in New Issue
Block a user