last works ...

This commit is contained in:
2024-05-31 22:16:15 +03:30
parent 1b1ee01528
commit 4e4be34f1a
3 changed files with 251 additions and 99 deletions
+171 -96
View File
@@ -3696,91 +3696,11 @@ private:
bool hHasX786 = hMarket.HasX786LongConditions();
//
if (cHasX786)
{
sl = cMarket.don.GetLowerH(cIndex);
}
else if (sHasX786)
{
sl = sMarket.don.GetLowerH(cIndex);
}
else if (mHasX786)
{
sl = mMarket.don.GetLowerH(cIndex);
}
else if (lHasX786)
{
sl = lMarket.don.GetLowerH(cIndex);
}
else if (hHasX786)
{
sl = hMarket.don.GetLowerH(cIndex);
}
//
result =
//
cHasX786
//
&&
//
sHasX786
//
&&
//
mHasX786
//
&&
//
lHasX786
//
// &&
// //
// hHasX786
//
;
//
if (result)
{
//
r2r = 1;
sl = cMarket.don.GetLowerH(cIndex);
}
//
return result;
}
//
bool X786HasSpecifiedShortSignal(
X121MarketConditions &mConditions, //
double &sl, // Provided SL ...
double &tp, // Provided TP ...
double &r2r // Risk Reward Ratio ...
)
{
//
bool result = false;
//
int zIndex = 0;
int cIndex = zIndex + 1;
int pIndex = cIndex + 1;
//
bool cHasX786 = cMarket.HasX786ShortConditions();
bool sHasX786 = sMarket.HasX786ShortConditions();
bool mHasX786 = mMarket.HasX786ShortConditions();
bool lHasX786 = lMarket.HasX786ShortConditions();
bool hHasX786 = hMarket.HasX786ShortConditions();
//
double cMarketSLe = cMarket.don.GetUpperL(cIndex);
double sMarketSLe = sMarket.don.GetUpperL(cIndex);
double mMarketSLe = mMarket.don.GetUpperL(cIndex);
double lMarketSLe = lMarket.don.GetUpperL(cIndex);
double hMarketSLe = hMarket.don.GetUpperL(cIndex);
double cMarketSL = cMarket.don.GetLowerH(cIndex);
double sMarketSL = sMarket.don.GetLowerH(cIndex);
double mMarketSL = mMarket.don.GetLowerH(cIndex);
double lMarketSL = lMarket.don.GetLowerH(cIndex);
double hMarketSL = hMarket.don.GetLowerH(cIndex);
//
bool condition1 =
@@ -3834,9 +3754,9 @@ private:
{
//
double sls[] = {
cMarketSLe,
sMarketSLe,
mMarketSLe //
cMarketSL,
sMarketSL,
mMarketSL //
};
//
@@ -3846,9 +3766,9 @@ private:
{
//
double sls[] = {
sMarketSLe,
mMarketSLe,
lMarketSLe //
sMarketSL,
mMarketSL,
lMarketSL //
};
//
@@ -3858,9 +3778,9 @@ private:
{
//
double sls[] = {
mMarketSLe,
lMarketSLe,
hMarketSLe //
mMarketSL,
lMarketSL,
hMarketSL //
};
//
@@ -3870,8 +3790,163 @@ private:
{
//
double sls[] = {
lMarketSLe,
hMarketSLe //
lMarketSL,
hMarketSL //
};
//
sl = GetAverage(sls);
}
//
result =
//
condition1
//
||
//
condition2
//
||
//
condition3
//
||
//
condition4
//
;
//
if (result)
{
r2r = 1;
}
//
return result;
}
//
bool X786HasSpecifiedShortSignal(
X121MarketConditions &mConditions, //
double &sl, // Provided SL ...
double &tp, // Provided TP ...
double &r2r // Risk Reward Ratio ...
)
{
//
bool result = false;
//
int zIndex = 0;
int cIndex = zIndex + 1;
int pIndex = cIndex + 1;
//
bool cHasX786 = cMarket.HasX786ShortConditions();
bool sHasX786 = sMarket.HasX786ShortConditions();
bool mHasX786 = mMarket.HasX786ShortConditions();
bool lHasX786 = lMarket.HasX786ShortConditions();
bool hHasX786 = hMarket.HasX786ShortConditions();
//
double cMarketSL = cMarket.don.GetUpperL(cIndex);
double sMarketSL = sMarket.don.GetUpperL(cIndex);
double mMarketSL = mMarket.don.GetUpperL(cIndex);
double lMarketSL = lMarket.don.GetUpperL(cIndex);
double hMarketSL = hMarket.don.GetUpperL(cIndex);
//
bool condition1 =
//
((cHasX786 &&
sHasX786)
//
||
//
(cHasX786 &&
mHasX786))
//
;
//
bool condition2 =
//
((sHasX786 &&
mHasX786)
//
||
//
(sHasX786 &&
lHasX786))
//
;
//
bool condition3 =
//
((mHasX786 &&
lHasX786)
//
||
//
(mHasX786 &&
hHasX786))
//
;
//
bool condition4 =
//
(lHasX786 &&
hHasX786)
//
;
//
if (condition1)
{
//
double sls[] = {
cMarketSL,
sMarketSL,
mMarketSL //
};
//
sl = GetAverage(sls);
}
else if (condition2)
{
//
double sls[] = {
sMarketSL,
mMarketSL,
lMarketSL //
};
//
sl = GetAverage(sls);
}
else if (condition3)
{
//
double sls[] = {
mMarketSL,
lMarketSL,
hMarketSL //
};
//
sl = GetAverage(sls);
}
else if (condition4)
{
//
double sls[] = {
lMarketSL,
hMarketSL //
};
//
+78 -1
View File
@@ -828,6 +828,8 @@ public:
Clean(ichChikouSpans);
Clean(ichSenkouSpanAs);
Clean(ichSenkouSpanBs);
Clean(ichFutureSenkouSpanAs);
Clean(ichFutureSenkouSpanBs);
Clean(mcFasts);
Clean(mcSlows);
Clean(mcVerifiers);
@@ -907,6 +909,8 @@ public:
ArraySetAsSeries(ichChikouSpans, true);
ArraySetAsSeries(ichSenkouSpanAs, true);
ArraySetAsSeries(ichSenkouSpanBs, true);
ArraySetAsSeries(ichFutureSenkouSpanAs, true);
ArraySetAsSeries(ichFutureSenkouSpanBs, true);
ArraySetAsSeries(mcFasts, true);
ArraySetAsSeries(mcSlows, true);
ArraySetAsSeries(mcVerifiers, true);
@@ -972,6 +976,9 @@ public:
ArraySetAsSeries(pvLCLLs, true);
ArraySetAsSeries(pvHCHHs, true);
ArraySetAsSeries(pvHCLLs, true);
ArraySetAsSeries(tdBullishs, true);
ArraySetAsSeries(tdBearishs, true);
ArraySetAsSeries(tdSignals, true);
//
// XZG ...
@@ -3567,7 +3574,42 @@ public:
bool HasX786LongConditions()
{
//
bool result;
bool result = false;
//
X121MCycleConditions conditions;
GetMarketConditions(conditions);
//
result =
//
(conditions.isSMHKSwitchedToBullish &&
(conditions.isTDBullish &&
conditions.isCHEBullish &&
conditions.isTrendBullish))
//
||
//
(conditions.isTDSwitchedToBullish &&
(conditions.isSMHKBullish &&
conditions.isCHEBullish &&
conditions.isTrendBullish))
//
||
//
(conditions.isCHESwitchedToBullish &&
(conditions.isTDBullish &&
conditions.isSMHKBullish &&
conditions.isTrendBullish))
//
||
//
(conditions.isTrendSwitchedToBullish &&
(conditions.isTDBullish &&
conditions.isCHEBullish &&
conditions.isSMHKBullish))
//
;
//
return result;
@@ -3580,6 +3622,41 @@ public:
//
bool result = false;
//
X121MCycleConditions conditions;
GetMarketConditions(conditions);
//
result =
//
(conditions.isSMHKSwitchedToBearish &&
(conditions.isTDBearish &&
conditions.isCHEBearish &&
conditions.isTrendBearish))
//
||
//
(conditions.isTDSwitchedToBearish &&
(conditions.isSMHKBearish &&
conditions.isCHEBearish &&
conditions.isTrendBearish))
//
||
//
(conditions.isCHESwitchedToBearish &&
(conditions.isTDBearish &&
conditions.isSMHKBearish &&
conditions.isTrendBearish))
//
||
//
(conditions.isTrendSwitchedToBearish &&
(conditions.isTDBearish &&
conditions.isCHEBearish &&
conditions.isSMHKBearish))
//
;
//
return result;
}