last ...
This commit is contained in:
@@ -2826,9 +2826,9 @@ class X121SCTradeHandler : public XSCBaseAlert
|
|||||||
ENUM_POSITION_TYPE type = NULL;
|
ENUM_POSITION_TYPE type = NULL;
|
||||||
ENUM_X_ORDER_MODES mode = X_ORDER_MODE_MARKET;
|
ENUM_X_ORDER_MODES mode = X_ORDER_MODE_MARKET;
|
||||||
double lastStep = mData[iDX].protectionStep;
|
double lastStep = mData[iDX].protectionStep;
|
||||||
double volume = lastStep <= 0
|
double volume = supportsCount <= 0
|
||||||
? position.volume * volumeMultiplier
|
? position.volume * volumeMultiplier
|
||||||
: position.volume * ((lastStep + 1) * volumeMultiplier);
|
: position.volume * ((supportsCount + 1) * volumeMultiplier);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Long Recovery ...
|
// Long Recovery ...
|
||||||
@@ -2839,36 +2839,50 @@ class X121SCTradeHandler : public XSCBaseAlert
|
|||||||
canRecover =
|
canRecover =
|
||||||
//
|
//
|
||||||
isTicksBearishForShort &&
|
isTicksBearishForShort &&
|
||||||
hasBearishConditions
|
(
|
||||||
|
//
|
||||||
|
hasBearishTrend &&
|
||||||
|
(hasBearishPower ||
|
||||||
|
hasBearishPattern ||
|
||||||
|
hasBearishPressure)
|
||||||
|
//
|
||||||
|
)
|
||||||
//
|
//
|
||||||
;
|
;
|
||||||
if (canRecover)
|
if (canRecover)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
sl = position.entry;
|
sl = position.tp;
|
||||||
tp = position.sl;
|
tp = position.sl;
|
||||||
type = POSITION_TYPE_SELL;
|
type = POSITION_TYPE_SELL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Same Direction ...
|
// Same Direction ...
|
||||||
if (!canRecover)
|
// if (!canRecover)
|
||||||
{
|
// {
|
||||||
//
|
// //
|
||||||
canRecover =
|
// canRecover =
|
||||||
//
|
// //
|
||||||
isTicksBullishForLong &&
|
// isTicksBullishForLong &&
|
||||||
hasBullishConditions
|
// (
|
||||||
//
|
// //
|
||||||
;
|
// hasBullishTrend &&
|
||||||
if (canRecover)
|
// (hasBullishPower ||
|
||||||
{
|
// hasBullishPattern ||
|
||||||
//
|
// hasBullishPressure)
|
||||||
sl = position.sl;
|
// //
|
||||||
tp = position.entry;
|
// )
|
||||||
type = POSITION_TYPE_BUY;
|
// //
|
||||||
}
|
// ;
|
||||||
}
|
// if (canRecover)
|
||||||
|
// {
|
||||||
|
// //
|
||||||
|
// sl = position.sl;
|
||||||
|
// tp = position.entry;
|
||||||
|
// type = POSITION_TYPE_BUY;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// Short Recovery ...
|
// Short Recovery ...
|
||||||
@@ -2879,36 +2893,50 @@ class X121SCTradeHandler : public XSCBaseAlert
|
|||||||
canRecover =
|
canRecover =
|
||||||
//
|
//
|
||||||
isTicksBullishForLong &&
|
isTicksBullishForLong &&
|
||||||
hasBullishConditions
|
(
|
||||||
|
//
|
||||||
|
hasBullishTrend &&
|
||||||
|
(hasBullishPower ||
|
||||||
|
hasBullishPattern ||
|
||||||
|
hasBullishPressure)
|
||||||
|
//
|
||||||
|
)
|
||||||
//
|
//
|
||||||
;
|
;
|
||||||
if (canRecover)
|
if (canRecover)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
sl = position.entry;
|
sl = position.tp;
|
||||||
tp = position.sl;
|
tp = position.sl;
|
||||||
type = POSITION_TYPE_BUY;
|
type = POSITION_TYPE_BUY;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Same Direction ...
|
// Same Direction ...
|
||||||
if (!canRecover)
|
// if (!canRecover)
|
||||||
{
|
// {
|
||||||
//
|
// //
|
||||||
canRecover =
|
// canRecover =
|
||||||
//
|
// //
|
||||||
isTicksBearishForShort &&
|
// isTicksBearishForShort &&
|
||||||
hasBearishConditions
|
// (
|
||||||
//
|
// //
|
||||||
;
|
// hasBearishTrend &&
|
||||||
if (canRecover)
|
// (hasBearishPower ||
|
||||||
{
|
// hasBearishPattern ||
|
||||||
//
|
// hasBearishPressure)
|
||||||
sl = position.sl;
|
// //
|
||||||
tp = position.entry;
|
// )
|
||||||
type = POSITION_TYPE_SELL;
|
// //
|
||||||
}
|
// ;
|
||||||
}
|
// if (canRecover)
|
||||||
|
// {
|
||||||
|
// //
|
||||||
|
// sl = position.sl;
|
||||||
|
// tp = position.entry;
|
||||||
|
// type = POSITION_TYPE_SELL;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user