complete X786 ...
This commit is contained in:
@@ -730,16 +730,16 @@ public:
|
||||
}
|
||||
|
||||
//
|
||||
void HandleTrailManagement(XPosition &positions[])
|
||||
void HandleTrailManagement(XPosition &positions[])
|
||||
{
|
||||
//
|
||||
// TODO:
|
||||
// Make them Configurable ...
|
||||
int maxTrailTPs = 5;
|
||||
// int levelsOnClose = 6;
|
||||
int riskFreeLevel = 4;
|
||||
int riskFreeLevel = 0;
|
||||
int requiredAgeForTrail = 0;
|
||||
int requiredDistanceForTrail = 10;
|
||||
int requiredDistanceForTrail = 50;
|
||||
|
||||
//
|
||||
int positionsCount = ArraySize(positions);
|
||||
@@ -811,13 +811,19 @@ public:
|
||||
|
||||
//
|
||||
double slDiff = PointToPrice(priceDistance, iPosition.symbol);
|
||||
double appliedSL = slDiff;
|
||||
double appliedSL = slDiff / 2;
|
||||
|
||||
//
|
||||
// double sl =
|
||||
// IsLong(iPosition.type)
|
||||
// ? iPosition.sl + appliedSL
|
||||
// : iPosition.sl - appliedSL;
|
||||
|
||||
//
|
||||
double sl =
|
||||
IsLong(iPosition.type)
|
||||
? iPosition.sl + appliedSL
|
||||
: iPosition.sl - appliedSL;
|
||||
? iPosition.entry + appliedSL
|
||||
: iPosition.entry - appliedSL;
|
||||
|
||||
//
|
||||
// double sl =
|
||||
|
||||
Reference in New Issue
Block a user