last ...
This commit is contained in:
+1219
-167
File diff suppressed because it is too large
Load Diff
@@ -1805,10 +1805,14 @@ int GetLowest(
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
/**
|
||||
* Get Oldest Box Index ...
|
||||
* Get Oldest Index ...
|
||||
*
|
||||
* @param source: XBoxZone instance Reference Collection ...
|
||||
* @param source: XConsolidationZone instance Reference Collection ...
|
||||
*
|
||||
* @return ( int )
|
||||
*/
|
||||
@@ -1868,9 +1872,9 @@ int GetOldest(
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Youngest Box Index ...
|
||||
* Get Youngest Index ...
|
||||
*
|
||||
* @param source: XBoxZone instance Reference Collection ...
|
||||
* @param source: XConsolidationZone instance Reference Collection ...
|
||||
*
|
||||
* @return ( int )
|
||||
*/
|
||||
@@ -1930,9 +1934,9 @@ int GetYoungest(
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Highest Box Index ...
|
||||
* Get Highest Index ...
|
||||
*
|
||||
* @param source: XBoxZone instance Reference Collection ...
|
||||
* @param source: XConsolidationZone instance Reference Collection ...
|
||||
*
|
||||
* @return ( int )
|
||||
*/
|
||||
@@ -1992,9 +1996,9 @@ int GetHighest(
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Lowest Box Index ...
|
||||
* Get Lowest Index ...
|
||||
*
|
||||
* @param source: XBoxZone instance Reference Collection ...
|
||||
* @param source: XConsolidationZone instance Reference Collection ...
|
||||
*
|
||||
* @return ( int )
|
||||
*/
|
||||
@@ -2053,6 +2057,10 @@ int GetLowest(
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
//
|
||||
template <typename T>
|
||||
void SortZones(
|
||||
|
||||
@@ -3857,6 +3857,16 @@ int ExtractOBFVGs(
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Extensions Functions ...
|
||||
//
|
||||
|
||||
/**
|
||||
* Update to Time of Specifiex Collection ...
|
||||
*
|
||||
* @param items: XOBFVG instance Collection ...
|
||||
* @param value: datetime ...
|
||||
*/
|
||||
void SpecifiedUpdateTo(
|
||||
XOBFVG &items[],
|
||||
datetime value = NULL //
|
||||
@@ -3880,4 +3890,335 @@ void SpecifiedUpdateTo(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts to XBoxZone ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool ToBox(
|
||||
XBoxZone &box,
|
||||
XOBFVG &item //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result = ToBox(
|
||||
box,
|
||||
item.ob //
|
||||
);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts to XBoxZone ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
int ToBox(
|
||||
XOBFVG &source[],
|
||||
XBoxZone &dest[] //
|
||||
)
|
||||
{
|
||||
//
|
||||
int result = 0;
|
||||
|
||||
//
|
||||
Clean(dest);
|
||||
int count = ArraySize(source);
|
||||
if (!IsValidSize(count))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XOBFVG iZone = source[i];
|
||||
|
||||
//
|
||||
XBoxZone iBox;
|
||||
bool hasBox = ToBox(
|
||||
iBox,
|
||||
iZone //
|
||||
);
|
||||
|
||||
//
|
||||
if (hasBox)
|
||||
{
|
||||
//
|
||||
AddRef(
|
||||
iBox,
|
||||
dest //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
iBox.Clean();
|
||||
iZone.Clean();
|
||||
}
|
||||
|
||||
//
|
||||
result = ArraySize(dest);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
/**
|
||||
* Get Oldest Index ...
|
||||
*
|
||||
* @param source: XOBFVG instance Reference Collection ...
|
||||
*
|
||||
* @return ( int )
|
||||
*/
|
||||
int GetOldest(
|
||||
XOBFVG &source[] //
|
||||
)
|
||||
{
|
||||
//
|
||||
int result = -1;
|
||||
|
||||
//
|
||||
int count = ArraySize(source);
|
||||
if (!IsValidSize(count))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XBoxZone tmpBoxes[];
|
||||
int boxesCount = ToBox(
|
||||
source,
|
||||
tmpBoxes //
|
||||
);
|
||||
if (!IsValidSize(boxesCount))
|
||||
{
|
||||
//
|
||||
Clean(tmpBoxes);
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XBoxZone selected;
|
||||
for (int i = 0; i < boxesCount; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox = tmpBoxes[i];
|
||||
|
||||
//
|
||||
bool canSet =
|
||||
!selected.IsValid()
|
||||
? true
|
||||
: selected.from > iBox.from;
|
||||
if (canSet)
|
||||
{
|
||||
//
|
||||
result = i;
|
||||
selected = iBox;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
Clean(tmpBoxes);
|
||||
selected.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Youngest Index ...
|
||||
*
|
||||
* @param source: XOBFVG instance Reference Collection ...
|
||||
*
|
||||
* @return ( int )
|
||||
*/
|
||||
int GetYoungest(
|
||||
XOBFVG &source[] //
|
||||
)
|
||||
{
|
||||
//
|
||||
int result = -1;
|
||||
|
||||
//
|
||||
int count = ArraySize(source);
|
||||
if (!IsValidSize(count))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XBoxZone tmpBoxes[];
|
||||
int boxesCount = ToBox(
|
||||
source,
|
||||
tmpBoxes //
|
||||
);
|
||||
if (!IsValidSize(boxesCount))
|
||||
{
|
||||
//
|
||||
Clean(tmpBoxes);
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XBoxZone selected;
|
||||
for (int i = 0; i < boxesCount; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox = tmpBoxes[i];
|
||||
|
||||
//
|
||||
bool canSet =
|
||||
!selected.IsValid()
|
||||
? true
|
||||
: selected.from < iBox.from;
|
||||
if (canSet)
|
||||
{
|
||||
//
|
||||
result = i;
|
||||
selected = iBox;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
Clean(tmpBoxes);
|
||||
selected.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Highest Index ...
|
||||
*
|
||||
* @param source: XOBFVG instance Reference Collection ...
|
||||
*
|
||||
* @return ( int )
|
||||
*/
|
||||
int GetHighest(
|
||||
XOBFVG &source[] //
|
||||
)
|
||||
{
|
||||
//
|
||||
int result = -1;
|
||||
|
||||
//
|
||||
int count = ArraySize(source);
|
||||
if (!IsValidSize(count))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XBoxZone tmpBoxes[];
|
||||
int boxesCount = ToBox(
|
||||
source,
|
||||
tmpBoxes //
|
||||
);
|
||||
if (!IsValidSize(boxesCount))
|
||||
{
|
||||
//
|
||||
Clean(tmpBoxes);
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XBoxZone selected;
|
||||
for (int i = 0; i < boxesCount; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox = tmpBoxes[i];
|
||||
|
||||
//
|
||||
bool canSet =
|
||||
!selected.IsValid()
|
||||
? true
|
||||
: selected.upper < iBox.upper;
|
||||
if (canSet)
|
||||
{
|
||||
//
|
||||
result = i;
|
||||
selected = iBox;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
Clean(tmpBoxes);
|
||||
selected.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Lowest Index ...
|
||||
*
|
||||
* @param source: XOBFVG instance Reference Collection ...
|
||||
*
|
||||
* @return ( int )
|
||||
*/
|
||||
int GetLowest(
|
||||
XOBFVG &source[] //
|
||||
)
|
||||
{
|
||||
//
|
||||
int result = -1;
|
||||
|
||||
//
|
||||
int count = ArraySize(source);
|
||||
if (!IsValidSize(count))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XBoxZone tmpBoxes[];
|
||||
int boxesCount = ToBox(
|
||||
source,
|
||||
tmpBoxes //
|
||||
);
|
||||
if (!IsValidSize(boxesCount))
|
||||
{
|
||||
//
|
||||
Clean(tmpBoxes);
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XBoxZone selected;
|
||||
for (int i = 0; i < boxesCount; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox = tmpBoxes[i];
|
||||
|
||||
//
|
||||
bool canSet =
|
||||
!selected.IsValid()
|
||||
? true
|
||||
: selected.lower > iBox.lower;
|
||||
if (canSet)
|
||||
{
|
||||
//
|
||||
result = i;
|
||||
selected = iBox;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
Clean(tmpBoxes);
|
||||
selected.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -69,7 +69,9 @@ class XCX121SMCXWZSignalDetector : public XCBase
|
||||
XC121SMCCycleHelper *decisionCycleHelper,
|
||||
XC121SMCCycleHelper *analyseCycleHelper,
|
||||
XC121SMCCycleHelper *consolidationCycleHelper,
|
||||
XC121SMCCycleHelper *visionCycleHelper
|
||||
XC121SMCCycleHelper *visionCycleHelper,
|
||||
//
|
||||
double maxAllowedSLDistanceInPoint = 300
|
||||
//
|
||||
)
|
||||
{
|
||||
@@ -118,14 +120,6 @@ class XCX121SMCXWZSignalDetector : public XCBase
|
||||
datetime cTime = TimeCurrent();
|
||||
double points = GetPoints(symbol);
|
||||
|
||||
//
|
||||
double pivot = 0;
|
||||
double point = 0;
|
||||
double target = 0;
|
||||
double reward = 0;
|
||||
double amountPercent = 0;
|
||||
ENUM_X121SMC_XWZ_PRIORITY priority = X121SMC_XWZ_PRIORITY_NONE;
|
||||
|
||||
//
|
||||
// Cycles Conditions ...
|
||||
|
||||
@@ -312,9 +306,22 @@ class XCX121SMCXWZSignalDetector : public XCBase
|
||||
|
||||
//
|
||||
// Setup Conditions ...
|
||||
double sls[];
|
||||
double pivot = 0;
|
||||
double point = 0;
|
||||
double targets[];
|
||||
double reward = 0;
|
||||
XOBFVG selectedZone;
|
||||
double amountPercent = 0;
|
||||
bool hasPriority = false;
|
||||
bool hasRewardAmount = false;
|
||||
bool hasSelectedZone = false;
|
||||
bool isSelectedZoneReversal = false;
|
||||
bool hasSelectedConsolidationZone = false;
|
||||
XConsolidationZone selectedConsolidationZone;
|
||||
ENUM_X_DIRECTION selectedZoneDir = X_DIRECTION_NONE;
|
||||
ENUM_X121SMC_XWZ_PRIORITY priority = X121SMC_XWZ_PRIORITY_NONE;
|
||||
ENUM_X121SMC_XWZ_PROVIDERS provider = X121SMC_XWZ_PROVIDER_NONE;
|
||||
|
||||
//
|
||||
// First We Have to Has Working Zone ...
|
||||
@@ -328,7 +335,8 @@ class XCX121SMCXWZSignalDetector : public XCBase
|
||||
zIndex,
|
||||
visionState,
|
||||
consolidationState,
|
||||
analyseState //
|
||||
analyseState,
|
||||
decisionState //
|
||||
);
|
||||
}
|
||||
|
||||
@@ -352,11 +360,17 @@ class XCX121SMCXWZSignalDetector : public XCBase
|
||||
zIndex,
|
||||
visionState,
|
||||
consolidationState,
|
||||
analyseState //
|
||||
analyseState,
|
||||
decisionState //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
bool hasWaitingZones = hasWorkingZone &&
|
||||
workingZone.HasWaitingZones();
|
||||
|
||||
//
|
||||
// Check Conditions if Has Inside Zones ...
|
||||
bool hasInsideZones = hasWorkingZone &&
|
||||
workingZone.HasInsideZones();
|
||||
if (hasInsideZones)
|
||||
@@ -398,10 +412,12 @@ class XCX121SMCXWZSignalDetector : public XCBase
|
||||
|
||||
//
|
||||
hasSelectedZone = selectedZone.IsValid();
|
||||
provider = X121SMC_XWZ_PROVIDER_PRICE_INSIDE_ZONE;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Check Conditions if Has Breaked Zones ...
|
||||
bool hasBreakedZones = hasWorkingZone &&
|
||||
workingZone.HasBreakedZones();
|
||||
if (hasBreakedZones)
|
||||
@@ -446,21 +462,164 @@ class XCX121SMCXWZSignalDetector : public XCBase
|
||||
|
||||
//
|
||||
hasSelectedZone = selectedZone.IsValid();
|
||||
provider = X121SMC_XWZ_PROVIDER_ACTIVATED_ZONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Double Check and Prepare Signal Conditions ...
|
||||
// including Targets and SLs ...
|
||||
if (hasSelectedZone)
|
||||
{
|
||||
//
|
||||
Print("Has Selected Zone ...");
|
||||
int idx = -1;
|
||||
bool has = false;
|
||||
|
||||
//
|
||||
// Check Consolidation Zones for SL Handling ...
|
||||
selectedZoneDir =
|
||||
!isSelectedZoneReversal
|
||||
? selectedZone.GetDirection()
|
||||
: Opposit(selectedZone.GetDirection());
|
||||
bool isSelectedZonDirBullish = IsBullish(selectedZoneDir);
|
||||
|
||||
//
|
||||
if (isSelectedZoneReversal)
|
||||
{
|
||||
provider = X121SMC_XWZ_PROVIDER_ACTIVATED_CHOCH;
|
||||
}
|
||||
|
||||
//
|
||||
// Calculate Priority ...
|
||||
hasPriority =
|
||||
hasWorkingZone &&
|
||||
workingZone
|
||||
.DetectPriority(
|
||||
priority,
|
||||
selectedZoneDir,
|
||||
zIndex,
|
||||
period //
|
||||
);
|
||||
|
||||
//
|
||||
// Calculate Risk Reward Ration based on Priority ...
|
||||
hasRewardAmount = CalculateRiskReward(
|
||||
priority,
|
||||
reward,
|
||||
amountPercent //
|
||||
);
|
||||
|
||||
//
|
||||
// Calculate Pivot and Point ...
|
||||
|
||||
//
|
||||
pivot =
|
||||
isSelectedZonDirBullish
|
||||
? selectedZone.ob.Lower()
|
||||
: selectedZone.ob.Upper();
|
||||
|
||||
//
|
||||
point =
|
||||
isSelectedZonDirBullish
|
||||
? selectedZone.ob.Upper()
|
||||
: selectedZone.ob.Lower();
|
||||
|
||||
//
|
||||
// Detect Targets ...
|
||||
DetectSelectedZonesTargets(
|
||||
targets,
|
||||
selectedZone,
|
||||
selectedZoneDir,
|
||||
priority,
|
||||
workingZone,
|
||||
zIndex //
|
||||
);
|
||||
|
||||
//
|
||||
// Detect SLs ...
|
||||
double iAtr = decisionXConditions.atrBuffer[0];
|
||||
iAtr *= 1.5;
|
||||
|
||||
//
|
||||
// Default SL is Pivot ...
|
||||
if (pivot > 0)
|
||||
{
|
||||
//
|
||||
Add(
|
||||
pivot,
|
||||
sls //
|
||||
);
|
||||
|
||||
//
|
||||
double iSL = iAtr * pivot;
|
||||
Add(
|
||||
iSL,
|
||||
sls //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
DetectSelectedZoneSLCandidates(
|
||||
sls,
|
||||
selectedZone,
|
||||
selectedZoneDir,
|
||||
workingZone,
|
||||
zIndex,
|
||||
maxAllowedSLDistanceInPoint //
|
||||
);
|
||||
|
||||
//
|
||||
// Summaries Conditions ...
|
||||
result =
|
||||
pivot > 0 &&
|
||||
point > 0 &&
|
||||
hasPriority &&
|
||||
hasRewardAmount &&
|
||||
HasDirection(selectedZoneDir);
|
||||
if (result)
|
||||
{
|
||||
//
|
||||
isBullish = IsBullish(selectedZoneDir);
|
||||
isBearish = IsBearish(selectedZoneDir);
|
||||
|
||||
//
|
||||
Copy(
|
||||
sls,
|
||||
mConditions.sls //
|
||||
);
|
||||
Copy(
|
||||
targets,
|
||||
mConditions.targets //
|
||||
);
|
||||
|
||||
//
|
||||
mConditions.pivot = pivot;
|
||||
mConditions.point = point;
|
||||
mConditions.reward = reward;
|
||||
mConditions.setupTime = cTime;
|
||||
mConditions.priority = priority;
|
||||
mConditions.provider = provider;
|
||||
mConditions.dir = selectedZoneDir;
|
||||
mConditions.signalZone = selectedZone;
|
||||
mConditions.amountPercent = amountPercent;
|
||||
}
|
||||
|
||||
//
|
||||
// Cleanup Resources ...
|
||||
|
||||
//
|
||||
Clean(sls);
|
||||
Clean(targets);
|
||||
selectedZone.Clean();
|
||||
selectedConsolidationZone.Clean();
|
||||
}
|
||||
|
||||
//
|
||||
UpdateTo(cTime);
|
||||
|
||||
//
|
||||
// Draw Working Zone ...
|
||||
if (hasWorkingZone)
|
||||
{
|
||||
//
|
||||
@@ -478,9 +637,6 @@ class XCX121SMCXWZSignalDetector : public XCBase
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
return false;
|
||||
|
||||
//
|
||||
// Cleanup Resources ...
|
||||
|
||||
@@ -515,7 +671,6 @@ class XCX121SMCXWZSignalDetector : public XCBase
|
||||
consolidationXConditions.Clean();
|
||||
|
||||
//
|
||||
// mConditions.Clean();
|
||||
consolidationZBar.Clean();
|
||||
|
||||
//
|
||||
@@ -528,9 +683,6 @@ class XCX121SMCXWZSignalDetector : public XCBase
|
||||
//
|
||||
X121SMCStrategyXWZSignalConditions &conditions,
|
||||
//
|
||||
string _symbol,
|
||||
ENUM_TIMEFRAMES _period,
|
||||
//
|
||||
XC121SMCCycleHelper *decisionCycleHelper,
|
||||
XC121SMCCycleHelper *analyseCycleHelper,
|
||||
XC121SMCCycleHelper *consolidationCycleHelper,
|
||||
@@ -587,9 +739,6 @@ class XCX121SMCXWZSignalDetector : public XCBase
|
||||
datetime cTime = TimeCurrent();
|
||||
double points = GetPoints(symbol);
|
||||
|
||||
//
|
||||
double sls[];
|
||||
|
||||
//
|
||||
// Cycles Conditions ...
|
||||
|
||||
@@ -662,95 +811,57 @@ class XCX121SMCXWZSignalDetector : public XCBase
|
||||
X121Conditions analyseXConditions = analyseConditions.x121Conditions;
|
||||
|
||||
//
|
||||
// Check Signal Validation ...
|
||||
double iAtr = decisionXConditions.atrBuffer[1];
|
||||
iAtr *= 1.5;
|
||||
|
||||
//
|
||||
XOHCL cBar;
|
||||
bool isInited = cBar.Init(
|
||||
conditions.symbol,
|
||||
conditions.period,
|
||||
cIndex //
|
||||
);
|
||||
XOHCL pBar;
|
||||
isInited =
|
||||
isInited &&
|
||||
cBar.GetPreviousBar(pBar);
|
||||
bool isLowerBreaked =
|
||||
//
|
||||
isInited &&
|
||||
cBar.high < conditions.point &&
|
||||
pBar.high >= conditions.point
|
||||
//
|
||||
;
|
||||
bool isUpperBreaked =
|
||||
//
|
||||
isInited &&
|
||||
cBar.low > conditions.point &&
|
||||
pBar.low <= conditions.point
|
||||
//
|
||||
;
|
||||
bool isZoneBreaked =
|
||||
(isBullish &&
|
||||
isLowerBreaked) ||
|
||||
(isBearish &&
|
||||
isUpperBreaked);
|
||||
result = !isZoneBreaked;
|
||||
if (!result)
|
||||
// Check Signal Validation ...
|
||||
// IMPORTANT: since all Validations done in SetUp Process ...
|
||||
// here we only Execute Signal ...
|
||||
|
||||
//
|
||||
result = isBullish ||
|
||||
isBearish;
|
||||
|
||||
//
|
||||
if (result)
|
||||
{
|
||||
//
|
||||
cBar.Clean();
|
||||
pBar.Clean();
|
||||
conditions.Clean();
|
||||
// Retrieve Entry Price ...
|
||||
double entry = GetEntry(
|
||||
conditions.symbol,
|
||||
setupDir //
|
||||
);
|
||||
|
||||
//
|
||||
Clean(decisionPoiEvents);
|
||||
Clean(decisionCycleEvents);
|
||||
// Select and Apply SL ...
|
||||
|
||||
//
|
||||
decisionState.Clean();
|
||||
decisionConditions.Clean();
|
||||
decisionXConditions.Clean();
|
||||
double slsMin = GetMin(conditions.sls);
|
||||
double slsMax = GetMax(conditions.sls);
|
||||
|
||||
//
|
||||
Clean(analysePoiEvents);
|
||||
Clean(analyseCycleEvents);
|
||||
double longSL = slsMin;
|
||||
double shortSL = slsMax;
|
||||
|
||||
//
|
||||
double sl = isBullish
|
||||
? longSL
|
||||
: shortSL;
|
||||
|
||||
//
|
||||
conditions.sl = sl;
|
||||
conditions.triggerTime = cTime;
|
||||
conditions.type = isBullish
|
||||
? X_POSITION_TYPE_LONG
|
||||
: X_POSITION_TYPE_SHORT;
|
||||
|
||||
//
|
||||
analyseState.Clean();
|
||||
analyseConditions.Clean();
|
||||
analyseXConditions.Clean();
|
||||
}
|
||||
|
||||
//
|
||||
cBar.Clean();
|
||||
pBar.Clean();
|
||||
|
||||
//
|
||||
double bullishScore = 0;
|
||||
double bearishScore = 0;
|
||||
decisionXConditions.GenerateScore(
|
||||
bullishScore,
|
||||
bearishScore //
|
||||
);
|
||||
bool isBullishScorePassed =
|
||||
isBullish &&
|
||||
bullishScore > (bearishScore * 1.5);
|
||||
bool isBearishScorePassed =
|
||||
isBearish &&
|
||||
bearishScore > (bullishScore * 1.5);
|
||||
bool isScorePassed = isBullishScorePassed ||
|
||||
isBearishScorePassed;
|
||||
|
||||
//
|
||||
// Base SL Used Pivot of Conditions ...
|
||||
|
||||
//
|
||||
// Cleanup ...
|
||||
|
||||
//
|
||||
cBar.Clean();
|
||||
pBar.Clean();
|
||||
|
||||
//
|
||||
Clean(decisionPoiEvents);
|
||||
Clean(decisionCycleEvents);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -592,8 +592,6 @@ class XCX121SMCStrategy : public XCX121SMCBaseStrategy
|
||||
canTrigger = mXWZSignalDetector
|
||||
.DetectSignalTrigger(
|
||||
mTmpConditions[i],
|
||||
symbol,
|
||||
period,
|
||||
mDecisionCycleHelper,
|
||||
mAnalyseCycleHelper,
|
||||
mConsolidationCycleHelper,
|
||||
|
||||
Reference in New Issue
Block a user