prepare new setup in xchkm strategy ...
This commit is contained in:
@@ -6770,3 +6770,206 @@ void HandleStrategiesOnTick()
|
||||
// Custom Testing Functions ...
|
||||
|
||||
//
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
//
|
||||
bool isCHHKCBullishBreaked =
|
||||
//
|
||||
(
|
||||
//
|
||||
chhkConditions.isCBearish &&
|
||||
chhkConditions.isSBullish &&
|
||||
chhkConditions.isMBullish &&
|
||||
chhkConditions.isLBullish &&
|
||||
chhkConditions.isHBullish
|
||||
//
|
||||
)
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isCHHKSBullishBreaked =
|
||||
//
|
||||
(
|
||||
//
|
||||
chhkConditions.isSBearish &&
|
||||
chhkConditions.isCBullish &&
|
||||
chhkConditions.isMBullish &&
|
||||
chhkConditions.isLBullish &&
|
||||
chhkConditions.isHBullish
|
||||
//
|
||||
)
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isCHHKMBullishBreaked =
|
||||
//
|
||||
(
|
||||
//
|
||||
chhkConditions.isMBearish &&
|
||||
chhkConditions.isCBullish &&
|
||||
chhkConditions.isSBullish &&
|
||||
chhkConditions.isLBullish &&
|
||||
chhkConditions.isHBullish
|
||||
//
|
||||
)
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isCHHKLBullishBreaked =
|
||||
//
|
||||
(
|
||||
//
|
||||
chhkConditions.isLBearish &&
|
||||
chhkConditions.isCBullish &&
|
||||
chhkConditions.isSBullish &&
|
||||
chhkConditions.isMBullish &&
|
||||
chhkConditions.isHBullish
|
||||
//
|
||||
)
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isCHHKHBullishBreaked =
|
||||
//
|
||||
(
|
||||
//
|
||||
chhkConditions.isHBearish &&
|
||||
chhkConditions.isCBullish &&
|
||||
chhkConditions.isSBullish &&
|
||||
chhkConditions.isMBullish &&
|
||||
chhkConditions.isLBullish
|
||||
//
|
||||
)
|
||||
//
|
||||
;
|
||||
|
||||
|
||||
//
|
||||
bool isCHHKBullishBreaked =
|
||||
//
|
||||
isCHHKCBullishBreaked
|
||||
//
|
||||
||
|
||||
//
|
||||
isCHHKSBullishBreaked
|
||||
//
|
||||
||
|
||||
//
|
||||
isCHHKMBullishBreaked
|
||||
//
|
||||
||
|
||||
//
|
||||
isCHHKLBullishBreaked
|
||||
//
|
||||
||
|
||||
//
|
||||
isCHHKHBullishBreaked
|
||||
//
|
||||
;
|
||||
|
||||
|
||||
|
||||
//
|
||||
bool isCHHKCBearishBreaked =
|
||||
//
|
||||
(
|
||||
//
|
||||
chhkConditions.isCBullish &&
|
||||
chhkConditions.isSBearish &&
|
||||
chhkConditions.isMBearish &&
|
||||
chhkConditions.isLBearish &&
|
||||
chhkConditions.isHBearish
|
||||
//
|
||||
)
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isCHHKSBearishBreaked =
|
||||
//
|
||||
(
|
||||
//
|
||||
chhkConditions.isSBullish &&
|
||||
chhkConditions.isCBearish &&
|
||||
chhkConditions.isMBearish &&
|
||||
chhkConditions.isLBearish &&
|
||||
chhkConditions.isHBearish
|
||||
//
|
||||
)
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isCHHKMBearishBreaked =
|
||||
//
|
||||
(
|
||||
//
|
||||
chhkConditions.isMBullish &&
|
||||
chhkConditions.isCBearish &&
|
||||
chhkConditions.isSBearish &&
|
||||
chhkConditions.isLBearish &&
|
||||
chhkConditions.isHBearish
|
||||
//
|
||||
)
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isCHHKLBearishBreaked =
|
||||
//
|
||||
(
|
||||
//
|
||||
chhkConditions.isLBullish &&
|
||||
chhkConditions.isCBearish &&
|
||||
chhkConditions.isSBearish &&
|
||||
chhkConditions.isMBearish &&
|
||||
chhkConditions.isHBearish
|
||||
//
|
||||
)
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isCHHKHBearishBreaked =
|
||||
//
|
||||
(
|
||||
//
|
||||
chhkConditions.isHBullish &&
|
||||
chhkConditions.isCBearish &&
|
||||
chhkConditions.isSBearish &&
|
||||
chhkConditions.isMBearish &&
|
||||
chhkConditions.isLBearish
|
||||
//
|
||||
)
|
||||
//
|
||||
;
|
||||
|
||||
|
||||
//
|
||||
bool isCHHKBearishBreaked =
|
||||
//
|
||||
isCHHKCBearishBreaked
|
||||
//
|
||||
||
|
||||
//
|
||||
isCHHKSBearishBreaked
|
||||
//
|
||||
||
|
||||
//
|
||||
isCHHKMBearishBreaked
|
||||
//
|
||||
||
|
||||
//
|
||||
isCHHKLBearishBreaked
|
||||
//
|
||||
||
|
||||
//
|
||||
isCHHKHBearishBreaked
|
||||
//
|
||||
;
|
||||
|
||||
@@ -318,37 +318,6 @@ bool InitialEA()
|
||||
RegisterStrategy(eurusdXTDTStrategy);
|
||||
}
|
||||
|
||||
//
|
||||
// XCHKM ...
|
||||
if (useXCHKM)
|
||||
{
|
||||
//
|
||||
XSCXCHKMStrategy *eurusdXCHKMStrategy;
|
||||
eurusdXCHKMStrategy = new XSCXCHKMStrategy(
|
||||
eurusdSymbol,
|
||||
PERIOD_M5,
|
||||
eaVolume,
|
||||
0.75, // eaR2R, // R2R ...
|
||||
eaSlippage,
|
||||
magicNumber,
|
||||
true, // Ignore Signal Execution
|
||||
false, // Use TP SL Point
|
||||
false, // Use Max
|
||||
eaTPPoint, // TP
|
||||
eaSLPoint, // SL
|
||||
eaIgnoreTP,
|
||||
eaIgnoreSL,
|
||||
eaAllowLong,
|
||||
eaAllowShort,
|
||||
eaMaxAllowedLongs, // Max Longs
|
||||
eaMaxAllowedShorts // Max Shorts
|
||||
);
|
||||
eurusdXCHKMStrategy.SetAlertLogAlerts(true);
|
||||
eurusdXCHKMStrategy.SetAlertEnableAlerts(true);
|
||||
eurusdXCHKMStrategy.AddSignalEventHandler(OnSignalRecieved);
|
||||
RegisterStrategy(eurusdXCHKMStrategy);
|
||||
}
|
||||
|
||||
//
|
||||
// XTest ...
|
||||
if (useXTest)
|
||||
@@ -379,6 +348,37 @@ bool InitialEA()
|
||||
eurusdTestStrategy.AddSignalEventHandler(OnSignalRecieved);
|
||||
RegisterStrategy(eurusdTestStrategy);
|
||||
}
|
||||
|
||||
//
|
||||
// XCHKM ...
|
||||
if (useXCHKM)
|
||||
{
|
||||
//
|
||||
XSCXCHKMStrategy *eurusdXCHKMStrategy;
|
||||
eurusdXCHKMStrategy = new XSCXCHKMStrategy(
|
||||
eurusdSymbol,
|
||||
PERIOD_M5,
|
||||
eaVolume,
|
||||
eaR2R, // R2R ...
|
||||
eaSlippage,
|
||||
magicNumber,
|
||||
true, // Ignore Signal Execution
|
||||
false, // Use TP SL Point
|
||||
false, // Use Max
|
||||
eaTPPoint, // TP
|
||||
eaSLPoint, // SL
|
||||
eaIgnoreTP,
|
||||
eaIgnoreSL,
|
||||
eaAllowLong,
|
||||
eaAllowShort,
|
||||
eaMaxAllowedLongs, // Max Longs
|
||||
eaMaxAllowedShorts // Max Shorts
|
||||
);
|
||||
eurusdXCHKMStrategy.SetAlertLogAlerts(true);
|
||||
eurusdXCHKMStrategy.SetAlertEnableAlerts(true);
|
||||
eurusdXCHKMStrategy.AddSignalEventHandler(OnSignalRecieved);
|
||||
RegisterStrategy(eurusdXCHKMStrategy);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -1288,12 +1288,12 @@ public:
|
||||
|
||||
//
|
||||
// Short ...
|
||||
CopyCTrend(
|
||||
CopySTrend(
|
||||
zIndex,
|
||||
loopback,
|
||||
conditions.sTrend //
|
||||
);
|
||||
CopyCState(
|
||||
CopySState(
|
||||
zIndex,
|
||||
loopback,
|
||||
conditions.sState //
|
||||
@@ -1301,12 +1301,12 @@ public:
|
||||
|
||||
//
|
||||
// Medium ...
|
||||
CopyCTrend(
|
||||
CopyMTrend(
|
||||
zIndex,
|
||||
loopback,
|
||||
conditions.mTrend //
|
||||
);
|
||||
CopyCState(
|
||||
CopyMState(
|
||||
zIndex,
|
||||
loopback,
|
||||
conditions.mState //
|
||||
@@ -1314,12 +1314,12 @@ public:
|
||||
|
||||
//
|
||||
// Long ...
|
||||
CopyCTrend(
|
||||
CopyLTrend(
|
||||
zIndex,
|
||||
loopback,
|
||||
conditions.lTrend //
|
||||
);
|
||||
CopyCState(
|
||||
CopyLState(
|
||||
zIndex,
|
||||
loopback,
|
||||
conditions.lState //
|
||||
@@ -1327,12 +1327,12 @@ public:
|
||||
|
||||
//
|
||||
// Hind ...
|
||||
CopyCTrend(
|
||||
CopyHTrend(
|
||||
zIndex,
|
||||
loopback,
|
||||
conditions.hTrend //
|
||||
);
|
||||
CopyCState(
|
||||
CopyHState(
|
||||
zIndex,
|
||||
loopback,
|
||||
conditions.hState //
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user