last ...
This commit is contained in:
@@ -457,7 +457,7 @@ public:
|
|||||||
// Make them Configurable ...
|
// Make them Configurable ...
|
||||||
int levelsOnClose = 6;
|
int levelsOnClose = 6;
|
||||||
int requiredAgeForTrail = 0;
|
int requiredAgeForTrail = 0;
|
||||||
int requiredDistanceForTrail = 5;
|
int requiredDistanceForTrail = 30;
|
||||||
|
|
||||||
//
|
//
|
||||||
int positionsCount = ArraySize(positions);
|
int positionsCount = ArraySize(positions);
|
||||||
@@ -531,8 +531,8 @@ public:
|
|||||||
//
|
//
|
||||||
double sl =
|
double sl =
|
||||||
IsLong(iPosition.type)
|
IsLong(iPosition.type)
|
||||||
? iPosition.sl + slDiff
|
? iPosition.sl + appliedSL
|
||||||
: iPosition.sl - slDiff;
|
: iPosition.sl - appliedSL;
|
||||||
|
|
||||||
//
|
//
|
||||||
// double sl =
|
// double sl =
|
||||||
@@ -717,12 +717,13 @@ public:
|
|||||||
|
|
||||||
//
|
//
|
||||||
double tpDiff = PointToPrice(priceDistance, iPosition.symbol);
|
double tpDiff = PointToPrice(priceDistance, iPosition.symbol);
|
||||||
|
double appliedTP = tpDiff / 2;
|
||||||
|
|
||||||
//
|
//
|
||||||
double tp =
|
double tp =
|
||||||
IsLong(iPosition.type)
|
IsLong(iPosition.type)
|
||||||
? iPosition.tp - tpDiff
|
? iPosition.tp - appliedTP
|
||||||
: iPosition.tp + tpDiff;
|
: iPosition.tp + appliedTP;
|
||||||
|
|
||||||
//
|
//
|
||||||
bool isInit = trail.Init(
|
bool isInit = trail.Init(
|
||||||
@@ -772,12 +773,13 @@ public:
|
|||||||
|
|
||||||
//
|
//
|
||||||
double tpDiff = PointToPrice(priceDistance, iPosition.symbol);
|
double tpDiff = PointToPrice(priceDistance, iPosition.symbol);
|
||||||
|
double appliedTP = tpDiff / 2;
|
||||||
|
|
||||||
//
|
//
|
||||||
double tp =
|
double tp =
|
||||||
isLong
|
isLong
|
||||||
? iPosition.tp - tpDiff
|
? iPosition.tp - appliedTP
|
||||||
: iPosition.tp + tpDiff;
|
: iPosition.tp + appliedTP;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Update Trail Values ...
|
// Update Trail Values ...
|
||||||
@@ -827,6 +829,10 @@ public:
|
|||||||
// for Volumes and Benefits ...
|
// for Volumes and Benefits ...
|
||||||
int HandleSignalManagement(XSignal &signals[]) override
|
int HandleSignalManagement(XSignal &signals[]) override
|
||||||
{
|
{
|
||||||
|
//
|
||||||
|
// TODO: Make this Configurable ...
|
||||||
|
int minDistanceBetweenTwoSameProviderSignal = 7;
|
||||||
|
|
||||||
//
|
//
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
|
||||||
@@ -910,7 +916,20 @@ public:
|
|||||||
else if (positionsCount < 2)
|
else if (positionsCount < 2)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// First Signal in a While of Specific Provider ...
|
// Next Signal in a While of Specific Provider ...
|
||||||
|
|
||||||
|
//
|
||||||
|
// Find Longest Position and Check it's Age ...
|
||||||
|
// Compare it by min age for same provider signals ...
|
||||||
|
XPosition youngest;
|
||||||
|
int youngestAge = GetYoungest(
|
||||||
|
youngest,
|
||||||
|
positions //
|
||||||
|
);
|
||||||
|
if (youngestAge == -1 || youngestAge < minDistanceBetweenTwoSameProviderSignal)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
AddRef(
|
AddRef(
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ bool InitialEA()
|
|||||||
Add(X110, signallers);
|
Add(X110, signallers);
|
||||||
Add(X121, signallers);
|
Add(X121, signallers);
|
||||||
Add(X128, signallers);
|
Add(X128, signallers);
|
||||||
Add(X92, signallers);
|
// Add(X92, signallers);
|
||||||
// GetAllX121SignalProviders(signallers);
|
// GetAllX121SignalProviders(signallers);
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -330,8 +330,8 @@ void ConfigureDescriptor(
|
|||||||
|
|
||||||
//
|
//
|
||||||
// XZG ...
|
// XZG ...
|
||||||
iDescriptor.inputs.zgInputs.showZigZag = false;
|
iDescriptor.inputs.zgInputs.showZigZag = true;
|
||||||
iDescriptor.inputs.zgInputs.showPeaksAndVales = false;
|
iDescriptor.inputs.zgInputs.showPeaksAndVales = true;
|
||||||
|
|
||||||
//
|
//
|
||||||
// XDON ...
|
// XDON ...
|
||||||
|
|||||||
Reference in New Issue
Block a user