last ...
This commit is contained in:
@@ -2254,15 +2254,39 @@ protected:
|
||||
|
||||
//
|
||||
// Here we Select Price for SL Trailling ...
|
||||
double usedPrice =
|
||||
iPosition.sl > 0 &&
|
||||
isLong
|
||||
? iPosition.sl < iPosition.entry
|
||||
? iPosition.entry
|
||||
: iPosition.sl
|
||||
: iPosition.sl > iPosition.entry
|
||||
? iPosition.entry
|
||||
: iPosition.sl;
|
||||
double usedPrice = 0;
|
||||
if (iPosition.sl != 0)
|
||||
{
|
||||
//
|
||||
if (isLong)
|
||||
{
|
||||
//
|
||||
if (iPosition.sl < iPosition.entry)
|
||||
{
|
||||
usedPrice = iPosition.entry;
|
||||
}
|
||||
else
|
||||
{
|
||||
usedPrice = iPosition.sl;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
if (iPosition.sl > iPosition.entry)
|
||||
{
|
||||
usedPrice = iPosition.entry;
|
||||
}
|
||||
else
|
||||
{
|
||||
usedPrice = iPosition.sl;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
usedPrice = iPosition.entry;
|
||||
}
|
||||
|
||||
//
|
||||
double nextTrailPoint = NextTrailPoint();
|
||||
|
||||
@@ -544,7 +544,14 @@ public:
|
||||
}
|
||||
|
||||
//
|
||||
result = (double)zone.ticks / CountTicks() * 100;
|
||||
int ticksCount = CountTicks();
|
||||
if (ticksCount <= 0)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = (double)zone.ticks / ticksCount * 100;
|
||||
result = NormalizeDouble(result, normalizationDigits);
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user