Apply URAUDb Level 3 Fix ...
This commit is contained in:
Vendored
+1
-1
@@ -10,7 +10,7 @@
|
|||||||
"references": [],
|
"references": [],
|
||||||
"title": "Require Assets",
|
"title": "Require Assets",
|
||||||
"details": {
|
"details": {
|
||||||
"content": "- [x] EURUSDb; GPC;\n 1. [x] Level 1;\n 2. [x] Level 2;\n 3. [x] Level 3;\n- [x] GBPUSDb; AMD PC;\n 1. [x] Level 1;\n 2. [x] Level 2;\n 3. [x] Level 3;\n- [x] EURGBPb; i3 PC;\n 1. [x] Level 1;\n 2. [x] Level 2;\n 3. [x] Level 3;\n- [x] USDCHFb; iMac Slim 2 PC;\n 1. [x] Level 1;\n 2. [x] Level 2;\n 3. [x] Level 3;\n- [x] EURCHFb; HP i7 PC;\n 1. [x] Level 1;\n 2. [x] Level 2;\n 3. [x] Level 3;\n- [x] USDJPYb; iMac Slim 1 PC;\n 1. [x] Level 1;\n 2. [x] Level 2;\n 3. [x] Level 3;\n- [] EURJPYb; Surface i7;\n 1. [x] Level 1;\n 2. [] Level 2;\n 3. [] Level 3;\n- [x] USDCADb; HP i5 10;\n 1. [x] Level 1;\n 2. [x] Level 2;\n 3. [x] Level 3;\n- [x] EURCADb; GPC;\n 1. [x] Level 1;\n 2. [x] Level 2;\n 3. [x] Level 3;\n- [] AUDUSDb; iMac Slim 1;\n 1. [x] Level 1;\n 2. [x] Level 2;\n 3. [] Level 3;\n- [] EURAUDb; iMac Slim 2;\n 1. [x] Level 1;\n 2. [x] Level 2;\n 3. [] Level 3;\n- [] NZDUSDb; AMD PC\n 1. [x] Level 1;\n 2. [x] Level 2;\n 3. [] Level 3;\n- [] EURNZDb; HP i7 17;\n 1. [x] Level 1;\n 2. [x] Level 2;\n 3. [] Level 3;\n- [] XAUUSDb; i3 PC;\n 1. [] Level 1;\n 2. [] Level 2;\n 3. [] Level 3;\n- [] XAGUSDb; GPC;\n 1. [x] Level 1;\n 2. [x] Level 2;\n 3. [] Level 3;\n- [] BRENT; HP i5 12;\n 1. [x] Level 1;\n 2. [] Level 2;\n 3. [] Level 3;\n- [] DOWEJONES3\n 1. [] Level 1;\n 2. [] Level 2;\n 3. [] Level 3;\n",
|
"content": "- [x] EURUSDb; GPC;\n 1. [x] Level 1;\n 2. [x] Level 2;\n 3. [x] Level 3;\n- [x] GBPUSDb; AMD PC;\n 1. [x] Level 1;\n 2. [x] Level 2;\n 3. [x] Level 3;\n- [x] EURGBPb; i3 PC;\n 1. [x] Level 1;\n 2. [x] Level 2;\n 3. [x] Level 3;\n- [x] USDCHFb; iMac Slim 2 PC;\n 1. [x] Level 1;\n 2. [x] Level 2;\n 3. [x] Level 3;\n- [x] EURCHFb; HP i7 PC;\n 1. [x] Level 1;\n 2. [x] Level 2;\n 3. [x] Level 3;\n- [x] USDJPYb; iMac Slim 1 PC;\n 1. [x] Level 1;\n 2. [x] Level 2;\n 3. [x] Level 3;\n- [] EURJPYb; Surface i7;\n 1. [x] Level 1;\n 2. [] Level 2;\n 3. [] Level 3;\n- [x] USDCADb; HP i5 10;\n 1. [x] Level 1;\n 2. [x] Level 2;\n 3. [x] Level 3;\n- [x] EURCADb; GPC;\n 1. [x] Level 1;\n 2. [x] Level 2;\n 3. [x] Level 3;\n- [] AUDUSDb; iMac Slim 1;\n 1. [x] Level 1;\n 2. [x] Level 2;\n 3. [] Level 3;\n- [x] EURAUDb; iMac Slim 2;\n 1. [x] Level 1;\n 2. [x] Level 2;\n 3. [x] Level 3;\n- [] NZDUSDb; AMD PC\n 1. [x] Level 1;\n 2. [x] Level 2;\n 3. [] Level 3;\n- [] EURNZDb; HP i7 17;\n 1. [x] Level 1;\n 2. [x] Level 2;\n 3. [] Level 3;\n- [] XAUUSDb; i3 PC;\n 1. [] Level 1;\n 2. [] Level 2;\n 3. [] Level 3;\n- [] XAGUSDb; GPC;\n 1. [x] Level 1;\n 2. [x] Level 2;\n 3. [] Level 3;\n- [] BRENT; HP i5 12;\n 1. [x] Level 1;\n 2. [] Level 2;\n 3. [] Level 3;\n- [] DOWEJONES3\n 1. [] Level 1;\n 2. [] Level 2;\n 3. [] Level 3;\n",
|
||||||
"mime": "text/markdown"
|
"mime": "text/markdown"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -5859,6 +5859,111 @@ public:
|
|||||||
|
|
||||||
//
|
//
|
||||||
int supportsCount = ArraySize(supports);
|
int supportsCount = ArraySize(supports);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Collect Main Position Related Data ...
|
||||||
|
|
||||||
|
//
|
||||||
|
// Hold a Position and All of it's Supports ...
|
||||||
|
XPosition iPack[];
|
||||||
|
|
||||||
|
//
|
||||||
|
// Fill Pack ...
|
||||||
|
AddRef(
|
||||||
|
iPosition,
|
||||||
|
iPack //
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
if (IsValidSize(supportsCount))
|
||||||
|
{
|
||||||
|
//
|
||||||
|
Copy(
|
||||||
|
supports,
|
||||||
|
iPack //
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
int iPackCount = ArraySize(iPack);
|
||||||
|
if (!IsValidSize(iPackCount))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
double volume = 0;
|
||||||
|
double profit = 0;
|
||||||
|
double commission = 0;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Calculate Required Datas ...
|
||||||
|
for (int j = 0; j < iPackCount; j++)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
XPosition jPosition = iPack[j];
|
||||||
|
if (!jPosition.IsValid())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
XPosition uPosition;
|
||||||
|
bool hasPosition = mTrader.GetPosition(
|
||||||
|
jPosition.ticket,
|
||||||
|
uPosition //
|
||||||
|
);
|
||||||
|
if (!hasPosition)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
volume += uPosition.volume;
|
||||||
|
profit += uPosition.profit;
|
||||||
|
|
||||||
|
//
|
||||||
|
double jCommission = mTrader.GetPositionCommission(jPosition.ticket);
|
||||||
|
commission += jCommission;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// here we have to Check Protection Conditions ...
|
||||||
|
|
||||||
|
//
|
||||||
|
// Check Position State ...
|
||||||
|
bool isInProfit = profit > 0;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Based On Single Position ...
|
||||||
|
if (iPackCount == 1)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// Based on Profit ...
|
||||||
|
if (isInProfit)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
//
|
||||||
|
// Based On DrawDown ...
|
||||||
|
else
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//
|
||||||
|
// Multiple Protected Positions ...
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// Based on Profit ...
|
||||||
|
if (isInProfit)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
//
|
||||||
|
// Based On DrawDown ...
|
||||||
|
else
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user