add new indicators ...

This commit is contained in:
2024-06-22 15:42:08 +03:30
parent 154ebda012
commit fbe701f198
33 changed files with 5602 additions and 24 deletions
+5 -2
View File
@@ -4917,8 +4917,8 @@ private:
if (mMaxDrawdownForce > 0)
{
//
double drawdown = GetDrawdownPercent();
if (drawdown > 5)
double drawdown = CalculateMaxDrawdown();
if (drawdown > mMaxDrawdownForce)
{
//
// Try to Hedge ...
@@ -5166,6 +5166,9 @@ private:
//
if (isValid)
{
//
// bool canHandle = mMaxDrawdownForce <= 0 || mMaxDrawdownForce
//
// Check Delay Between Two Signals ...
bool isDelayPassed = IsSignalDelayPassed(signal);
+22 -16
View File
@@ -579,24 +579,11 @@ public:
}
//
// Protected ...
protected:
//
// Props ...
//
// Check in Test Mode or not ...
bool mIsInTestMode;
//
// Save Max Drawdown ...
double mMaxDrawdown;
double mDrawdownPercent;
double mStaticBalanceForCalculateDrawdown;
// Tools ...
//
// Calculate Max Drawdown and it's Percent ...
void CalculateMaxDrawdown()
double CalculateMaxDrawdown()
{
//
int positionsCount = PositionsTotal();
@@ -618,8 +605,27 @@ protected:
mMaxDrawdown = 0.0;
mDrawdownPercent = 0.0;
}
//
return mDrawdownPercent;
}
//
// Protected ...
protected:
//
// Props ...
//
// Check in Test Mode or not ...
bool mIsInTestMode;
//
// Save Max Drawdown ...
double mMaxDrawdown;
double mDrawdownPercent;
double mStaticBalanceForCalculateDrawdown;
//
//