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