add support of Activated Box Senario ...
This commit is contained in:
@@ -267,15 +267,6 @@ struct X121Conditions
|
|||||||
//
|
//
|
||||||
// Conditions ...
|
// Conditions ...
|
||||||
|
|
||||||
//
|
|
||||||
// XTrend ...
|
|
||||||
|
|
||||||
//
|
|
||||||
bool isTrendBullish;
|
|
||||||
bool isTrendBearish;
|
|
||||||
bool isTrendSwitchedToBullish;
|
|
||||||
bool isTrendSwitchedToBearish;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
bool isRsiSlopeBullish;
|
bool isRsiSlopeBullish;
|
||||||
bool isStrSlopeBullish;
|
bool isStrSlopeBullish;
|
||||||
@@ -1067,29 +1058,6 @@ struct X121Conditions
|
|||||||
bearishScore += highScore;
|
bearishScore += highScore;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// XTREND ...
|
|
||||||
|
|
||||||
//
|
|
||||||
if (isTrendBullish)
|
|
||||||
{
|
|
||||||
bullishScore += minScore;
|
|
||||||
}
|
|
||||||
if (isTrendSwitchedToBullish)
|
|
||||||
{
|
|
||||||
bullishScore += score;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
if (isTrendBearish)
|
|
||||||
{
|
|
||||||
bearishScore += minScore;
|
|
||||||
}
|
|
||||||
if (isTrendSwitchedToBearish)
|
|
||||||
{
|
|
||||||
bearishScore += score;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// XSAR ...
|
// XSAR ...
|
||||||
|
|
||||||
@@ -1796,14 +1764,6 @@ struct X121Conditions
|
|||||||
ToString("isSarSwitchedToBearish", isSarSwitchedToBearish, ignoreFalseConditions, separator) +
|
ToString("isSarSwitchedToBearish", isSarSwitchedToBearish, ignoreFalseConditions, separator) +
|
||||||
//
|
//
|
||||||
"-----------------------" + separator +
|
"-----------------------" + separator +
|
||||||
"Trend ..." + separator +
|
|
||||||
"-----------------------" + separator +
|
|
||||||
ToString("isTrendBullish", isTrendBullish, ignoreFalseConditions, separator) +
|
|
||||||
ToString("isTrendBearish", isTrendBearish, ignoreFalseConditions, separator) +
|
|
||||||
ToString("isTrendSwitchedToBullish", isTrendSwitchedToBullish, ignoreFalseConditions, separator) +
|
|
||||||
ToString("isTrendSwitchedToBearish", isTrendSwitchedToBearish, ignoreFalseConditions, separator) +
|
|
||||||
//
|
|
||||||
"-----------------------" + separator +
|
|
||||||
"STR ..." + separator +
|
"STR ..." + separator +
|
||||||
"-----------------------" + separator +
|
"-----------------------" + separator +
|
||||||
ToString("isStrBullish", isStrBullish, ignoreFalseConditions, separator) +
|
ToString("isStrBullish", isStrBullish, ignoreFalseConditions, separator) +
|
||||||
|
|||||||
@@ -53,6 +53,10 @@ struct XSignalBox
|
|||||||
XBoxZone fvg;
|
XBoxZone fvg;
|
||||||
XBoxZone sharp;
|
XBoxZone sharp;
|
||||||
|
|
||||||
|
//
|
||||||
|
double sl;
|
||||||
|
double tp;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Constructor ...
|
// Constructor ...
|
||||||
XSignalBox()
|
XSignalBox()
|
||||||
@@ -68,6 +72,10 @@ struct XSignalBox
|
|||||||
*/
|
*/
|
||||||
void Clean()
|
void Clean()
|
||||||
{
|
{
|
||||||
|
//
|
||||||
|
sl = 0;
|
||||||
|
tp = 0;
|
||||||
|
|
||||||
//
|
//
|
||||||
ob.Clean();
|
ob.Clean();
|
||||||
fvg.Clean();
|
fvg.Clean();
|
||||||
|
|||||||
@@ -3112,6 +3112,35 @@ struct X121SMCStrategyConditionParser
|
|||||||
//
|
//
|
||||||
// Checking Other Conditions ...
|
// Checking Other Conditions ...
|
||||||
|
|
||||||
|
//
|
||||||
|
// XVWAP ...
|
||||||
|
|
||||||
|
//
|
||||||
|
bool isVWapSlopeBullish =
|
||||||
|
cXConditions.isVwapFastSlopeBullish &&
|
||||||
|
cXConditions.isVwapMidSlopeBullish &&
|
||||||
|
cXConditions.isVwapSlowSlopeBullish;
|
||||||
|
|
||||||
|
//
|
||||||
|
bool isVWapSlopeBearish =
|
||||||
|
cXConditions.isVwapFastSlopeBearish &&
|
||||||
|
cXConditions.isVwapMidSlopeBearish &&
|
||||||
|
cXConditions.isVwapSlowSlopeBearish;
|
||||||
|
|
||||||
|
//
|
||||||
|
bool isVWapBullishCondition =
|
||||||
|
(cXConditions.isVWapBullishOrdered &&
|
||||||
|
cXConditions.isVWapSwitchedToBullishState) ||
|
||||||
|
(cXConditions.isVWapBullishState &&
|
||||||
|
cXConditions.isVWapSwitchedToBullishOrdered);
|
||||||
|
|
||||||
|
//
|
||||||
|
bool isVWapBearishCondition =
|
||||||
|
(cXConditions.isVWapBearishOrdered &&
|
||||||
|
cXConditions.isVWapSwitchedToBearishState) ||
|
||||||
|
(cXConditions.isVWapBearishState &&
|
||||||
|
cXConditions.isVWapSwitchedToBearishOrdered);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Bullish Conditions ...
|
// Bullish Conditions ...
|
||||||
isBullish =
|
isBullish =
|
||||||
@@ -3121,7 +3150,9 @@ struct X121SMCStrategyConditionParser
|
|||||||
//
|
//
|
||||||
hasSignalBox &&
|
hasSignalBox &&
|
||||||
isSignalBoxBullish &&
|
isSignalBoxBullish &&
|
||||||
isBarValidForBullish
|
isVWapSlopeBullish &&
|
||||||
|
isBarValidForBullish &&
|
||||||
|
isVWapBullishCondition
|
||||||
//
|
//
|
||||||
)
|
)
|
||||||
//
|
//
|
||||||
@@ -3135,8 +3166,10 @@ struct X121SMCStrategyConditionParser
|
|||||||
(
|
(
|
||||||
//
|
//
|
||||||
hasSignalBox &&
|
hasSignalBox &&
|
||||||
|
isVWapSlopeBearish &&
|
||||||
!isSignalBoxBullish &&
|
!isSignalBoxBullish &&
|
||||||
isBarValidForBearish
|
isBarValidForBearish &&
|
||||||
|
isVWapBearishCondition
|
||||||
//
|
//
|
||||||
)
|
)
|
||||||
//
|
//
|
||||||
@@ -3158,6 +3191,19 @@ struct X121SMCStrategyConditionParser
|
|||||||
//
|
//
|
||||||
box = iSignalBox;
|
box = iSignalBox;
|
||||||
box.UpdateTo(TimeCurrent());
|
box.UpdateTo(TimeCurrent());
|
||||||
|
|
||||||
|
//
|
||||||
|
// Provide TP/SL ...
|
||||||
|
|
||||||
|
//
|
||||||
|
box.sl = isBullish
|
||||||
|
? cXConditions.vwapMin
|
||||||
|
: cXConditions.vwapMax;
|
||||||
|
|
||||||
|
//
|
||||||
|
box.tp = isBullish
|
||||||
|
? box.sharp.upper
|
||||||
|
: box.sharp.lower;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -485,7 +485,7 @@ class XCX121SMCXWZSignalDetector : public XCBase
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Prepare Box fro SL ...
|
// Prepare Box fro SL ...
|
||||||
iSL = pivot;
|
iSL = signalBox.sl;
|
||||||
Add(
|
Add(
|
||||||
iSL,
|
iSL,
|
||||||
sls //
|
sls //
|
||||||
@@ -493,7 +493,7 @@ class XCX121SMCXWZSignalDetector : public XCBase
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Fix rf Reward ...
|
// Fix rf Reward ...
|
||||||
rfRewar = 2;
|
rfRewar = 1.5;
|
||||||
}
|
}
|
||||||
else if (signalProvider == X121SMC_XWZ_PROVIDER_XBREAKED_BOX)
|
else if (signalProvider == X121SMC_XWZ_PROVIDER_XBREAKED_BOX)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user