99 lines
2.3 KiB
Plaintext
99 lines
2.3 KiB
Plaintext
//
|
|
// Guard ...
|
|
//
|
|
// X92 ...
|
|
bool canCheckX92 = IsAllowdSignaller(X92);
|
|
if (canCheckX92)
|
|
{
|
|
//
|
|
// Check Signals Close Conditions ...
|
|
bool canX92Close =
|
|
//
|
|
mConditions.xichInfo.isTenkanSenCrossedUnderKijunSen ||
|
|
mConditions.xichInfo.isFutureKumoSwitchedToBearish
|
|
//
|
|
;
|
|
|
|
//
|
|
if (canX92Close)
|
|
{
|
|
//
|
|
XGuard guard;
|
|
|
|
//
|
|
guard.type = NULL;
|
|
guard.symbol = mSymbol;
|
|
guard.period = mPeriod;
|
|
guard.provider = ToString(X92);
|
|
guard.action = X_GUARD_ACTION_FORCE_CLOSE;
|
|
|
|
//
|
|
Add(
|
|
guard,
|
|
guards);
|
|
}
|
|
}
|
|
|
|
//
|
|
// Long ...
|
|
bool x92HasSignal = false;
|
|
bool canCheckX92 = IsAllowdSignaller(X92);
|
|
if (canCheckX92)
|
|
{
|
|
//
|
|
x92HasSignal =
|
|
//
|
|
mConditions.xichInfo.isFutureKumoBullish &&
|
|
//
|
|
(
|
|
//
|
|
mConditions.xichInfo.isTenkanSenCrossedOverKijunSen
|
|
// //
|
|
// ||
|
|
// //
|
|
// (
|
|
// //
|
|
// (mConditions.xichInfo.isTenkanSenOverKijunSen &&
|
|
// mConditions.xichInfo.kijunSen > MathMax(mConditions.xichInfo.senkouSpanA, mConditions.xichInfo.senkouSpanB))
|
|
// //
|
|
// &&
|
|
// //
|
|
// !(mConditions2.xichInfo.isTenkanSenOverKijunSen &&
|
|
// mConditions2.xichInfo.kijunSen > MathMax(mConditions2.xichInfo.senkouSpanA, mConditions2.xichInfo.senkouSpanB))
|
|
// //
|
|
// )
|
|
//
|
|
)
|
|
//
|
|
;
|
|
|
|
//
|
|
if (x92HasSignal)
|
|
{
|
|
//
|
|
Add(
|
|
ToString(X92),
|
|
mConditions.signal.providers);
|
|
|
|
//
|
|
double tpPoint = 30;
|
|
double tpPrice = PointToPrice(
|
|
mConditions.symbol,
|
|
tpPoint);
|
|
double tp = entry + tpPrice;
|
|
|
|
//
|
|
mConditions.signal.sl = 0;
|
|
mConditions.signal.tp = 0; // tp;
|
|
mConditions.signal.r2r = 1;
|
|
mConditions.signal.entry = entry;
|
|
mConditions.signal.riskAmount = 0.005;
|
|
mConditions.signal.mode = X_ORDER_MODE_MARKET;
|
|
|
|
//
|
|
mConditions.signal.ignoreSL = true;
|
|
mConditions.signal.ignoreTP = true;
|
|
mConditions.signal.useRiskAmountAsVolume = true;
|
|
}
|
|
}
|