resolved 14 sls from 2022 till 2024.07 - 8 Long 6 Short ...

This commit is contained in:
2024-07-07 13:42:03 +03:30
parent ed8617cf2b
commit c4721c7700
4 changed files with 549 additions and 91 deletions
+143 -82
View File
@@ -44,6 +44,7 @@ XBarTracker eaBarTracker;
//
XSCXTestSetupEA *mSetupEA;
XSCXTestSetup *iSetup;
XSCXCTHelper *mCTHelper;
XSCXCCHelper *mCCHelper;
@@ -108,6 +109,7 @@ void OnDeinit(const int reason)
// On Tick Handler ...
void OnTick()
{
//
// mSetupEA.OnTick();
//
@@ -117,94 +119,138 @@ void OnTick()
}
//
XOHCL cBar;
bool isInit = cBar.Init(
_Symbol,
_Period,
1 //
XTestConditions conditions;
bool hasConditions = iSetup.GetConditions(
conditions,
0,
5 //
);
if (!isInit)
{
return;
}
//
datetime time1 = iTime(
_Symbol,
_Period,
2 //
);
//
double fib382 = 0;
//
bool isHammer = cBar.IsHammer();
if (isHammer)
if (hasConditions)
{
//
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 isCHMAOverUnder1 =
//
(conditions.chmaConditions.isFastOverMin &&
conditions.chmaConditions.isFastUnderMin)
//
;
//
bool isCHMAOverUnder2 =
//
(conditions.chmaConditions.isSlowOverMin &&
conditions.chmaConditions.isSlowUnderMin)
//
;
//
bool isCHMAOverUnder3 =
//
(conditions.chmaConditions.isFastOverMax &&
conditions.chmaConditions.isFastUnderMax)
//
;
//
bool isCHMAOverUnder4 =
//
(conditions.chmaConditions.isSlowOverMax &&
conditions.chmaConditions.isSlowUnderMax)
//
;
//
if (isCHMAOverUnder1 || isCHMAOverUnder2 || isCHMAOverUnder3 || isCHMAOverUnder4)
{
Print("isCHMAOverUnder");
}
}
//
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();
}
// //
// XOHCL cBar;
// bool isInit = cBar.Init(
// _Symbol,
// _Period,
// 1 //
// );
// if (!isInit)
// {
// return;
// }
//
bool isBullishEngulf = cBar.IsBullishEngulf();
if (isBullishEngulf)
{
//
Print("Bullish Engulf ...");
eaBarTracker.Waits();
}
// //
// datetime time1 = iTime(
// _Symbol,
// _Period,
// 2 //
// );
//
bool isBearishEngulf = cBar.IsBearishEngulf();
if (isBearishEngulf)
{
//
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);
if (!result)
{
@@ -408,6 +454,21 @@ void PreConfigureStyles(XTestInputs &inputs)
// XHULL ...
inputs.hullInputs.showUpZone = 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;
}
//