add MQL5Test Workspace Content as BKP Solution ...
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
double entry = GetEntry(
|
||||
mSymbol,
|
||||
POSITION_TYPE_BUY);
|
||||
|
||||
//
|
||||
XOHCL c0 = GetCandle(
|
||||
mSymbol,
|
||||
mPeriod,
|
||||
0);
|
||||
double c0AppliedPrice = MathMin(c0.low, c0.open);
|
||||
//
|
||||
XOHCL c1 = GetCandle(
|
||||
mSymbol,
|
||||
mPeriod,
|
||||
1);
|
||||
|
||||
//
|
||||
X121MarketConditions mConditions = GetMarketConditions(1);
|
||||
|
||||
//
|
||||
bool signal1 =
|
||||
//
|
||||
mConditions.xtrndInfo.l1ll == mConditions.xtrndInfo.l2ll &&
|
||||
mConditions.xtrndInfo.l1ll == mConditions.xtrndInfo.l3ll &&
|
||||
mConditions.xtrndInfo.l1ll == mConditions.xpvInfo.vale &&
|
||||
//
|
||||
c0AppliedPrice == mConditions.xtrndInfo.l1ll
|
||||
// &&
|
||||
//
|
||||
// mConditions.xmrbInfo.isFastUnderSlow
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
if (signal1)
|
||||
{
|
||||
//
|
||||
Add(
|
||||
ToString(XPVF),
|
||||
mConditions.signal.providers);
|
||||
|
||||
//
|
||||
mConditions.signal.r2r = 1.5;
|
||||
mConditions.signal.riskAmount = 0.0001;
|
||||
mConditions.signal.mode = X_ORDER_MODE_STOP;
|
||||
mConditions.signal.entry = mConditions.xpvInfo.fl3;
|
||||
mConditions.signal.sl = mConditions.xtrndInfo.l1ll;
|
||||
mConditions.signal.tp = mConditions.xpvInfo.fl1;
|
||||
}
|
||||
|
||||
//
|
||||
result =
|
||||
//
|
||||
false
|
||||
// signal1
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
if (result)
|
||||
{
|
||||
//
|
||||
conditions = mConditions;
|
||||
|
||||
//
|
||||
conditions.signal.symbol = mSymbol;
|
||||
conditions.signal.period = mPeriod;
|
||||
conditions.signal.type = POSITION_TYPE_BUY;
|
||||
|
||||
//
|
||||
conditions.hasSignal = true;
|
||||
}
|
||||
|
||||
//
|
||||
return result;
|
||||
Reference in New Issue
Block a user