implement senario 1 ...
This commit is contained in:
@@ -450,51 +450,50 @@ class XCX121SMCXWZSignalDetector : public XCBase
|
||||
signalBoxDir //
|
||||
);
|
||||
|
||||
//
|
||||
// Selecting SL(s) ...
|
||||
|
||||
//
|
||||
double iSL = 0;
|
||||
|
||||
//
|
||||
// Default SL ...
|
||||
iSL = pivot;
|
||||
|
||||
//
|
||||
Add(
|
||||
iSL,
|
||||
sls //
|
||||
);
|
||||
|
||||
//
|
||||
// Select and Provide SL Based on ...
|
||||
if (signalProvider == X121SMC_XWZ_PROVIDER_ACTIVATED_MA)
|
||||
{
|
||||
//
|
||||
// Default SL ...
|
||||
iSL = pivot;
|
||||
|
||||
//
|
||||
Add(
|
||||
iSL,
|
||||
sls //
|
||||
);
|
||||
}
|
||||
else if (signalProvider == X121SMC_XWZ_PROVIDER_ACTIVATED_BOX)
|
||||
{
|
||||
//
|
||||
// Default SL ...
|
||||
iSL = pivot;
|
||||
|
||||
//
|
||||
Add(
|
||||
iSL,
|
||||
sls //
|
||||
iSL = MathMax(
|
||||
provider.decisionXConditions.se1Buffer[1],
|
||||
provider.decisionXConditions.se2Buffer[1] //
|
||||
);
|
||||
if (iSL > 0)
|
||||
{
|
||||
//
|
||||
Add(
|
||||
iSL,
|
||||
sls //
|
||||
);
|
||||
}
|
||||
}
|
||||
else if (signalProvider == X121SMC_XWZ_PROVIDER_ACTIVATED_AREA)
|
||||
{
|
||||
//
|
||||
// Default SL ...
|
||||
iSL = pivot;
|
||||
|
||||
//
|
||||
Add(
|
||||
iSL,
|
||||
sls //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
double iAtr = provider.decisionXConditions.atrBuffer[1];
|
||||
iAtr *= 1.5;
|
||||
iAtr *= 0;
|
||||
|
||||
//
|
||||
// Select Condition SL ...
|
||||
@@ -504,8 +503,8 @@ class XCX121SMCXWZSignalDetector : public XCBase
|
||||
double slsMax = GetMax(sls);
|
||||
|
||||
//
|
||||
double longSL = slsMin - iAtr;
|
||||
double shortSL = slsMax + iAtr;
|
||||
double longSL = slsMax - iAtr;
|
||||
double shortSL = slsMin + iAtr;
|
||||
|
||||
//
|
||||
sl = isBullish
|
||||
|
||||
Reference in New Issue
Block a user