This commit is contained in:
2024-07-28 02:07:07 +03:30
parent 2a85f97ad3
commit 0e3df1a494
5 changed files with 958 additions and 161 deletions
+414 -146
View File
@@ -114,6 +114,78 @@ public:
//
// Getter / Setter (s) ...
//
ENUM_TIMEFRAMES AnalizePeriod()
{
return mAnalizePeriod;
}
//
void AnalizePeriod(ENUM_TIMEFRAMES value)
{
mAnalizePeriod = value;
}
//
bool DrawImportantAreas()
{
return mDrawImportantAreas;
}
//
void DrawImportantAreas(bool value)
{
mDrawImportantAreas = value;
}
//
bool EnableXCHE()
{
return mEnableXCHE;
}
//
void EnableXCHE(bool value)
{
mEnableXCHE = value;
}
//
bool EnableXCHM()
{
return mEnableXCHM;
}
//
void EnableXCHM(bool value)
{
mEnableXCHM = value;
}
//
bool EnableXCHHK()
{
return mEnableXCHHK;
}
//
void EnableXCHHK(bool value)
{
mEnableXCHHK = value;
}
//
bool EnableXCHSTR()
{
return mEnableXCHSTR;
}
//
void EnableXCHSTR(bool value)
{
mEnableXCHSTR = value;
}
//
// Overrides ...
@@ -150,10 +222,6 @@ public:
bool hasLong = false;
bool hasShort = false;
//
// Draw Support/Resistance/OB(s)/FVG(s) ...
bool drawImportantAreas = true;
//
// Retrieve Conditions ...
@@ -316,7 +384,7 @@ public:
if (hasSupport)
{
//
if (drawImportantAreas)
if (mDrawImportantAreas)
{
//
DrawSupport(
@@ -346,7 +414,7 @@ public:
if (hasResistance)
{
//
if (drawImportantAreas)
if (mDrawImportantAreas)
{
//
DrawResistance(
@@ -378,7 +446,7 @@ public:
if (hasBullishOB)
{
//
if (drawImportantAreas)
if (mDrawImportantAreas)
{
//
DrawBullishOrderBlock(
@@ -407,7 +475,7 @@ public:
if (hasBearishOB)
{
//
if (drawImportantAreas)
if (mDrawImportantAreas)
{
//
DrawBearishOrderBlock(
@@ -445,7 +513,7 @@ public:
bullishFVG = aBar;
//
if (drawImportantAreas)
if (mDrawImportantAreas)
{
//
DrawBullishFVG(
@@ -482,7 +550,7 @@ public:
bearishFVG = aBar;
//
if (drawImportantAreas)
if (mDrawImportantAreas)
{
//
DrawBearishFVG(
@@ -596,174 +664,330 @@ public:
double chstrMaxBearish = chstrHelper.GetMaxBearish(cIndex);
//
// XCHHK ...
double cheMaxLE = cheHelper.GetMaxLongExit(cIndex);
double cheMinLE = cheHelper.GetMinLongExit(cIndex);
double cheMaxSE = cheHelper.GetMaxShortExit(cIndex);
double cheMinSE = cheHelper.GetMinShortExit(cIndex);
//
int pushers = 0;
string signallers[];
//
if (chhkConditions.isBullishPowerUp)
// XCHHK ...
if (mEnableXCHHK)
{
//
bool chhkHasLong =
//
hasBullishPower &&
cBar.IsBullish() &&
hasBullishPattern &&
hasBullishPressure &&
cheConditions.isStrongBullish &&
cBar.low > chhkMinBullishHigh &&
chhkConditions.isBullishPowerUp
//
;
//
hasLong = chhkHasLong;
if (hasLong)
if (chhkConditions.isBullishPowerUp)
{
//
pushers++;
sl = chhkMaxBullishLow;
type = POSITION_TYPE_BUY;
bool chhkHasLong =
//
hasBullishPower &&
cBar.IsBullish() &&
hasBullishPattern &&
hasBullishPressure &&
cheConditions.isStrongBullish &&
cBar.low > chhkMinBullishHigh &&
chhkConditions.isBullishPowerUp
//
;
//
if (chhkHasLong)
{
//
hasLong = chhkHasLong;
if (hasLong)
{
//
pushers++;
Add(
"XCHHK",
signallers //
);
//
sl = chhkMaxBullishLow;
type = POSITION_TYPE_BUY;
}
}
}
}
//
if (chhkConditions.isBearishPowerUp)
{
//
bool chhkHasShort =
//
hasBearishPower &&
cBar.IsBearish() &&
hasBearishPattern &&
hasBearishPressure &&
cheConditions.isStrongBearish &&
cBar.high < chhkMaxBearishLow &&
chhkConditions.isBearishPowerUp
//
;
//
hasShort = chhkHasShort;
if (hasShort)
if (chhkConditions.isBearishPowerUp)
{
//
pushers++;
sl = chhkMinBearishHigh;
type = POSITION_TYPE_SELL;
bool chhkHasShort =
//
hasBearishPower &&
cBar.IsBearish() &&
hasBearishPattern &&
hasBearishPressure &&
cheConditions.isStrongBearish &&
cBar.high < chhkMaxBearishLow &&
chhkConditions.isBearishPowerUp
//
;
//
if (chhkHasShort)
{
//
hasShort = chhkHasShort;
if (hasShort)
{
//
pushers++;
Add(
"XCHHK",
signallers //
);
//
sl = chhkMinBearishHigh;
type = POSITION_TYPE_SELL;
}
}
}
}
//
// XCHM ...
//
if (chmConditions.isBullishPowerUp)
if (mEnableXCHM)
{
//
bool chmHasLong =
//
hasBullishPower &&
cBar.IsBullish() &&
hasBullishPattern &&
hasBullishPressure &&
cBar.low > chmMinBullishFast &&
cheConditions.isStrongBullish &&
chmConditions.isBullishPowerUp
//
;
//
hasLong = chmHasLong;
if (hasLong)
if (chmConditions.isBullishPowerUp)
{
//
pushers++;
sl = chmMaxBullishFast;
type = POSITION_TYPE_BUY;
bool chmHasLong =
//
hasBullishPower &&
cBar.IsBullish() &&
hasBullishPattern &&
hasBullishPressure &&
cBar.low > chmMinBullishFast &&
cheConditions.isStrongBullish &&
chmConditions.isBullishPowerUp
//
;
//
if (chmHasLong)
{
//
hasLong = chmHasLong;
if (hasLong)
{
//
pushers++;
Add(
"XCHM",
signallers //
);
//
sl = chmMaxBullishFast;
type = POSITION_TYPE_BUY;
}
}
}
}
//
if (chmConditions.isBearishPowerUp)
{
//
bool chmHasShort =
//
hasBearishPower &&
cBar.IsBearish() &&
hasBearishPattern &&
hasBearishPressure &&
cBar.high < chmMaxBearishFast &&
cheConditions.isStrongBearish &&
chmConditions.isBearishPowerUp
//
;
//
hasShort = chmHasShort;
if (hasShort)
if (chmConditions.isBearishPowerUp)
{
//
pushers++;
sl = chmMinBearishFast;
type = POSITION_TYPE_SELL;
bool chmHasShort =
//
hasBearishPower &&
cBar.IsBearish() &&
hasBearishPattern &&
hasBearishPressure &&
cBar.high < chmMaxBearishFast &&
cheConditions.isStrongBearish &&
chmConditions.isBearishPowerUp
//
;
//
if (chmHasShort)
{
//
hasShort = chmHasShort;
if (hasShort)
{
//
pushers++;
Add(
"XCHM",
signallers //
);
//
sl = chmMinBearishFast;
type = POSITION_TYPE_SELL;
}
}
}
}
//
// XCHSTR ...
//
if (chstrConditions.isBullishPowerUp)
if (mEnableXCHSTR)
{
//
bool chstrHasLong =
//
hasBullishPower &&
cBar.IsBullish() &&
hasBullishPattern &&
hasBullishPressure &&
cBar.low > chstrMinBullish &&
cheConditions.isStrongBullish &&
chstrConditions.isBullishPowerUp
//
;
//
hasLong = chstrHasLong;
if (hasLong)
if (chstrConditions.isBullishPowerUp)
{
//
pushers++;
sl = chstrMinBullish;
type = POSITION_TYPE_BUY;
bool chstrHasLong =
//
hasBullishPower &&
cBar.IsBullish() &&
hasBullishPattern &&
hasBullishPressure &&
cBar.low > chstrMinBullish &&
cheConditions.isStrongBullish &&
chstrConditions.isBullishPowerUp
//
;
//
if (chstrHasLong)
{
//
hasLong = chstrHasLong;
if (hasLong)
{
//
pushers++;
Add(
"XCHSTR",
signallers //
);
//
sl = chstrMinBullish;
type = POSITION_TYPE_BUY;
}
}
}
//
if (chstrConditions.isBearishPowerUp)
{
//
bool chstrHasShort =
//
hasBearishPower &&
cBar.IsBearish() &&
hasBearishPattern &&
hasBearishPressure &&
cBar.high < chstrMaxBearish &&
cheConditions.isStrongBearish &&
chstrConditions.isBearishPowerUp
//
;
//
if (chstrHasShort)
{
//
hasShort = chstrHasShort;
if (hasShort)
{
//
pushers++;
Add(
"XCHSTR",
signallers //
);
//
sl = chstrMaxBearish;
type = POSITION_TYPE_SELL;
}
}
}
}
//
if (chstrConditions.isBearishPowerUp)
// XCHE ...
if (mEnableXCHE)
{
//
bool chstrHasShort =
//
hasBearishPower &&
cBar.IsBearish() &&
hasBearishPattern &&
hasBearishPressure &&
cBar.high < chstrMaxBearish &&
cheConditions.isStrongBearish &&
chstrConditions.isBearishPowerUp
//
;
//
hasShort = chstrHasShort;
if (hasShort)
if (cheConditions.isStrongBullish)
{
//
pushers++;
sl = chstrMaxBearish;
type = POSITION_TYPE_SELL;
bool cheHasLong =
//
HasCheLast() &&
cheMinLE > 0 &&
hasBullishPower &&
cBar.IsBullish() &&
hasBullishPattern &&
hasBullishPressure &&
cheMinLE > GetMaxCHELast() &&
cheConditions.isStrongBullish
//
;
//
if (cheHasLong)
{
//
hasLong = cheHasLong;
if (hasLong)
{
//
pushers++;
Add(
"XCHE",
signallers //
);
//
sl = cheMinLE;
type = POSITION_TYPE_BUY;
}
}
}
//
if (cheConditions.isStrongBearish)
{
//
bool cheHasShort =
//
HasCheLast() &&
cheMaxSE > 0 &&
hasBearishPower &&
cBar.IsBearish() &&
hasBearishPattern &&
hasBearishPressure &&
cheMaxSE < GetMinCHELast() &&
cheConditions.isStrongBearish
//
;
//
if (cheHasShort)
{
//
hasShort = cheHasShort;
if (hasShort)
{
//
pushers++;
Add(
"XCHE",
signallers //
);
//
sl = cheMaxSE;
type = POSITION_TYPE_SELL;
}
}
}
}
@@ -868,22 +1092,33 @@ public:
//
// Preparing Signal ...
result = signal.Prepare(
mSymbol,
GetTag(),
mPeriod,
type,
mode,
entry,
mVolume,
sl,
tp //
);
if (pushers > 0)
{
//
result = signal.Prepare(
mSymbol,
signallers[0],
mPeriod,
type,
mode,
entry,
mVolume,
sl,
tp //
);
}
else
{
result = false;
}
//
if (pushers > 1)
{
//
Print("======");
Print("Pusher: ", pushers);
ArrayPrint(signallers);
}
//
@@ -899,6 +1134,15 @@ protected:
//
ENUM_TIMEFRAMES mAnalizePeriod; // Important Area Detect Time Frame
//
bool mDrawImportantAreas; // Draw Important Areas where Founded in Analyzing Time Frame
//
bool mEnableXCHE; // Enable XCHE Signaller
bool mEnableXCHM; // Enable XCHM Signaller
bool mEnableXCHHK; // Enable XCHHK Signaller
bool mEnableXCHSTR; // Enable XCHSTR Signaller
//
XOHCL support;
XOHCL resistance;
@@ -951,6 +1195,15 @@ private:
// Configurations for required Indicators ...
void PrepareRequirements()
{
//
mDrawImportantAreas = false;
//
mEnableXCHE = true;
mEnableXCHM = true;
mEnableXCHHK = true;
mEnableXCHSTR = true;
//
support.Clean();
supportTime = NULL;
@@ -1404,6 +1657,21 @@ private:
);
}
//
bool HasCheLast()
{
//
bool result = false;
//
result =
IsValid(cheLastLongExitTime) ||
IsValid(cheLastShortExitTime);
//
return result;
}
//
};