add some usefull codes ...
This commit is contained in:
@@ -8140,3 +8140,86 @@ void HandleStrategiesOnTick()
|
|||||||
RegisterStrategy(eurusdXCHKMStrategy);
|
RegisterStrategy(eurusdXCHKMStrategy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
//
|
||||||
|
// XCHCHE ...
|
||||||
|
if (mEnableXCHCHE)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
if (chcheConditions.isBullishPowerUp)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
bool chcheHasLong =
|
||||||
|
//
|
||||||
|
hasBullishPower &&
|
||||||
|
cBar.IsBullish() &&
|
||||||
|
cBar.low > chcheMinBullish &&
|
||||||
|
chcheConditions.isBullishPowerUp &&
|
||||||
|
chcheConditions.isCStrongBearish &&
|
||||||
|
(chmConditions.hasBullishPower ||
|
||||||
|
chhkConditions.hasBullishPower ||
|
||||||
|
chstrConditions.hasBullishPower)
|
||||||
|
//
|
||||||
|
;
|
||||||
|
|
||||||
|
//
|
||||||
|
if (chcheHasLong)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
hasLong = chcheHasLong;
|
||||||
|
if (hasLong)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
pushers++;
|
||||||
|
Add(
|
||||||
|
"XCHCHE",
|
||||||
|
signallers //
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
sl = chcheMinBullish;
|
||||||
|
type = POSITION_TYPE_BUY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
if (chcheConditions.isBearishPowerUp)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
bool chcheHasShort =
|
||||||
|
//
|
||||||
|
hasBearishPower &&
|
||||||
|
cBar.IsBearish() &&
|
||||||
|
cBar.high < chcheMaxBearish &&
|
||||||
|
chcheConditions.isBearishPowerUp &&
|
||||||
|
chcheConditions.isCStrongBearish &&
|
||||||
|
(chmConditions.hasBearishPower ||
|
||||||
|
chhkConditions.hasBearishPower ||
|
||||||
|
chstrConditions.hasBearishPower)
|
||||||
|
//
|
||||||
|
;
|
||||||
|
|
||||||
|
//
|
||||||
|
if (chcheHasShort)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
hasShort = chcheHasShort;
|
||||||
|
if (hasShort)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
pushers++;
|
||||||
|
Add(
|
||||||
|
"XCHCHE",
|
||||||
|
signallers //
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
sl = chcheMaxBearish;
|
||||||
|
type = POSITION_TYPE_SELL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user