last complete resolve long sls ...
This commit is contained in:
@@ -2395,10 +2395,378 @@ struct X121SignalGenerator
|
||||
//
|
||||
)
|
||||
//
|
||||
||
|
||||
//
|
||||
// CUSTOM ...
|
||||
(
|
||||
//
|
||||
(
|
||||
//
|
||||
// XICH ...
|
||||
(conditions.ichConditions.isSenkouSpanAOverB &&
|
||||
conditions.ichConditions.isClosedOverKijunSen &&
|
||||
conditions.ichConditions.isSenkouSpanAOverLast &&
|
||||
conditions.ichConditions.isTenkanSenOverKijunSen &&
|
||||
conditions.ichConditions.isFutureSenkouSpanAOverB &&
|
||||
conditions.ichConditions.isFutureSenkouSpanAOverLast) &&
|
||||
//
|
||||
// XCHMA ...
|
||||
(conditions.chmaConditions.isSlowSupport &&
|
||||
conditions.chmaConditions.isFastOverSlow &&
|
||||
conditions.chmaConditions.isCLoseOverFast &&
|
||||
conditions.chmaConditions.isCloseOverSlow &&
|
||||
conditions.chmaConditions.isRetestFastSlow &&
|
||||
conditions.chmaConditions.isRetestSFastSlow &&
|
||||
conditions.chmaConditions.isRetestMFastSlow &&
|
||||
conditions.chmaConditions.isRetestLFastSlow &&
|
||||
conditions.chmaConditions.isRetestHFastSlow &&
|
||||
!conditions.chmaConditions.isFastSupport &&
|
||||
!conditions.chmaConditions.isRetestCFastSlow)
|
||||
//
|
||||
)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
//
|
||||
// XICH ...
|
||||
conditions.ichConditions.isSenkouSpanAOverB &&
|
||||
conditions.ichConditions.isClosedUnderKijunSen &&
|
||||
conditions.ichConditions.isSenkouSpanAOverLast &&
|
||||
conditions.ichConditions.isFutureSenkouSpanAOverB &&
|
||||
conditions.ichConditions.isFutureSenkouSpanAOverLast &&
|
||||
!conditions.ichConditions.isTenkanSenOverKijunSen &&
|
||||
!conditions.ichConditions.isTenkanSenUnderKijunSen &&
|
||||
//
|
||||
// XTD ...
|
||||
conditions.tdConditions.isSwitchedToBullish &&
|
||||
//
|
||||
// XVLM ...
|
||||
conditions.vlmConditions.isVolumeBullish &&
|
||||
conditions.vlmConditions.isVolumeOverLast &&
|
||||
conditions.vlmConditions.isVolumeChangedToBullish &&
|
||||
//
|
||||
// XHULL ...
|
||||
conditions.hullConditions.isBullish &&
|
||||
conditions.hullConditions.isUpBullish &&
|
||||
conditions.hullConditions.isDownBullish &&
|
||||
conditions.hullConditions.isSwitchedToBullish &&
|
||||
//
|
||||
// XCHMA ...
|
||||
conditions.chmaConditions.isFastOverSlow &&
|
||||
conditions.chmaConditions.isCLoseOverFast &&
|
||||
conditions.chmaConditions.isCloseOverSlow &&
|
||||
conditions.chmaConditions.isSlowSupport &&
|
||||
conditions.chmaConditions.isRetestFastSlow &&
|
||||
conditions.chmaConditions.isRetestSFastSlow &&
|
||||
conditions.chmaConditions.isRetestMFastSlow &&
|
||||
conditions.chmaConditions.isRetestLFastSlow &&
|
||||
conditions.chmaConditions.isRetestHFastSlow &&
|
||||
!conditions.chmaConditions.isFastSupport &&
|
||||
!conditions.chmaConditions.isRetestCFastSlow
|
||||
//
|
||||
)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
//
|
||||
// XPV ...
|
||||
(conditions.pvConditions.isNewPeak &&
|
||||
conditions.pvConditions.isNewPeakOverLast &&
|
||||
conditions.pvConditions.isFiboIncreased &&
|
||||
conditions.pvConditions.isCloseOverFib1 &&
|
||||
conditions.pvConditions.isCloseOverFib2 &&
|
||||
conditions.pvConditions.isCloseOverFib3 &&
|
||||
conditions.pvConditions.isCloseOverFib4 &&
|
||||
conditions.pvConditions.isCloseOverFib5) &&
|
||||
(
|
||||
//
|
||||
(
|
||||
//
|
||||
// XPV ...
|
||||
conditions.pvConditions.isSCHHBullish &&
|
||||
conditions.pvConditions.isMCBullish &&
|
||||
conditions.pvConditions.isMCHHBullish &&
|
||||
conditions.pvConditions.isMCLLBullish &&
|
||||
conditions.pvConditions.isLCHHBullish &&
|
||||
conditions.pvConditions.isHCHHBullish &&
|
||||
!conditions.pvConditions.isSCBullish &&
|
||||
!conditions.pvConditions.isSCLLBullish &&
|
||||
!conditions.pvConditions.isLCBullish &&
|
||||
!conditions.pvConditions.isLCLLBullish &&
|
||||
!conditions.pvConditions.isHCBullish &&
|
||||
!conditions.pvConditions.isHCLLBullish &&
|
||||
//
|
||||
// XTD ...
|
||||
conditions.tdConditions.isSwitchedToBullish &&
|
||||
//
|
||||
// XICH ...
|
||||
conditions.ichConditions.isTenkanSenCrossedOverKijunSen &&
|
||||
//
|
||||
// XHULL ...
|
||||
conditions.hullConditions.isSwitchedToBullish &&
|
||||
//
|
||||
// XCHMA ...
|
||||
conditions.chmaConditions.isFastOverSlow &&
|
||||
conditions.chmaConditions.isCLoseOverFast &&
|
||||
conditions.chmaConditions.isCloseOverSlow &&
|
||||
conditions.chmaConditions.isRetestFastSlow &&
|
||||
conditions.chmaConditions.isRetestMFastSlow &&
|
||||
conditions.chmaConditions.isRetestLFastSlow &&
|
||||
conditions.chmaConditions.isRetestHFastSlow &&
|
||||
conditions.chmaConditions.isSlowSupport &&
|
||||
!conditions.chmaConditions.isFastSupport &&
|
||||
!conditions.chmaConditions.isRetestCFastSlow &&
|
||||
!conditions.chmaConditions.isRetestSFastSlow
|
||||
//
|
||||
)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
//
|
||||
// XPV ...
|
||||
conditions.pvConditions.isCloseCrossedOverFib1 &&
|
||||
conditions.pvConditions.isSCBullish &&
|
||||
conditions.pvConditions.isSCHHBullish &&
|
||||
conditions.pvConditions.isSCLLBullish &&
|
||||
conditions.pvConditions.isMCBullish &&
|
||||
conditions.pvConditions.isMCHHBullish &&
|
||||
conditions.pvConditions.isMCLLBullish &&
|
||||
conditions.pvConditions.isLCBullish &&
|
||||
conditions.pvConditions.isLCHHBullish &&
|
||||
conditions.pvConditions.isLCLLBullish &&
|
||||
conditions.pvConditions.isHCHHBullish &&
|
||||
conditions.pvConditions.isMCSwitchedToBullish &&
|
||||
conditions.pvConditions.isMCLLSwitchedToBullish &&
|
||||
conditions.pvConditions.isLCSwitchedToBullish &&
|
||||
conditions.pvConditions.isLCLLSwitchedToBullish &&
|
||||
!conditions.pvConditions.isHCBullish &&
|
||||
!conditions.pvConditions.isHCLLBullish &&
|
||||
!conditions.pvConditions.isMCHHSwitchedToBullish &&
|
||||
!conditions.pvConditions.isLCHHSwitchedToBullish &&
|
||||
//
|
||||
// XICH ...
|
||||
conditions.ichConditions.isClosedOverKijunSen &&
|
||||
conditions.ichConditions.isTenkanSenOverKijunSen &&
|
||||
conditions.ichConditions.isSenkouSpanAOverB &&
|
||||
conditions.ichConditions.isFutureSenkouSpanAOverB &&
|
||||
conditions.ichConditions.isFutureSenkouSpanAOverLast &&
|
||||
!conditions.ichConditions.isSenkouSpanAOverLast &&
|
||||
//
|
||||
// XHULL ...
|
||||
conditions.hullConditions.isSwitchedToBullish &&
|
||||
//
|
||||
// XHTD ...
|
||||
conditions.htdConditions.isSwitchedToBullish &&
|
||||
//
|
||||
// XCHMA ...
|
||||
conditions.chmaConditions.isFastOverSlow &&
|
||||
conditions.chmaConditions.isCLoseOverFast &&
|
||||
conditions.chmaConditions.isCloseOverSlow &&
|
||||
conditions.chmaConditions.isSlowSupport &&
|
||||
conditions.chmaConditions.isRetestFastSlow &&
|
||||
conditions.chmaConditions.isRetestMFastSlow &&
|
||||
conditions.chmaConditions.isRetestLFastSlow &&
|
||||
conditions.chmaConditions.isRetestHFastSlow &&
|
||||
!conditions.chmaConditions.isFastSupport &&
|
||||
!conditions.chmaConditions.isRetestCFastSlow &&
|
||||
!conditions.chmaConditions.isRetestSFastSlow
|
||||
//
|
||||
)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
//
|
||||
// XPV ...
|
||||
conditions.pvConditions.isSCHHBullish &&
|
||||
conditions.pvConditions.isMCHHBullish &&
|
||||
conditions.pvConditions.isLCHHBullish &&
|
||||
conditions.pvConditions.isHCHHBullish &&
|
||||
!conditions.pvConditions.isSCBullish &&
|
||||
!conditions.pvConditions.isSCLLBullish &&
|
||||
!conditions.pvConditions.isMCBullish &&
|
||||
!conditions.pvConditions.isMCLLBullish &&
|
||||
!conditions.pvConditions.isLCBullish &&
|
||||
!conditions.pvConditions.isLCLLBullish &&
|
||||
!conditions.pvConditions.isHCBullish &&
|
||||
!conditions.pvConditions.isHCLLBullish &&
|
||||
//
|
||||
// XICH ...
|
||||
conditions.ichConditions.isTenkanSenCrossedOverKijunSen &&
|
||||
//
|
||||
// XCHMA ...
|
||||
conditions.chmaConditions.isFastOverSlow &&
|
||||
conditions.chmaConditions.isCLoseOverFast &&
|
||||
conditions.chmaConditions.isCloseOverSlow &&
|
||||
conditions.chmaConditions.isRetestFastSlow &&
|
||||
conditions.chmaConditions.isRetestSFastSlow &&
|
||||
conditions.chmaConditions.isRetestMFastSlow &&
|
||||
conditions.chmaConditions.isRetestLFastSlow &&
|
||||
conditions.chmaConditions.isRetestHFastSlow &&
|
||||
!conditions.chmaConditions.isRetestCFastSlow
|
||||
//
|
||||
)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
//
|
||||
// XPV ...
|
||||
conditions.pvConditions.isSCBullish &&
|
||||
conditions.pvConditions.isSCHHBullish &&
|
||||
conditions.pvConditions.isSCLLBullish &&
|
||||
conditions.pvConditions.isSCSwitchedToBullish &&
|
||||
conditions.pvConditions.isSCLLSwitchedToBullish &&
|
||||
conditions.pvConditions.isMCHHBullish &&
|
||||
conditions.pvConditions.isLCHHBullish &&
|
||||
conditions.pvConditions.isHCHHBullish &&
|
||||
!conditions.pvConditions.isSCHHSwitchedToBullish &&
|
||||
!conditions.pvConditions.isMCBullish &&
|
||||
!conditions.pvConditions.isMCLLBullish &&
|
||||
!conditions.pvConditions.isLCBullish &&
|
||||
!conditions.pvConditions.isLCLLBullish &&
|
||||
!conditions.pvConditions.isHCBullish &&
|
||||
!conditions.pvConditions.isHCLLBullish &&
|
||||
//
|
||||
// XICH ...
|
||||
conditions.ichConditions.isClosedOverKijunSen &&
|
||||
conditions.ichConditions.isTenkanSenOverKijunSen &&
|
||||
conditions.ichConditions.isSenkouSpanAOverB &&
|
||||
conditions.ichConditions.isSenkouSpanAOverLast &&
|
||||
conditions.ichConditions.isFutureSenkouSpanAOverB &&
|
||||
conditions.ichConditions.isFutureSenkouSpanAOverLast &&
|
||||
conditions.ichConditions.isSenkouSpanACrossedOverB &&
|
||||
//
|
||||
// XCHMA ...
|
||||
conditions.chmaConditions.isFastOverSlow &&
|
||||
conditions.chmaConditions.isCLoseOverFast &&
|
||||
conditions.chmaConditions.isCloseOverSlow &&
|
||||
conditions.chmaConditions.isRetestFastSlow &&
|
||||
conditions.chmaConditions.isSlowSupport &&
|
||||
conditions.chmaConditions.isRetestSFastSlow &&
|
||||
conditions.chmaConditions.isRetestMFastSlow &&
|
||||
conditions.chmaConditions.isRetestLFastSlow &&
|
||||
conditions.chmaConditions.isRetestHFastSlow &&
|
||||
!conditions.chmaConditions.isRetestCFastSlow
|
||||
//
|
||||
)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
//
|
||||
// XPV ...
|
||||
conditions.pvConditions.isSCBullish &&
|
||||
conditions.pvConditions.isSCHHBullish &&
|
||||
conditions.pvConditions.isSCLLBullish &&
|
||||
conditions.pvConditions.isMCBullish &&
|
||||
conditions.pvConditions.isMCHHBullish &&
|
||||
conditions.pvConditions.isMCLLBullish &&
|
||||
conditions.pvConditions.isLCHHBullish &&
|
||||
conditions.pvConditions.isHCBullish &&
|
||||
conditions.pvConditions.isHCHHBullish &&
|
||||
conditions.pvConditions.isHCLLBullish &&
|
||||
!conditions.pvConditions.isLCBullish &&
|
||||
!conditions.pvConditions.isLCLLBullish &&
|
||||
//
|
||||
// XICH ...
|
||||
conditions.ichConditions.isClosedOverKijunSen &&
|
||||
conditions.ichConditions.isTenkanSenOverKijunSen &&
|
||||
conditions.ichConditions.isSenkouSpanAOverB &&
|
||||
conditions.ichConditions.isFutureSenkouSpanAOverB &&
|
||||
conditions.ichConditions.isFutureSenkouSpanAOverLast &&
|
||||
!conditions.ichConditions.isSenkouSpanAOverLast &&
|
||||
//
|
||||
// XSTR ...
|
||||
conditions.strConditions.isTrendSwitchedToBullish &&
|
||||
//
|
||||
// XCHMA ...
|
||||
conditions.chmaConditions.isFastOverSlow &&
|
||||
conditions.chmaConditions.isCLoseOverFast &&
|
||||
conditions.chmaConditions.isCloseOverSlow
|
||||
//
|
||||
)
|
||||
//
|
||||
)
|
||||
//
|
||||
)
|
||||
//
|
||||
||
|
||||
//
|
||||
(
|
||||
//
|
||||
// XPV ...
|
||||
conditions.pvConditions.isCloseOverFib1 &&
|
||||
conditions.pvConditions.isCloseOverFib2 &&
|
||||
conditions.pvConditions.isCloseOverFib3 &&
|
||||
conditions.pvConditions.isCloseOverFib4 &&
|
||||
conditions.pvConditions.isCloseOverFib5 &&
|
||||
conditions.pvConditions.isSCBullish &&
|
||||
conditions.pvConditions.isSCHHBullish &&
|
||||
conditions.pvConditions.isSCLLBullish &&
|
||||
conditions.pvConditions.isMCBullish &&
|
||||
conditions.pvConditions.isMCHHBullish &&
|
||||
conditions.pvConditions.isMCLLBullish &&
|
||||
conditions.pvConditions.isLCHHBullish &&
|
||||
!conditions.pvConditions.isLCBullish &&
|
||||
!conditions.pvConditions.isLCLLBullish &&
|
||||
!conditions.pvConditions.isHCBullish &&
|
||||
!conditions.pvConditions.isHCHHBullish &&
|
||||
!conditions.pvConditions.isHCLLBullish &&
|
||||
//
|
||||
// XMC ...
|
||||
conditions.mcConditions.isSwitchedToBullish &&
|
||||
conditions.mcConditions.isSlowCrossedOverVerifier &&
|
||||
//
|
||||
// XICH ...
|
||||
conditions.ichConditions.isSenkouSpanAOverB &&
|
||||
conditions.ichConditions.isClosedOverKijunSen &&
|
||||
conditions.ichConditions.isTenkanSenOverKijunSen &&
|
||||
!conditions.ichConditions.isSenkouSpanAOverLast &&
|
||||
//
|
||||
// XSTR ...
|
||||
conditions.strConditions.isTrendSwitchedToBullish
|
||||
//
|
||||
)
|
||||
// //
|
||||
// ||
|
||||
// //
|
||||
// (
|
||||
// //
|
||||
// //
|
||||
// )
|
||||
//
|
||||
)
|
||||
//
|
||||
)
|
||||
//
|
||||
;
|
||||
|
||||
// //
|
||||
// // Filter Conditions Based On Providers ...
|
||||
// if (result) {
|
||||
// //
|
||||
// if (provider == ToString(PROVIDER_UNKNOWN)) {
|
||||
// //
|
||||
// result =
|
||||
// //
|
||||
// result &&
|
||||
// !(
|
||||
// //
|
||||
// //
|
||||
// (
|
||||
|
||||
// )
|
||||
// //
|
||||
// )
|
||||
// //
|
||||
// ;
|
||||
// }
|
||||
// }
|
||||
|
||||
//
|
||||
// Apply Filter ...
|
||||
// Based On Symbol and Period ...
|
||||
@@ -3948,6 +4316,28 @@ struct X121SignalGenerator
|
||||
//
|
||||
;
|
||||
|
||||
// //
|
||||
// // Filter Conditions Based On Providers ...
|
||||
// if (result) {
|
||||
// //
|
||||
// if (provider == ToString(PROVIDER_UNKNOWN)) {
|
||||
// //
|
||||
// result =
|
||||
// //
|
||||
// result &&
|
||||
// !(
|
||||
// //
|
||||
// //
|
||||
// (
|
||||
|
||||
// )
|
||||
// //
|
||||
// )
|
||||
// //
|
||||
// ;
|
||||
// }
|
||||
// }
|
||||
|
||||
//
|
||||
// Apply Filter ...
|
||||
// Based On Symbol and Period ...
|
||||
|
||||
+116
-7
@@ -40,6 +40,9 @@ double eaAllowShort = true;
|
||||
|
||||
//
|
||||
// Variables ...
|
||||
XBarTracker eaBarTracker;
|
||||
|
||||
//
|
||||
XSCXTestSetupEA *mSetupEA;
|
||||
XSCXCTHelper *mCTHelper;
|
||||
XSCXCCHelper *mCCHelper;
|
||||
@@ -63,6 +66,16 @@ int OnInit()
|
||||
return INIT_FAILED;
|
||||
}
|
||||
|
||||
//
|
||||
bool isInited = eaBarTracker.Init(
|
||||
_Symbol,
|
||||
_Period //
|
||||
);
|
||||
if (!isInited)
|
||||
{
|
||||
return INIT_FAILED;
|
||||
}
|
||||
|
||||
//
|
||||
// Init Succeed ...
|
||||
return INIT_SUCCEEDED;
|
||||
@@ -95,7 +108,103 @@ void OnDeinit(const int reason)
|
||||
// On Tick Handler ...
|
||||
void OnTick()
|
||||
{
|
||||
mSetupEA.OnTick();
|
||||
// mSetupEA.OnTick();
|
||||
|
||||
//
|
||||
if (!eaBarTracker.CanProcessBar())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL cBar;
|
||||
bool isInit = cBar.Init(
|
||||
_Symbol,
|
||||
_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,
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
@@ -212,9 +321,9 @@ void PreConfigureStyles(XTestInputs &inputs)
|
||||
{
|
||||
//
|
||||
// XRL ...
|
||||
inputs.rlInputs.showFast = true;
|
||||
inputs.rlInputs.showSlow = true;
|
||||
inputs.rlInputs.showVerifier = true;
|
||||
inputs.rlInputs.showFast = false;
|
||||
inputs.rlInputs.showSlow = false;
|
||||
inputs.rlInputs.showVerifier = false;
|
||||
|
||||
//
|
||||
// XHTD ...
|
||||
@@ -222,7 +331,7 @@ void PreConfigureStyles(XTestInputs &inputs)
|
||||
|
||||
//
|
||||
// XATSL ...
|
||||
inputs.atslInputs.show = true;
|
||||
inputs.atslInputs.show = false;
|
||||
|
||||
//
|
||||
// XSLN ...
|
||||
@@ -240,12 +349,12 @@ void PreConfigureStyles(XTestInputs &inputs)
|
||||
|
||||
//
|
||||
// XPV ...
|
||||
inputs.pvInputs.showPeaksAndVales = true;
|
||||
inputs.pvInputs.showPeaksAndVales = false;
|
||||
inputs.pvInputs.showLevels = false;
|
||||
inputs.pvInputs.showConsolidations = false;
|
||||
inputs.pvInputs.showFibo1Levels = false;
|
||||
inputs.pvInputs.showFibo2Levels = false;
|
||||
inputs.pvInputs.showFibo3Levels = true;
|
||||
inputs.pvInputs.showFibo3Levels = false;
|
||||
inputs.pvInputs.showFibo4Levels = false;
|
||||
inputs.pvInputs.showFibo5Levels = false;
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user