last ...
This commit is contained in:
@@ -3070,3 +3070,319 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//
|
||||
cPusher = 0;
|
||||
sPusher = 0;
|
||||
mPusher = 0;
|
||||
lPusher = 0;
|
||||
hPusher = 0;
|
||||
|
||||
//
|
||||
cProvider = NULL;
|
||||
sProvider = NULL;
|
||||
mProvider = NULL;
|
||||
lProvider = NULL;
|
||||
hProvider = NULL;
|
||||
|
||||
//
|
||||
cSignal.Clean();
|
||||
sSignal.Clean();
|
||||
mSignal.Clean();
|
||||
lSignal.Clean();
|
||||
hSignal.Clean();
|
||||
|
||||
//
|
||||
cHasSignal = false;
|
||||
sHasSignal = false;
|
||||
mHasSignal = false;
|
||||
lHasSignal = false;
|
||||
hHasSignal = false;
|
||||
|
||||
//
|
||||
cConditions.Clean();
|
||||
sConditions.Clean();
|
||||
mConditions.Clean();
|
||||
lConditions.Clean();
|
||||
hConditions.Clean();
|
||||
|
||||
//
|
||||
datetime cTime = TimeCurrent();
|
||||
|
||||
//
|
||||
// Current ...
|
||||
bool canProcess = mSetups[i]
|
||||
.CanProcessBar(
|
||||
X_MARKET_CYCLE_UNKNOWN //
|
||||
);
|
||||
//
|
||||
datetime next = mSetups[i].GetNextSignalTime(X_MARKET_CYCLE_UNKNOWN);
|
||||
if (IsValid(next))
|
||||
{
|
||||
canProcess = canProcess && cTime >= next;
|
||||
}
|
||||
|
||||
//
|
||||
if (canProcess)
|
||||
{
|
||||
//
|
||||
bool iHasConditions = mSetups[i].GetConditions(
|
||||
cConditions,
|
||||
X_MARKET_CYCLE_UNKNOWN, // Current Market ...
|
||||
0, // Bar Index ...
|
||||
5 // Loop Back ...
|
||||
);
|
||||
|
||||
//
|
||||
if (iHasConditions)
|
||||
{
|
||||
//
|
||||
// Parse Conditions for Signal ...
|
||||
cHasSignal = signalGenerator.HasSignal(
|
||||
cConditions,
|
||||
cSignal,
|
||||
cPusher,
|
||||
cProvider,
|
||||
AllowSupport(),
|
||||
mAllowLong,
|
||||
mAllowShort,
|
||||
mVolume,
|
||||
mSLPoint,
|
||||
mIgnoreSL,
|
||||
mTPPoint,
|
||||
mIgnoreTP //
|
||||
);
|
||||
|
||||
//
|
||||
if (cHasSignal)
|
||||
{
|
||||
//
|
||||
mSetups[i].WaitsUntilNextBar(
|
||||
X_MARKET_CYCLE_UNKNOWN //
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Short ...
|
||||
canProcess = mSetups[i]
|
||||
.CanProcessBar(
|
||||
X_MARKET_CYCLE_SHORT //
|
||||
);
|
||||
//
|
||||
next = mSetups[i].GetNextSignalTime(X_MARKET_CYCLE_SHORT);
|
||||
if (IsValid(next))
|
||||
{
|
||||
sHasSignal = canProcess && cTime >= next;
|
||||
}
|
||||
|
||||
//
|
||||
if (canProcess)
|
||||
{
|
||||
//
|
||||
bool iHasConditions = mSetups[i].GetConditions(
|
||||
sConditions,
|
||||
X_MARKET_CYCLE_SHORT, // Current Market ...
|
||||
0, // Bar Index ...
|
||||
5 // Loop Back ...
|
||||
);
|
||||
|
||||
//
|
||||
if (iHasConditions)
|
||||
{
|
||||
//
|
||||
// Parse Conditions for Signal ...
|
||||
sHasSignal = signalGenerator.HasSignal(
|
||||
sConditions,
|
||||
sSignal,
|
||||
sPusher,
|
||||
sProvider,
|
||||
AllowSupport(),
|
||||
mAllowLong,
|
||||
mAllowShort,
|
||||
mVolume,
|
||||
mSLPoint,
|
||||
mIgnoreSL,
|
||||
mTPPoint,
|
||||
mIgnoreTP //
|
||||
);
|
||||
|
||||
//
|
||||
if (sHasSignal)
|
||||
{
|
||||
//
|
||||
mSetups[i].WaitsUntilNextBar(
|
||||
X_MARKET_CYCLE_SHORT //
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Medium ...
|
||||
canProcess = mSetups[i]
|
||||
.CanProcessBar(
|
||||
X_MARKET_CYCLE_MEDIUM //
|
||||
);
|
||||
//
|
||||
next = mSetups[i].GetNextSignalTime(X_MARKET_CYCLE_MEDIUM);
|
||||
if (IsValid(next))
|
||||
{
|
||||
mHasSignal = canProcess && cTime >= next;
|
||||
}
|
||||
|
||||
//
|
||||
if (canProcess)
|
||||
{
|
||||
//
|
||||
bool iHasConditions = mSetups[i].GetConditions(
|
||||
mConditions,
|
||||
X_MARKET_CYCLE_MEDIUM, // Current Market ...
|
||||
0, // Bar Index ...
|
||||
5 // Loop Back ...
|
||||
);
|
||||
|
||||
//
|
||||
if (iHasConditions)
|
||||
{
|
||||
//
|
||||
// Parse Conditions for Signal ...
|
||||
mHasSignal = signalGenerator.HasSignal(
|
||||
mConditions,
|
||||
mSignal,
|
||||
mPusher,
|
||||
mProvider,
|
||||
AllowSupport(),
|
||||
mAllowLong,
|
||||
mAllowShort,
|
||||
mVolume,
|
||||
mSLPoint,
|
||||
mIgnoreSL,
|
||||
mTPPoint,
|
||||
mIgnoreTP //
|
||||
);
|
||||
|
||||
//
|
||||
if (mHasSignal)
|
||||
{
|
||||
//
|
||||
mSetups[i].WaitsUntilNextBar(
|
||||
X_MARKET_CYCLE_MEDIUM //
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Long ...
|
||||
canProcess = mSetups[i]
|
||||
.CanProcessBar(
|
||||
X_MARKET_CYCLE_LONG //
|
||||
);
|
||||
//
|
||||
next = mSetups[i].GetNextSignalTime(X_MARKET_CYCLE_LONG);
|
||||
if (IsValid(next))
|
||||
{
|
||||
lHasSignal = canProcess && cTime >= next;
|
||||
}
|
||||
|
||||
//
|
||||
if (canProcess)
|
||||
{
|
||||
//
|
||||
bool iHasConditions = mSetups[i].GetConditions(
|
||||
lConditions,
|
||||
X_MARKET_CYCLE_LONG, // Current Market ...
|
||||
0, // Bar Index ...
|
||||
5 // Loop Back ...
|
||||
);
|
||||
|
||||
//
|
||||
if (iHasConditions)
|
||||
{
|
||||
//
|
||||
// Parse Conditions for Signal ...
|
||||
lHasSignal = signalGenerator.HasSignal(
|
||||
lConditions,
|
||||
lSignal,
|
||||
lPusher,
|
||||
lProvider,
|
||||
AllowSupport(),
|
||||
mAllowLong,
|
||||
mAllowShort,
|
||||
mVolume,
|
||||
mSLPoint,
|
||||
mIgnoreSL,
|
||||
mTPPoint,
|
||||
mIgnoreTP //
|
||||
);
|
||||
|
||||
//
|
||||
if (lHasSignal)
|
||||
{
|
||||
//
|
||||
mSetups[i].WaitsUntilNextBar(
|
||||
X_MARKET_CYCLE_LONG //
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Hind ...
|
||||
canProcess = mSetups[i]
|
||||
.CanProcessBar(
|
||||
X_MARKET_CYCLE_HIND //
|
||||
);
|
||||
//
|
||||
next = mSetups[i].GetNextSignalTime(X_MARKET_CYCLE_HIND);
|
||||
if (IsValid(next))
|
||||
{
|
||||
hHasSignal = canProcess && cTime >= next;
|
||||
}
|
||||
|
||||
//
|
||||
if (canProcess)
|
||||
{
|
||||
//
|
||||
bool iHasConditions = mSetups[i].GetConditions(
|
||||
hConditions,
|
||||
X_MARKET_CYCLE_HIND, // Current Market ...
|
||||
0, // Bar Index ...
|
||||
5 // Loop Back ...
|
||||
);
|
||||
|
||||
//
|
||||
if (iHasConditions)
|
||||
{
|
||||
//
|
||||
// Parse Conditions for Signal ...
|
||||
hHasSignal = signalGenerator.HasSignal(
|
||||
hConditions,
|
||||
hSignal,
|
||||
hPusher,
|
||||
hProvider,
|
||||
AllowSupport(),
|
||||
mAllowLong,
|
||||
mAllowShort,
|
||||
mVolume,
|
||||
mSLPoint,
|
||||
mIgnoreSL,
|
||||
mTPPoint,
|
||||
mIgnoreTP //
|
||||
);
|
||||
|
||||
//
|
||||
if (hHasSignal)
|
||||
{
|
||||
//
|
||||
mSetups[i].WaitsUntilNextBar(
|
||||
X_MARKET_CYCLE_HIND //
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user