last ...
This commit is contained in:
@@ -1736,6 +1736,265 @@ struct X121ProviderDescriptor
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Try to Normalize SL and TP ...
|
||||
|
||||
//
|
||||
// For Longs ...
|
||||
if (hasLong) {
|
||||
//
|
||||
// Collect all Verifications SLs ...
|
||||
|
||||
//
|
||||
double sls[];
|
||||
double tps[];
|
||||
|
||||
//
|
||||
// Current Market ...
|
||||
|
||||
//
|
||||
if (cLNSL > 0) {
|
||||
//
|
||||
Add(
|
||||
cLNSL,
|
||||
sls //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
if (cLNTP > 0) {
|
||||
//
|
||||
Add(
|
||||
cLNTP,
|
||||
tps //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// Short Market ...
|
||||
|
||||
//
|
||||
if (sLNSL > 0) {
|
||||
//
|
||||
Add(
|
||||
sLNSL,
|
||||
sls //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
if (sLNTP > 0) {
|
||||
//
|
||||
Add(
|
||||
sLNTP,
|
||||
tps //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// Medium Market ...
|
||||
|
||||
//
|
||||
if (mLNSL > 0) {
|
||||
//
|
||||
Add(
|
||||
mLNSL,
|
||||
sls //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
if (mLNTP > 0) {
|
||||
//
|
||||
Add(
|
||||
mLNTP,
|
||||
tps //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// Long Market ...
|
||||
|
||||
//
|
||||
if (lLNSL > 0) {
|
||||
//
|
||||
Add(
|
||||
lLNSL,
|
||||
sls //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
if (lLNTP > 0) {
|
||||
//
|
||||
Add(
|
||||
lLNTP,
|
||||
tps //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// Hind Market ...
|
||||
|
||||
//
|
||||
if (hLNSL > 0) {
|
||||
//
|
||||
Add(
|
||||
hLNSL,
|
||||
sls //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
if (hLNTP > 0) {
|
||||
//
|
||||
Add(
|
||||
hLNTP,
|
||||
tps //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// Now Select Minimum SL ...
|
||||
if (IsValidSize(ArraySize(sls))) {
|
||||
slPrice = GetMin(sls);
|
||||
}
|
||||
|
||||
//
|
||||
// Average TP ...
|
||||
if (IsValidSize(ArraySize(tps))) {
|
||||
tpPrice = GetAverage(tps);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// For Shorts ...
|
||||
if (hasShort) {
|
||||
//
|
||||
// Collect all Verifications SLs ...
|
||||
|
||||
//
|
||||
double sls[];
|
||||
double tps[];
|
||||
|
||||
//
|
||||
// Current Market ...
|
||||
|
||||
//
|
||||
if (cSHSL > 0) {
|
||||
//
|
||||
Add(
|
||||
cSHSL,
|
||||
sls //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
if (cSHTP > 0) {
|
||||
//
|
||||
Add(
|
||||
cSHTP,
|
||||
tps //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// Short Market ...
|
||||
|
||||
//
|
||||
if (sSHSL > 0) {
|
||||
//
|
||||
Add(
|
||||
sSHSL,
|
||||
sls //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
if (sSHTP > 0) {
|
||||
//
|
||||
Add(
|
||||
sSHTP,
|
||||
tps //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// Medium Market ...
|
||||
|
||||
//
|
||||
if (mSHSL > 0) {
|
||||
//
|
||||
Add(
|
||||
mSHSL,
|
||||
sls //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
if (mSHTP > 0) {
|
||||
//
|
||||
Add(
|
||||
mSHTP,
|
||||
tps //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// Long Market ...
|
||||
|
||||
//
|
||||
if (lSHSL > 0) {
|
||||
//
|
||||
Add(
|
||||
lSHSL,
|
||||
sls //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
if (lSHTP > 0) {
|
||||
//
|
||||
Add(
|
||||
lSHTP,
|
||||
tps //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// Hind Market ...
|
||||
|
||||
//
|
||||
if (hSHSL > 0) {
|
||||
//
|
||||
Add(
|
||||
hSHSL,
|
||||
sls //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
if (hSHTP > 0) {
|
||||
//
|
||||
Add(
|
||||
hSHTP,
|
||||
tps //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// Now Select Minimum SL ...
|
||||
if (IsValidSize(ArraySize(sls))) {
|
||||
slPrice = GetMin(sls);
|
||||
}
|
||||
|
||||
//
|
||||
// Average TP ...
|
||||
if (IsValidSize(ArraySize(tps))) {
|
||||
tpPrice = GetAverage(tps);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Generate Signal ...
|
||||
this.signal.Clean();
|
||||
|
||||
Reference in New Issue
Block a user