prepare new setup in xchkm strategy ...
This commit is contained in:
+204
-1
@@ -6769,4 +6769,207 @@ void HandleStrategiesOnTick()
|
|||||||
//
|
//
|
||||||
// Custom Testing Functions ...
|
// 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);
|
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 ...
|
// XTest ...
|
||||||
if (useXTest)
|
if (useXTest)
|
||||||
@@ -379,6 +348,37 @@ bool InitialEA()
|
|||||||
eurusdTestStrategy.AddSignalEventHandler(OnSignalRecieved);
|
eurusdTestStrategy.AddSignalEventHandler(OnSignalRecieved);
|
||||||
RegisterStrategy(eurusdTestStrategy);
|
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 ...
|
// Short ...
|
||||||
CopyCTrend(
|
CopySTrend(
|
||||||
zIndex,
|
zIndex,
|
||||||
loopback,
|
loopback,
|
||||||
conditions.sTrend //
|
conditions.sTrend //
|
||||||
);
|
);
|
||||||
CopyCState(
|
CopySState(
|
||||||
zIndex,
|
zIndex,
|
||||||
loopback,
|
loopback,
|
||||||
conditions.sState //
|
conditions.sState //
|
||||||
@@ -1301,12 +1301,12 @@ public:
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Medium ...
|
// Medium ...
|
||||||
CopyCTrend(
|
CopyMTrend(
|
||||||
zIndex,
|
zIndex,
|
||||||
loopback,
|
loopback,
|
||||||
conditions.mTrend //
|
conditions.mTrend //
|
||||||
);
|
);
|
||||||
CopyCState(
|
CopyMState(
|
||||||
zIndex,
|
zIndex,
|
||||||
loopback,
|
loopback,
|
||||||
conditions.mState //
|
conditions.mState //
|
||||||
@@ -1314,12 +1314,12 @@ public:
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Long ...
|
// Long ...
|
||||||
CopyCTrend(
|
CopyLTrend(
|
||||||
zIndex,
|
zIndex,
|
||||||
loopback,
|
loopback,
|
||||||
conditions.lTrend //
|
conditions.lTrend //
|
||||||
);
|
);
|
||||||
CopyCState(
|
CopyLState(
|
||||||
zIndex,
|
zIndex,
|
||||||
loopback,
|
loopback,
|
||||||
conditions.lState //
|
conditions.lState //
|
||||||
@@ -1327,12 +1327,12 @@ public:
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Hind ...
|
// Hind ...
|
||||||
CopyCTrend(
|
CopyHTrend(
|
||||||
zIndex,
|
zIndex,
|
||||||
loopback,
|
loopback,
|
||||||
conditions.hTrend //
|
conditions.hTrend //
|
||||||
);
|
);
|
||||||
CopyCState(
|
CopyHState(
|
||||||
zIndex,
|
zIndex,
|
||||||
loopback,
|
loopback,
|
||||||
conditions.hState //
|
conditions.hState //
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user