last ...
This commit is contained in:
@@ -230,6 +230,12 @@ public:
|
||||
//
|
||||
X121ProviderDescriptor iDescriptor = mDescriptors[i];
|
||||
|
||||
//
|
||||
if (iDescriptor.provider.CanIgnoreProcess())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
//
|
||||
int iSignalsCount = iDescriptor.HasSignal();
|
||||
if (IsValidSize(iSignalsCount))
|
||||
@@ -524,6 +530,10 @@ public:
|
||||
//
|
||||
const bool result = false;
|
||||
|
||||
//
|
||||
// Here we Implement Account Protector ...
|
||||
HandleAccountProtect();
|
||||
|
||||
//
|
||||
// Check Descriptor ...
|
||||
int descriptorsCount = CountDescriptors();
|
||||
@@ -568,11 +578,13 @@ public:
|
||||
//
|
||||
// Check Profits Enough for Hedge or not ...
|
||||
double profit = SpecifiedCalculatePositionsProfit(positions);
|
||||
bool isReadyForHedge = SpecifiedIsPositionsReadyForHedge(
|
||||
positions,
|
||||
mDescriptors[i].signallers[j].minRequiredProfitPerTrade,
|
||||
mDescriptors[i].signallers[j].minRequiredProfitPerTradeVolumeFactor //
|
||||
);
|
||||
bool isReadyForHedge =
|
||||
positionsCount > 1 &&
|
||||
SpecifiedIsPositionsReadyForHedge(
|
||||
positions,
|
||||
mDescriptors[i].signallers[j].minRequiredProfitPerTrade,
|
||||
mDescriptors[i].signallers[j].minRequiredProfitPerTradeVolumeFactor //
|
||||
);
|
||||
if (isReadyForHedge)
|
||||
{
|
||||
//
|
||||
@@ -637,6 +649,19 @@ public:
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
void HandleAccountProtect() {
|
||||
//
|
||||
XPosition positions[];
|
||||
int positionsCount = mTrader.GetPositions(positions);
|
||||
if (!IsValidSize(positionsCount)) {
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
// Tools ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user