last ...
This commit is contained in:
@@ -1616,8 +1616,6 @@ struct X121SignalGenerator
|
|||||||
//
|
//
|
||||||
// XPVF ...
|
// XPVF ...
|
||||||
bool long18 =
|
bool long18 =
|
||||||
//
|
|
||||||
false &&
|
|
||||||
//
|
//
|
||||||
// Starting Conditions ...
|
// Starting Conditions ...
|
||||||
conditions.pvConditions.isFiboIncreased &&
|
conditions.pvConditions.isFiboIncreased &&
|
||||||
@@ -1669,7 +1667,13 @@ struct X121SignalGenerator
|
|||||||
//
|
//
|
||||||
// Starting Conditions ...
|
// Starting Conditions ...
|
||||||
conditions.IsTrendBullish() &&
|
conditions.IsTrendBullish() &&
|
||||||
conditions.dmntConditions.isBullish
|
conditions.dmntConditions.isBullish &&
|
||||||
|
//
|
||||||
|
// Verifications ...
|
||||||
|
conditions.tdConditions.isBullish &&
|
||||||
|
conditions.adxtdConditions.isStrong &&
|
||||||
|
conditions.adxtdConditions.isBullish &&
|
||||||
|
conditions.vlmConditions.isVolumeBullish
|
||||||
//
|
//
|
||||||
;
|
;
|
||||||
if (long20)
|
if (long20)
|
||||||
@@ -2306,8 +2310,6 @@ struct X121SignalGenerator
|
|||||||
//
|
//
|
||||||
// XPVF ...
|
// XPVF ...
|
||||||
bool short18 =
|
bool short18 =
|
||||||
//
|
|
||||||
false &&
|
|
||||||
//
|
//
|
||||||
// Starting Conditions ...
|
// Starting Conditions ...
|
||||||
conditions.pvConditions.isFiboDecreased &&
|
conditions.pvConditions.isFiboDecreased &&
|
||||||
@@ -2359,7 +2361,13 @@ struct X121SignalGenerator
|
|||||||
//
|
//
|
||||||
// Starting Conditions ...
|
// Starting Conditions ...
|
||||||
conditions.IsTrendBearish() &&
|
conditions.IsTrendBearish() &&
|
||||||
conditions.dmntConditions.isBearish
|
conditions.dmntConditions.isBearish &&
|
||||||
|
//
|
||||||
|
// Verifications ...
|
||||||
|
conditions.tdConditions.isBearish &&
|
||||||
|
conditions.adxtdConditions.isStrong &&
|
||||||
|
conditions.adxtdConditions.isBearish &&
|
||||||
|
conditions.vlmConditions.isVolumeBearish
|
||||||
//
|
//
|
||||||
;
|
;
|
||||||
if (short20)
|
if (short20)
|
||||||
@@ -2989,7 +2997,7 @@ struct X121SignalGenerator
|
|||||||
|
|
||||||
//
|
//
|
||||||
// TODO Filter ...
|
// TODO Filter ...
|
||||||
result = true; // provider == ToString(PROVIDER_XVLM);
|
result = false; // provider == ToString(PROVIDER_XHTSRD);
|
||||||
|
|
||||||
//
|
//
|
||||||
return result;
|
return result;
|
||||||
@@ -3008,7 +3016,7 @@ struct X121SignalGenerator
|
|||||||
|
|
||||||
//
|
//
|
||||||
// TODO Filter ...
|
// TODO Filter ...
|
||||||
result = true; // provider == ToString(PROVIDER_XVLM);
|
result = false; // provider == ToString(PROVIDER_XHTSRD);
|
||||||
|
|
||||||
//
|
//
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -1379,6 +1379,18 @@ public:
|
|||||||
mAllowSupport = value;
|
mAllowSupport = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
bool SupportOnlyForces()
|
||||||
|
{
|
||||||
|
return mSupportOnlyForces;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
void SupportOnlyForces(bool value)
|
||||||
|
{
|
||||||
|
mSupportOnlyForces = value;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
double SupportDistance()
|
double SupportDistance()
|
||||||
{
|
{
|
||||||
@@ -1490,6 +1502,18 @@ public:
|
|||||||
mAllowGrid = value;
|
mAllowGrid = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
bool GridOnlyForces()
|
||||||
|
{
|
||||||
|
return mGridOnlyForces;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
void GridOnlyForces(bool value)
|
||||||
|
{
|
||||||
|
mGridOnlyForces = value;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
int MaxNumberOfGrids()
|
int MaxNumberOfGrids()
|
||||||
{
|
{
|
||||||
@@ -1602,6 +1626,18 @@ public:
|
|||||||
mAllowRecovery = value;
|
mAllowRecovery = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
bool RecoverOnlyForces()
|
||||||
|
{
|
||||||
|
return mRecoverOnlyForces;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
void RecoverOnlyForces(bool value)
|
||||||
|
{
|
||||||
|
mRecoverOnlyForces = value;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
int MaxNumberOfRecoveries()
|
int MaxNumberOfRecoveries()
|
||||||
{
|
{
|
||||||
@@ -2140,6 +2176,7 @@ protected:
|
|||||||
//
|
//
|
||||||
// Supporting ...
|
// Supporting ...
|
||||||
bool mAllowSupport; // Allow Support Signals
|
bool mAllowSupport; // Allow Support Signals
|
||||||
|
bool mSupportOnlyForces; // Support Only Force Signals
|
||||||
double mSupportDistance; // Supporting Distance
|
double mSupportDistance; // Supporting Distance
|
||||||
int mMaxNumberOfSupports; // Max Number of Support Signals
|
int mMaxNumberOfSupports; // Max Number of Support Signals
|
||||||
double mSupportVolumeMultiplier; // Support Signals Volume Multiplier
|
double mSupportVolumeMultiplier; // Support Signals Volume Multiplier
|
||||||
@@ -2148,6 +2185,7 @@ protected:
|
|||||||
//
|
//
|
||||||
// Grid ...
|
// Grid ...
|
||||||
bool mAllowGrid; // Allow Grid Signals
|
bool mAllowGrid; // Allow Grid Signals
|
||||||
|
bool mGridOnlyForces; // Grid Only Force Signals
|
||||||
int mMaxNumberOfGrids; // Max Number of Grid Signals
|
int mMaxNumberOfGrids; // Max Number of Grid Signals
|
||||||
double mGridDistance; // Grid Distance
|
double mGridDistance; // Grid Distance
|
||||||
double mGridVolumeMultiplier; // Grid Volume Multiplier
|
double mGridVolumeMultiplier; // Grid Volume Multiplier
|
||||||
@@ -2156,6 +2194,7 @@ protected:
|
|||||||
//
|
//
|
||||||
// Recovery ...
|
// Recovery ...
|
||||||
bool mAllowRecovery; // Allow Recovery Signals
|
bool mAllowRecovery; // Allow Recovery Signals
|
||||||
|
bool mRecoverOnlyForces; // Recover Only Force Signals
|
||||||
int mMaxNumberOfRecoveries; // Max Number of Recovery Signals
|
int mMaxNumberOfRecoveries; // Max Number of Recovery Signals
|
||||||
double mRecoveryDistance; // Recovery Distance
|
double mRecoveryDistance; // Recovery Distance
|
||||||
double mRecoveryVolumeMultiplier; // Recovery Volume Multiplier
|
double mRecoveryVolumeMultiplier; // Recovery Volume Multiplier
|
||||||
@@ -2720,6 +2759,7 @@ class XSCX121SetupEA : public XSCBaseEA
|
|||||||
public:
|
public:
|
||||||
//
|
//
|
||||||
// Props ...
|
// Props ...
|
||||||
|
X121SignalGenerator signalGenerator;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Constructors ...
|
// Constructors ...
|
||||||
@@ -3130,6 +3170,18 @@ public:
|
|||||||
mTradeHandler.AllowSupport(value);
|
mTradeHandler.AllowSupport(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
bool SupportOnlyForces()
|
||||||
|
{
|
||||||
|
return mTradeHandler.SupportOnlyForces();
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
void SupportOnlyForces(bool value)
|
||||||
|
{
|
||||||
|
mTradeHandler.SupportOnlyForces(value);
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
double SupportDistance()
|
double SupportDistance()
|
||||||
{
|
{
|
||||||
@@ -3193,6 +3245,18 @@ public:
|
|||||||
mTradeHandler.AllowGrid(value);
|
mTradeHandler.AllowGrid(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
bool GridOnlyForces()
|
||||||
|
{
|
||||||
|
return mTradeHandle.GridOnlyForces();
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
void GridOnlyForces(bool value)
|
||||||
|
{
|
||||||
|
mTradeHandle.GridOnlyForces(value);
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
int MaxNumberOfGrids()
|
int MaxNumberOfGrids()
|
||||||
{
|
{
|
||||||
@@ -3256,6 +3320,18 @@ public:
|
|||||||
mTradeHandler.AllowRecovery(value);
|
mTradeHandler.AllowRecovery(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
bool RecoverOnlyForces()
|
||||||
|
{
|
||||||
|
return mTradeHandler.RecoverOnlyForces();
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
void RecoverOnlyForces(bool value)
|
||||||
|
{
|
||||||
|
mTradeHandler.RecoverOnlyForces(value);
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
int MaxNumberOfRecoveries()
|
int MaxNumberOfRecoveries()
|
||||||
{
|
{
|
||||||
@@ -3460,9 +3536,6 @@ public:
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
string separator = "\n";
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Current ...
|
// Current ...
|
||||||
XSignal cSignal;
|
XSignal cSignal;
|
||||||
@@ -3677,260 +3750,171 @@ public:
|
|||||||
bool hasSignal = cHasSignal || sHasSignal || mHasSignal || lHasSignal || hHasSignal;
|
bool hasSignal = cHasSignal || sHasSignal || mHasSignal || lHasSignal || hHasSignal;
|
||||||
if (hasSignal)
|
if (hasSignal)
|
||||||
{
|
{
|
||||||
|
//
|
||||||
|
XSignal signal;
|
||||||
|
X121SetupConditions otherConditions[];
|
||||||
|
|
||||||
//
|
//
|
||||||
if (cHasSignal)
|
if (cHasSignal)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
Print("Current Market Has Signal ...");
|
signal = cSignal;
|
||||||
Print(ToString(mSetups[i].cCycle.cycle.period));
|
|
||||||
|
//
|
||||||
|
AddRef(
|
||||||
|
sConditions,
|
||||||
|
otherConditions //
|
||||||
|
);
|
||||||
|
AddRef(
|
||||||
|
mConditions,
|
||||||
|
otherConditions //
|
||||||
|
);
|
||||||
|
AddRef(
|
||||||
|
lConditions,
|
||||||
|
otherConditions //
|
||||||
|
);
|
||||||
|
AddRef(
|
||||||
|
hConditions,
|
||||||
|
otherConditions //
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
if (sHasSignal)
|
if (sHasSignal)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
Print("Short Market Has Signal ...");
|
signal = sSignal;
|
||||||
Print(ToString(mSetups[i].sCycle.cycle.period));
|
|
||||||
|
//
|
||||||
|
AddRef(
|
||||||
|
cConditions,
|
||||||
|
otherConditions //
|
||||||
|
);
|
||||||
|
AddRef(
|
||||||
|
mConditions,
|
||||||
|
otherConditions //
|
||||||
|
);
|
||||||
|
AddRef(
|
||||||
|
lConditions,
|
||||||
|
otherConditions //
|
||||||
|
);
|
||||||
|
AddRef(
|
||||||
|
hConditions,
|
||||||
|
otherConditions //
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
if (mHasSignal)
|
if (mHasSignal)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
Print("Medium Market Has Signal ...");
|
signal = mSignal;
|
||||||
Print(ToString(mSetups[i].mCycle.cycle.period));
|
|
||||||
|
//
|
||||||
|
AddRef(
|
||||||
|
cConditions,
|
||||||
|
otherConditions //
|
||||||
|
);
|
||||||
|
AddRef(
|
||||||
|
sConditions,
|
||||||
|
otherConditions //
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
if (lHasSignal)
|
if (lHasSignal)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
Print("Long Market Has Signal ...");
|
signal = lSignal;
|
||||||
Print(ToString(mSetups[i].lCycle.cycle.period));
|
|
||||||
|
//
|
||||||
|
AddRef(
|
||||||
|
cConditions,
|
||||||
|
otherConditions //
|
||||||
|
);
|
||||||
|
AddRef(
|
||||||
|
sConditions,
|
||||||
|
otherConditions //
|
||||||
|
);
|
||||||
|
AddRef(
|
||||||
|
mConditions,
|
||||||
|
otherConditions //
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
if (hHasSignal)
|
if (hHasSignal)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
Print("Hind Market Has Signal ...");
|
signal = hSignal;
|
||||||
Print(ToString(mSetups[i].hCycle.cycle.period));
|
|
||||||
|
//
|
||||||
|
AddRef(
|
||||||
|
cConditions,
|
||||||
|
otherConditions //
|
||||||
|
);
|
||||||
|
AddRef(
|
||||||
|
sConditions,
|
||||||
|
otherConditions //
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Handle Creating a new Signal Info ...
|
int pushers = cPusher + sPusher + mPusher + lPusher + hPusher;
|
||||||
// XSignal signal;
|
|
||||||
// X121SetupConditions otherConditions[];
|
|
||||||
// if (hHasSignal)
|
|
||||||
// {
|
|
||||||
// //
|
|
||||||
// signal = hSignal;
|
|
||||||
|
|
||||||
// //
|
//
|
||||||
// AddRef(
|
bool isLong = IsLong(signal.type);
|
||||||
// cConditions,
|
|
||||||
// otherConditions //
|
|
||||||
// );
|
|
||||||
// AddRef(
|
|
||||||
// sConditions,
|
|
||||||
// otherConditions //
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// else if (lHasSignal)
|
|
||||||
// {
|
|
||||||
// //
|
|
||||||
// signal = lSignal;
|
|
||||||
|
|
||||||
// //
|
//
|
||||||
// AddRef(
|
// Validate Signal ...
|
||||||
// cConditions,
|
bool isValid =
|
||||||
// otherConditions //
|
//
|
||||||
// );
|
// Handle Pusher Validations ...
|
||||||
// AddRef(
|
(mReuiredSignalVerifications <= 0
|
||||||
// sConditions,
|
? true
|
||||||
// otherConditions //
|
: pushers >= mReuiredSignalVerifications)
|
||||||
// );
|
//
|
||||||
// AddRef(
|
&&
|
||||||
// mConditions,
|
//
|
||||||
// otherConditions //
|
// Handle Other Conditions Validations ...
|
||||||
// );
|
(!mGetVerificationFromOtherTimeFrames
|
||||||
// }
|
? true
|
||||||
// else if (mHasSignal)
|
: isLong
|
||||||
// {
|
? signalGenerator.HasLongVerifications(otherConditions)
|
||||||
// //
|
: signalGenerator.HasShortVerifications(otherConditions))
|
||||||
// signal = mSignal;
|
//
|
||||||
|
;
|
||||||
|
|
||||||
// //
|
//
|
||||||
// AddRef(
|
bool forceState = ForceState();
|
||||||
// cConditions,
|
|
||||||
// otherConditions //
|
|
||||||
// );
|
|
||||||
// AddRef(
|
|
||||||
// sConditions,
|
|
||||||
// otherConditions //
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// else if (sHasSignal)
|
|
||||||
// {
|
|
||||||
// //
|
|
||||||
// signal = sSignal;
|
|
||||||
|
|
||||||
// //
|
//
|
||||||
// AddRef(
|
if (!forceState)
|
||||||
// cConditions,
|
{
|
||||||
// otherConditions //
|
//
|
||||||
// );
|
// Add Signal to Execution Result ...
|
||||||
// AddRef(
|
AddRef(
|
||||||
// mConditions,
|
signal,
|
||||||
// otherConditions //
|
signals //
|
||||||
// );
|
);
|
||||||
// AddRef(
|
|
||||||
// lConditions,
|
|
||||||
// otherConditions //
|
|
||||||
// );
|
|
||||||
// AddRef(
|
|
||||||
// hConditions,
|
|
||||||
// otherConditions //
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// else if (cHasSignal)
|
|
||||||
// {
|
|
||||||
// //
|
|
||||||
// signal = cSignal;
|
|
||||||
|
|
||||||
// //
|
//
|
||||||
// AddRef(
|
// Add new Signal Info ...
|
||||||
// sConditions,
|
mTradeHandler.Add(
|
||||||
// otherConditions //
|
signal,
|
||||||
// );
|
pushers,
|
||||||
// AddRef(
|
mVolumeOSC,
|
||||||
// mConditions,
|
mBullishSigns,
|
||||||
// otherConditions //
|
mBearishSigns,
|
||||||
// );
|
mBullishScore,
|
||||||
// AddRef(
|
mBearishScore,
|
||||||
// lConditions,
|
cConditions,
|
||||||
// otherConditions //
|
sConditions,
|
||||||
// );
|
mConditions,
|
||||||
// AddRef(
|
lConditions,
|
||||||
// hConditions,
|
hConditions //
|
||||||
// otherConditions //
|
);
|
||||||
// );
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
// //
|
|
||||||
// int pushers = cPusher + sPusher + mPusher + lPusher + hPusher;
|
|
||||||
|
|
||||||
// //
|
|
||||||
// bool isLong = IsLong(signal.type);
|
|
||||||
|
|
||||||
// //
|
|
||||||
// // Collecting Bullish/Bearish Signs ...
|
|
||||||
// if (isLong)
|
|
||||||
// {
|
|
||||||
// mBullishSigns += pushers;
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// mBearishSigns += pushers;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// //
|
|
||||||
// // Validate Signal ...
|
|
||||||
// bool isValid =
|
|
||||||
// //
|
|
||||||
// // Handle Pusher Validations ...
|
|
||||||
// (mReuiredSignalVerifications <= 0
|
|
||||||
// ? true
|
|
||||||
// : pushers >= mReuiredSignalVerifications)
|
|
||||||
// //
|
|
||||||
// &&
|
|
||||||
// //
|
|
||||||
// // Handle Other Conditions Validations ...
|
|
||||||
// (!mGetVerificationFromOtherTimeFrames
|
|
||||||
// ? true
|
|
||||||
// : isLong
|
|
||||||
// ? signalGenerator.HasLongVerifications(otherConditions)
|
|
||||||
// : signalGenerator.HasShortVerifications(otherConditions))
|
|
||||||
// //
|
|
||||||
// ;
|
|
||||||
|
|
||||||
// //
|
|
||||||
// bool forceState = ForceState();
|
|
||||||
|
|
||||||
// //
|
|
||||||
// if (!isValid || (forceState && isValid))
|
|
||||||
// {
|
|
||||||
// //
|
|
||||||
// // Clear Other Conditions ...
|
|
||||||
// Clean(otherConditions);
|
|
||||||
|
|
||||||
// //
|
|
||||||
// // Fill All Conditions to Other Conditions ...
|
|
||||||
// AddRef(
|
|
||||||
// cConditions,
|
|
||||||
// otherConditions //
|
|
||||||
// );
|
|
||||||
// AddRef(
|
|
||||||
// sConditions,
|
|
||||||
// otherConditions //
|
|
||||||
// );
|
|
||||||
// AddRef(
|
|
||||||
// mConditions,
|
|
||||||
// otherConditions //
|
|
||||||
// );
|
|
||||||
// AddRef(
|
|
||||||
// lConditions,
|
|
||||||
// otherConditions //
|
|
||||||
// );
|
|
||||||
// AddRef(
|
|
||||||
// hConditions,
|
|
||||||
// otherConditions //
|
|
||||||
// );
|
|
||||||
|
|
||||||
// //
|
|
||||||
// // If Recieved Any Unverified Signal
|
|
||||||
// // we Passed it to EQM Manager ...
|
|
||||||
// EQMHandleInvalidSignal(
|
|
||||||
// signal,
|
|
||||||
// pushers,
|
|
||||||
// mVolumeOSC,
|
|
||||||
// mBullishScore,
|
|
||||||
// mBullishSigns,
|
|
||||||
// mBearishScore,
|
|
||||||
// mBearishSigns,
|
|
||||||
// otherConditions,
|
|
||||||
// isValid //
|
|
||||||
// );
|
|
||||||
// continue;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// //
|
|
||||||
// if (!forceState)
|
|
||||||
// {
|
|
||||||
// //
|
|
||||||
// // Add Signal to Execution Result ...
|
|
||||||
// AddRef(
|
|
||||||
// signal,
|
|
||||||
// signals //
|
|
||||||
// );
|
|
||||||
|
|
||||||
// //
|
|
||||||
// // Add new Signal Info ...
|
|
||||||
// mTradeHandler.Add(
|
|
||||||
// signal,
|
|
||||||
// pushers,
|
|
||||||
// mVolumeOSC,
|
|
||||||
// mBullishSigns,
|
|
||||||
// mBearishSigns,
|
|
||||||
// mBullishScore,
|
|
||||||
// mBearishScore,
|
|
||||||
// cConditions,
|
|
||||||
// sConditions,
|
|
||||||
// mConditions,
|
|
||||||
// lConditions,
|
|
||||||
// hConditions //
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4718,243 +4702,243 @@ private:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
// //
|
||||||
double profits = SpecifiedCalculatePositionsProfit(positions);
|
// double profits = SpecifiedCalculatePositionsProfit(positions);
|
||||||
|
|
||||||
//
|
// //
|
||||||
// Checking Force Sate Conditions ...
|
// // Checking Force Sate Conditions ...
|
||||||
if (ForceState())
|
// if (ForceState())
|
||||||
{
|
// {
|
||||||
//
|
// //
|
||||||
// Check Force State Hedging ...
|
// // Check Force State Hedging ...
|
||||||
bool isHedged = DoEQMForceClose();
|
// bool isHedged = DoEQMForceClose();
|
||||||
if (isHedged)
|
// if (isHedged)
|
||||||
{
|
// {
|
||||||
//
|
// //
|
||||||
ForceState(false);
|
// ForceState(false);
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
//
|
// //
|
||||||
// Handle Act Based On Drawdow ...
|
// // Handle Act Based On Drawdow ...
|
||||||
if (mMaxDrawdownForce > 0)
|
// if (mMaxDrawdownForce > 0)
|
||||||
{
|
// {
|
||||||
//
|
// //
|
||||||
double drawdown = CalculateMaxDrawdown();
|
// double drawdown = CalculateMaxDrawdown();
|
||||||
if (drawdown > mMaxDrawdownForce)
|
// if (drawdown > mMaxDrawdownForce)
|
||||||
{
|
// {
|
||||||
//
|
// //
|
||||||
// Try to Hedge ...
|
// // Try to Hedge ...
|
||||||
if (profits > 0)
|
// if (profits > 0)
|
||||||
{
|
// {
|
||||||
//
|
// //
|
||||||
bool isHedged = DoEQMForceClose(profits);
|
// bool isHedged = DoEQMForceClose(profits);
|
||||||
if (isHedged)
|
// if (isHedged)
|
||||||
{
|
// {
|
||||||
//
|
// //
|
||||||
ForceState(false);
|
// ForceState(false);
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
//
|
// //
|
||||||
// Close Max In Drawdown Position ...
|
// // Close Max In Drawdown Position ...
|
||||||
int maxInDIDX = FindMaxDrawdownIndex(positions);
|
// int maxInDIDX = FindMaxDrawdownIndex(positions);
|
||||||
if (IsValidIndex(maxInDIDX))
|
// if (IsValidIndex(maxInDIDX))
|
||||||
{
|
// {
|
||||||
//
|
// //
|
||||||
string comment = XEQMSupportToken + " Max In D ...";
|
// string comment = XEQMSupportToken + " Max In D ...";
|
||||||
|
|
||||||
//
|
// //
|
||||||
bool isClosed = mTrader.Close(
|
// bool isClosed = mTrader.Close(
|
||||||
positions[maxInDIDX].ticket,
|
// positions[maxInDIDX].ticket,
|
||||||
comment //
|
// comment //
|
||||||
);
|
// );
|
||||||
if (isClosed)
|
// if (isClosed)
|
||||||
{
|
// {
|
||||||
//
|
// //
|
||||||
string message = XEQMSupportToken + " Close " + ToString(positions[maxInDIDX].ticket) + " Due Max In Drawdown ...";
|
// string message = XEQMSupportToken + " Close " + ToString(positions[maxInDIDX].ticket) + " Due Max In Drawdown ...";
|
||||||
|
|
||||||
//
|
// //
|
||||||
Alert(message);
|
// Alert(message);
|
||||||
}
|
// }
|
||||||
|
|
||||||
//
|
// //
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
//
|
// //
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
//
|
// //
|
||||||
// Handle Act Based on Positions Count ...
|
// // Handle Act Based on Positions Count ...
|
||||||
if (mMaxPositionsForce > 0 && positionsCount > mMaxPositionsForce)
|
// if (mMaxPositionsForce > 0 && positionsCount > mMaxPositionsForce)
|
||||||
{
|
// {
|
||||||
//
|
// //
|
||||||
double requiredProfit = SpecifiedCalculateRequiredProfitForHedge(
|
// double requiredProfit = SpecifiedCalculateRequiredProfitForHedge(
|
||||||
positions,
|
// positions,
|
||||||
MinRequiredProfitPerTrade(),
|
// MinRequiredProfitPerTrade(),
|
||||||
MinRequiredProfitPerVolumeFactor() //
|
// MinRequiredProfitPerVolumeFactor() //
|
||||||
);
|
// );
|
||||||
|
|
||||||
//
|
// //
|
||||||
double halfProfit = requiredProfit / 2;
|
// double halfProfit = requiredProfit / 2;
|
||||||
if (halfProfit > 0 && profits > halfProfit)
|
// if (halfProfit > 0 && profits > halfProfit)
|
||||||
{
|
// {
|
||||||
//
|
// //
|
||||||
bool isHedged = DoEQMForceClose(halfProfit);
|
// bool isHedged = DoEQMForceClose(halfProfit);
|
||||||
if (isHedged)
|
// if (isHedged)
|
||||||
{
|
// {
|
||||||
//
|
// //
|
||||||
ForceState(false);
|
// ForceState(false);
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
//
|
// //
|
||||||
// Close Min In Profit Position ...
|
// // Close Min In Profit Position ...
|
||||||
int minInPIDX = FindMinProfitIndex(positions);
|
// int minInPIDX = FindMinProfitIndex(positions);
|
||||||
if (IsValidIndex(minInPIDX))
|
// if (IsValidIndex(minInPIDX))
|
||||||
{
|
// {
|
||||||
//
|
// //
|
||||||
string comment = XEQMSupportToken + " Min In P ...";
|
// string comment = XEQMSupportToken + " Min In P ...";
|
||||||
|
|
||||||
//
|
// //
|
||||||
bool isClosed = mTrader.Close(
|
// bool isClosed = mTrader.Close(
|
||||||
positions[minInPIDX].ticket,
|
// positions[minInPIDX].ticket,
|
||||||
comment //
|
// comment //
|
||||||
);
|
// );
|
||||||
if (isClosed)
|
// if (isClosed)
|
||||||
{
|
// {
|
||||||
//
|
// //
|
||||||
string message = XEQMSupportToken + " Close " + ToString(positions[minInPIDX].ticket) + " Due Min In Profit ...";
|
// string message = XEQMSupportToken + " Close " + ToString(positions[minInPIDX].ticket) + " Due Min In Profit ...";
|
||||||
|
|
||||||
//
|
// //
|
||||||
Alert(message);
|
// Alert(message);
|
||||||
|
|
||||||
//
|
// //
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
//
|
// //
|
||||||
// Close Max In Drawdown Position ...
|
// // Close Max In Drawdown Position ...
|
||||||
int maxInDIDX = FindMaxDrawdownIndex(positions);
|
// int maxInDIDX = FindMaxDrawdownIndex(positions);
|
||||||
if (IsValidIndex(maxInDIDX))
|
// if (IsValidIndex(maxInDIDX))
|
||||||
{
|
// {
|
||||||
//
|
// //
|
||||||
string comment = XEQMSupportToken + " Max In D ...";
|
// string comment = XEQMSupportToken + " Max In D ...";
|
||||||
|
|
||||||
//
|
// //
|
||||||
bool isClosed = mTrader.Close(
|
// bool isClosed = mTrader.Close(
|
||||||
positions[maxInDIDX].ticket,
|
// positions[maxInDIDX].ticket,
|
||||||
comment //
|
// comment //
|
||||||
);
|
// );
|
||||||
if (isClosed)
|
// if (isClosed)
|
||||||
{
|
// {
|
||||||
//
|
// //
|
||||||
string message = XEQMSupportToken + "Close " + ToString(positions[maxInDIDX].ticket) + " Due Max In Drawdown ...";
|
// string message = XEQMSupportToken + "Close " + ToString(positions[maxInDIDX].ticket) + " Due Max In Drawdown ...";
|
||||||
|
|
||||||
//
|
// //
|
||||||
Alert(message);
|
// Alert(message);
|
||||||
}
|
// }
|
||||||
|
|
||||||
//
|
// //
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
//
|
// //
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
//
|
// //
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
//
|
// //
|
||||||
int longs = 0;
|
// int longs = 0;
|
||||||
double longVolumes = 0;
|
// double longVolumes = 0;
|
||||||
double longProfits = 0;
|
// double longProfits = 0;
|
||||||
|
|
||||||
//
|
// //
|
||||||
int shorts = 0;
|
// int shorts = 0;
|
||||||
double shortVolumes = 0;
|
// double shortVolumes = 0;
|
||||||
double shortProfits = 0;
|
// double shortProfits = 0;
|
||||||
|
|
||||||
//
|
// //
|
||||||
// Retrieve Required Informations of Positions ...
|
// // Retrieve Required Informations of Positions ...
|
||||||
CountPositions(
|
// CountPositions(
|
||||||
positions,
|
// positions,
|
||||||
longs,
|
// longs,
|
||||||
longProfits,
|
// longProfits,
|
||||||
longVolumes,
|
// longVolumes,
|
||||||
shorts,
|
// shorts,
|
||||||
shortProfits,
|
// shortProfits,
|
||||||
shortVolumes //
|
// shortVolumes //
|
||||||
);
|
// );
|
||||||
|
|
||||||
//
|
// //
|
||||||
// Retrieve Youngest Age ...
|
// // Retrieve Youngest Age ...
|
||||||
XPosition youngest;
|
// XPosition youngest;
|
||||||
int youngestAge = GetYoungest(
|
// int youngestAge = GetYoungest(
|
||||||
youngest,
|
// youngest,
|
||||||
positions //
|
// positions //
|
||||||
);
|
// );
|
||||||
|
|
||||||
//
|
// //
|
||||||
// Now Comparing items for enabling force State ...
|
// // Now Comparing items for enabling force State ...
|
||||||
bool isForceState =
|
// bool isForceState =
|
||||||
//
|
// //
|
||||||
youngestAge >= 20 &&
|
// youngestAge >= 20 &&
|
||||||
//
|
// //
|
||||||
(longProfits + shortProfits < 0)
|
// (longProfits + shortProfits < 0)
|
||||||
//
|
// //
|
||||||
;
|
// ;
|
||||||
if (isForceState)
|
// if (isForceState)
|
||||||
{
|
// {
|
||||||
//
|
// //
|
||||||
ForceState(true);
|
// ForceState(true);
|
||||||
|
|
||||||
//
|
// //
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
//
|
// //
|
||||||
XPosition supports[];
|
// XPosition supports[];
|
||||||
int supportsCount = ExtractSupports(
|
// int supportsCount = ExtractSupports(
|
||||||
positions,
|
// positions,
|
||||||
supports //
|
// supports //
|
||||||
);
|
// );
|
||||||
if (!IsValidSize(supportsCount))
|
// if (!IsValidSize(supportsCount))
|
||||||
{
|
// {
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
//
|
// //
|
||||||
int maxSupports = mTradeHandler.EnableSupport()
|
// int maxSupports = mTradeHandler.EnableSupport()
|
||||||
? MaxNumberOfSupports()
|
// ? MaxNumberOfSupports()
|
||||||
: 0;
|
// : 0;
|
||||||
int maxGrids = mTradeHandler.EnableGrid()
|
// int maxGrids = mTradeHandler.EnableGrid()
|
||||||
? MaxNumberOfGrids()
|
// ? MaxNumberOfGrids()
|
||||||
: 0;
|
// : 0;
|
||||||
int maxRecoveries = mTradeHandler.EnableRecovery()
|
// int maxRecoveries = mTradeHandler.EnableRecovery()
|
||||||
? MaxNumberOfRecoveries()
|
// ? MaxNumberOfRecoveries()
|
||||||
: 0;
|
// : 0;
|
||||||
|
|
||||||
//
|
// //
|
||||||
// Supporting Force States ...
|
// // Supporting Force States ...
|
||||||
bool isProtectionForce =
|
// bool isProtectionForce =
|
||||||
supportsCount >= 1;
|
// supportsCount >= 1;
|
||||||
if (isProtectionForce)
|
// if (isProtectionForce)
|
||||||
{
|
// {
|
||||||
//
|
// //
|
||||||
ForceState(true);
|
// ForceState(true);
|
||||||
|
|
||||||
//
|
// //
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3386,3 +3386,222 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Handle Creating a new Signal Info ...
|
||||||
|
// XSignal signal;
|
||||||
|
// X121SetupConditions otherConditions[];
|
||||||
|
// if (hHasSignal)
|
||||||
|
// {
|
||||||
|
// //
|
||||||
|
// signal = hSignal;
|
||||||
|
|
||||||
|
// //
|
||||||
|
// AddRef(
|
||||||
|
// cConditions,
|
||||||
|
// otherConditions //
|
||||||
|
// );
|
||||||
|
// AddRef(
|
||||||
|
// sConditions,
|
||||||
|
// otherConditions //
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
// else if (lHasSignal)
|
||||||
|
// {
|
||||||
|
// //
|
||||||
|
// signal = lSignal;
|
||||||
|
|
||||||
|
// //
|
||||||
|
// AddRef(
|
||||||
|
// cConditions,
|
||||||
|
// otherConditions //
|
||||||
|
// );
|
||||||
|
// AddRef(
|
||||||
|
// sConditions,
|
||||||
|
// otherConditions //
|
||||||
|
// );
|
||||||
|
// AddRef(
|
||||||
|
// mConditions,
|
||||||
|
// otherConditions //
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
// else if (mHasSignal)
|
||||||
|
// {
|
||||||
|
// //
|
||||||
|
// signal = mSignal;
|
||||||
|
|
||||||
|
// //
|
||||||
|
// AddRef(
|
||||||
|
// cConditions,
|
||||||
|
// otherConditions //
|
||||||
|
// );
|
||||||
|
// AddRef(
|
||||||
|
// sConditions,
|
||||||
|
// otherConditions //
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
// else if (sHasSignal)
|
||||||
|
// {
|
||||||
|
// //
|
||||||
|
// signal = sSignal;
|
||||||
|
|
||||||
|
// //
|
||||||
|
// AddRef(
|
||||||
|
// cConditions,
|
||||||
|
// otherConditions //
|
||||||
|
// );
|
||||||
|
// AddRef(
|
||||||
|
// mConditions,
|
||||||
|
// otherConditions //
|
||||||
|
// );
|
||||||
|
// AddRef(
|
||||||
|
// lConditions,
|
||||||
|
// otherConditions //
|
||||||
|
// );
|
||||||
|
// AddRef(
|
||||||
|
// hConditions,
|
||||||
|
// otherConditions //
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
// else if (cHasSignal)
|
||||||
|
// {
|
||||||
|
// //
|
||||||
|
// signal = cSignal;
|
||||||
|
|
||||||
|
// //
|
||||||
|
// AddRef(
|
||||||
|
// sConditions,
|
||||||
|
// otherConditions //
|
||||||
|
// );
|
||||||
|
// AddRef(
|
||||||
|
// mConditions,
|
||||||
|
// otherConditions //
|
||||||
|
// );
|
||||||
|
// AddRef(
|
||||||
|
// lConditions,
|
||||||
|
// otherConditions //
|
||||||
|
// );
|
||||||
|
// AddRef(
|
||||||
|
// hConditions,
|
||||||
|
// otherConditions //
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //
|
||||||
|
// int pushers = cPusher + sPusher + mPusher + lPusher + hPusher;
|
||||||
|
|
||||||
|
// //
|
||||||
|
// bool isLong = IsLong(signal.type);
|
||||||
|
|
||||||
|
// //
|
||||||
|
// // Collecting Bullish/Bearish Signs ...
|
||||||
|
// if (isLong)
|
||||||
|
// {
|
||||||
|
// mBullishSigns += pushers;
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// mBearishSigns += pushers;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //
|
||||||
|
// // Validate Signal ...
|
||||||
|
// bool isValid =
|
||||||
|
// //
|
||||||
|
// // Handle Pusher Validations ...
|
||||||
|
// (mReuiredSignalVerifications <= 0
|
||||||
|
// ? true
|
||||||
|
// : pushers >= mReuiredSignalVerifications)
|
||||||
|
// //
|
||||||
|
// &&
|
||||||
|
// //
|
||||||
|
// // Handle Other Conditions Validations ...
|
||||||
|
// (!mGetVerificationFromOtherTimeFrames
|
||||||
|
// ? true
|
||||||
|
// : isLong
|
||||||
|
// ? signalGenerator.HasLongVerifications(otherConditions)
|
||||||
|
// : signalGenerator.HasShortVerifications(otherConditions))
|
||||||
|
// //
|
||||||
|
// ;
|
||||||
|
|
||||||
|
// //
|
||||||
|
// bool forceState = ForceState();
|
||||||
|
|
||||||
|
// //
|
||||||
|
// if (!isValid || (forceState && isValid))
|
||||||
|
// {
|
||||||
|
// //
|
||||||
|
// // Clear Other Conditions ...
|
||||||
|
// Clean(otherConditions);
|
||||||
|
|
||||||
|
// //
|
||||||
|
// // Fill All Conditions to Other Conditions ...
|
||||||
|
// AddRef(
|
||||||
|
// cConditions,
|
||||||
|
// otherConditions //
|
||||||
|
// );
|
||||||
|
// AddRef(
|
||||||
|
// sConditions,
|
||||||
|
// otherConditions //
|
||||||
|
// );
|
||||||
|
// AddRef(
|
||||||
|
// mConditions,
|
||||||
|
// otherConditions //
|
||||||
|
// );
|
||||||
|
// AddRef(
|
||||||
|
// lConditions,
|
||||||
|
// otherConditions //
|
||||||
|
// );
|
||||||
|
// AddRef(
|
||||||
|
// hConditions,
|
||||||
|
// otherConditions //
|
||||||
|
// );
|
||||||
|
|
||||||
|
// //
|
||||||
|
// // If Recieved Any Unverified Signal
|
||||||
|
// // we Passed it to EQM Manager ...
|
||||||
|
// EQMHandleInvalidSignal(
|
||||||
|
// signal,
|
||||||
|
// pushers,
|
||||||
|
// mVolumeOSC,
|
||||||
|
// mBullishScore,
|
||||||
|
// mBullishSigns,
|
||||||
|
// mBearishScore,
|
||||||
|
// mBearishSigns,
|
||||||
|
// otherConditions,
|
||||||
|
// isValid //
|
||||||
|
// );
|
||||||
|
// continue;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //
|
||||||
|
// if (!forceState)
|
||||||
|
// {
|
||||||
|
// //
|
||||||
|
// // Add Signal to Execution Result ...
|
||||||
|
// AddRef(
|
||||||
|
// signal,
|
||||||
|
// signals //
|
||||||
|
// );
|
||||||
|
|
||||||
|
// //
|
||||||
|
// // Add new Signal Info ...
|
||||||
|
// mTradeHandler.Add(
|
||||||
|
// signal,
|
||||||
|
// pushers,
|
||||||
|
// mVolumeOSC,
|
||||||
|
// mBullishSigns,
|
||||||
|
// mBearishSigns,
|
||||||
|
// mBullishScore,
|
||||||
|
// mBearishScore,
|
||||||
|
// cConditions,
|
||||||
|
// sConditions,
|
||||||
|
// mConditions,
|
||||||
|
// lConditions,
|
||||||
|
// hConditions //
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
|||||||
@@ -42,14 +42,14 @@ input group "Signals";
|
|||||||
//,USDCHFb,EURCHFb,USDJPYb,EURJPYb,GBPUSDb
|
//,USDCHFb,EURCHFb,USDJPYb,EURJPYb,GBPUSDb
|
||||||
// EURUSDb,USDCHFb,EURCHFb,USDJPYb,EURJPYb,GBPUSDb
|
// EURUSDb,USDCHFb,EURCHFb,USDJPYb,EURJPYb,GBPUSDb
|
||||||
// EURUSDb,USDCHFb,EURCHFb,USDJPYb,EURJPYb,GBPUSDb,XAUUSDb,NZDUSDb,AUDUSDb,USDCADb,BTCUSD,ETHUSD
|
// EURUSDb,USDCHFb,EURCHFb,USDJPYb,EURJPYb,GBPUSDb,XAUUSDb,NZDUSDb,AUDUSDb,USDCADb,BTCUSD,ETHUSD
|
||||||
input string x121EASymbols = "EURUSDb"; // Symbols
|
input string x121EASymbols = "EURUSDb"; // Symbols
|
||||||
input bool x121EAUseAllSymbols = false; // Use All Available Symbols
|
input bool x121EAUseAllSymbols = false; // Use All Available Symbols
|
||||||
input bool x121EAUseAllWatchListSymbols = false; // Use All WatchList Symbols
|
input bool x121EAUseAllWatchListSymbols = false; // Use All WatchList Symbols
|
||||||
input bool x121EAAllowLong = true; // Allow Long Trades
|
input bool x121EAAllowLong = true; // Allow Long Trades
|
||||||
input bool x121EAAllowShort = true; // Allow Short Trades
|
input bool x121EAAllowShort = true; // Allow Short Trades
|
||||||
input int x121EADelayBetweenTwoSignal = 5; // Delay Between two Same Signals
|
input int x121EADelayBetweenTwoSignal = 5; // Delay Between two Same Signals
|
||||||
input int x121EAReuiredSignalVerifications = 1; // Required Verifications for Signals
|
input int x121EAReuiredSignalVerifications = 4; // Required Verifications for Signals
|
||||||
input bool x121EAGetVerificationFromOtherTimeFrames = false; // Get Verifications from Other Time Frames
|
input bool x121EAGetVerificationFromOtherTimeFrames = true; // Get Verifications from Other Time Frames
|
||||||
|
|
||||||
//
|
//
|
||||||
// Risk Management ...
|
// Risk Management ...
|
||||||
@@ -80,6 +80,7 @@ input double x121EANextTrailPoint = 25; // Next Trailling Step
|
|||||||
//
|
//
|
||||||
input group "Supporting";
|
input group "Supporting";
|
||||||
input bool x121EAAllowSupport = false; // Allow Support Signals
|
input bool x121EAAllowSupport = false; // Allow Support Signals
|
||||||
|
input bool x121EASupportOnlyForces = false; // Support Only Force Signals
|
||||||
double x121EASupportDistance = 50; // Supporting Distance
|
double x121EASupportDistance = 50; // Supporting Distance
|
||||||
input int x121EAMaxNumberOfSupports = 1; // Max Number of Support Signals
|
input int x121EAMaxNumberOfSupports = 1; // Max Number of Support Signals
|
||||||
input double x121EASupportVolumeMultiplier = 2.0; // Support Signals Volume Multiplier
|
input double x121EASupportVolumeMultiplier = 2.0; // Support Signals Volume Multiplier
|
||||||
@@ -88,6 +89,7 @@ input double x121EAMaxAllowedSupportVolume = 0.04; // Max Allowed Support Signal
|
|||||||
//
|
//
|
||||||
input group "Grid";
|
input group "Grid";
|
||||||
input bool x121EAAllowGrid = false; // Allow Grid Signals
|
input bool x121EAAllowGrid = false; // Allow Grid Signals
|
||||||
|
input bool x121EAGridOnlyForces = false; // Grid Only Force Signals
|
||||||
input int x121EAMaxNumberOfGrids = 5; // Max Number of Grid Signals
|
input int x121EAMaxNumberOfGrids = 5; // Max Number of Grid Signals
|
||||||
input double x121EAGridDistance = 100; // Grid Distance
|
input double x121EAGridDistance = 100; // Grid Distance
|
||||||
input double x121EAGridVolumeMultiplier = 2.0; // Grid Volume Multiplier
|
input double x121EAGridVolumeMultiplier = 2.0; // Grid Volume Multiplier
|
||||||
@@ -96,6 +98,7 @@ input double x121EAMaxAllowedGridVolume = 0.04; // Max Allowed Grid Signals Volu
|
|||||||
//
|
//
|
||||||
input group "Recovery";
|
input group "Recovery";
|
||||||
input bool x121EAAllowRecovery = false; // Allow Recovery Signals
|
input bool x121EAAllowRecovery = false; // Allow Recovery Signals
|
||||||
|
input bool x121EARecoverOnlyForces = false; // Recover Only Force Signals
|
||||||
input int x121EAMaxNumberOfRecoveries = 2; // Max Number of Recovery Signals
|
input int x121EAMaxNumberOfRecoveries = 2; // Max Number of Recovery Signals
|
||||||
input double x121EARecoveryDistance = 100; // Recovery Distance
|
input double x121EARecoveryDistance = 100; // Recovery Distance
|
||||||
input double x121EARecoveryVolumeMultiplier = 2; // Recovery Volume Multiplier
|
input double x121EARecoveryVolumeMultiplier = 2; // Recovery Volume Multiplier
|
||||||
@@ -302,6 +305,7 @@ bool InitialEA()
|
|||||||
//
|
//
|
||||||
// Supporting ...
|
// Supporting ...
|
||||||
x121EA.AllowSupport(x121EAAllowSupport);
|
x121EA.AllowSupport(x121EAAllowSupport);
|
||||||
|
x121EA.SupportOnlyForces(x121EASupportOnlyForces);
|
||||||
x121EA.SupportDistance(x121EASupportDistance);
|
x121EA.SupportDistance(x121EASupportDistance);
|
||||||
x121EA.MaxNumberOfSupports(x121EAMaxNumberOfSupports);
|
x121EA.MaxNumberOfSupports(x121EAMaxNumberOfSupports);
|
||||||
x121EA.SupportVolumeMultiplier(x121EASupportVolumeMultiplier);
|
x121EA.SupportVolumeMultiplier(x121EASupportVolumeMultiplier);
|
||||||
@@ -310,6 +314,7 @@ bool InitialEA()
|
|||||||
//
|
//
|
||||||
// Grid ...
|
// Grid ...
|
||||||
x121EA.AllowGrid(x121EAAllowGrid);
|
x121EA.AllowGrid(x121EAAllowGrid);
|
||||||
|
x121EA.GridOnlyForces(x121EAGridOnlyForces);
|
||||||
x121EA.GridDistance(x121EAGridDistance);
|
x121EA.GridDistance(x121EAGridDistance);
|
||||||
x121EA.MaxNumberOfGrids(x121EAMaxNumberOfGrids);
|
x121EA.MaxNumberOfGrids(x121EAMaxNumberOfGrids);
|
||||||
x121EA.GridVolumeMultiplier(x121EAGridVolumeMultiplier);
|
x121EA.GridVolumeMultiplier(x121EAGridVolumeMultiplier);
|
||||||
@@ -318,6 +323,7 @@ bool InitialEA()
|
|||||||
//
|
//
|
||||||
// Recovery ...
|
// Recovery ...
|
||||||
x121EA.AllowRecovery(x121EAAllowRecovery);
|
x121EA.AllowRecovery(x121EAAllowRecovery);
|
||||||
|
x121EA.RecoverOnlyForces(x121EARecoverOnlyForces);
|
||||||
x121EA.RecoveryDistance(x121EARecoveryDistance);
|
x121EA.RecoveryDistance(x121EARecoveryDistance);
|
||||||
x121EA.MaxNumberOfRecoveries(x121EAMaxNumberOfRecoveries);
|
x121EA.MaxNumberOfRecoveries(x121EAMaxNumberOfRecoveries);
|
||||||
x121EA.RecoveryVolumeMultiplier(x121EARecoveryVolumeMultiplier);
|
x121EA.RecoveryVolumeMultiplier(x121EARecoveryVolumeMultiplier);
|
||||||
@@ -386,24 +392,24 @@ void X121PreConfigureStyles(X121SetupInputs &inputs)
|
|||||||
{
|
{
|
||||||
//
|
//
|
||||||
// XHTD ...
|
// XHTD ...
|
||||||
inputs.htdInputs.show = true;
|
inputs.htdInputs.show = false;
|
||||||
|
|
||||||
//
|
//
|
||||||
// XATSL ...
|
// XATSL ...
|
||||||
inputs.atslInputs.show = true;
|
inputs.atslInputs.show = false;
|
||||||
|
|
||||||
//
|
//
|
||||||
// XSLN ...
|
// XSLN ...
|
||||||
inputs.slnInputs.show = true;
|
inputs.slnInputs.show = false;
|
||||||
|
|
||||||
//
|
//
|
||||||
// XDMNT ...
|
// XDMNT ...
|
||||||
inputs.dmntInputs.showBull = true;
|
inputs.dmntInputs.showBull = false;
|
||||||
inputs.dmntInputs.showBear = true;
|
inputs.dmntInputs.showBear = false;
|
||||||
|
|
||||||
//
|
//
|
||||||
// XSTR ...
|
// XSTR ...
|
||||||
inputs.strInputs.showTrends = true;
|
inputs.strInputs.showTrends = false;
|
||||||
inputs.strInputs.fillTrends = false;
|
inputs.strInputs.fillTrends = false;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ input bool show = true; // Show
|
|||||||
#property indicator_chart_window
|
#property indicator_chart_window
|
||||||
|
|
||||||
//
|
//
|
||||||
#property indicator_buffers 2
|
#property indicator_buffers 3
|
||||||
#property indicator_plots 2
|
#property indicator_plots 2
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user