Apply Last Fixes on TWPV Strategy Method 1 ...

This commit is contained in:
2024-12-31 18:45:16 +03:30
parent 8d90d3bcc2
commit 1c1e1c8365
5 changed files with 194 additions and 86 deletions
+52
View File
@@ -265,6 +265,14 @@ class XCZone : public XCBasePOI
return mUpper;
}
/**
* Set Zone Upper Boundary ...
*/
void Upper(double value)
{
mUpper = value;
}
/**
* Get Zone Lower Boundary ...
*
@@ -275,6 +283,14 @@ class XCZone : public XCBasePOI
return mLower;
}
/**
* Set Zone Lower Boundary ...
*/
void Lower(double value)
{
mLower = value;
}
/**
* Retrieve Zone Range ...
*
@@ -4763,6 +4779,42 @@ struct XConsolidationZone
//
};
/**
* Converts a Consolidation Zone ...
*
* @param zone: XConsolidationZone instance Reference ...
* @param dest: XCZone pointer Reference ...
*
* @return ( bool )
*/
bool ToZone(
XConsolidationZone &zone,
XCZone *&dest //
)
{
//
bool result = false;
//
dest = NULL;
//
result = zone.IsValid();
if (!result)
{
return result;
}
//
dest = new XCZone();
dest.Upper(zone.upper);
dest.Lower(zone.lower);
result = dest.IsValidBoundary();
//
return result;
}
//
// Model Value Changed ...
struct XValueChange
+16 -10
View File
@@ -129,15 +129,16 @@ enum ENUM_X_POSITION_SELECT_METHODS
enum ENUM_X_SIGNAL_EXECUTION_RESULT
{
//
X_SIGNAL_EXECUTION_UNKNOWN, // Unknown
X_SIGNAL_EXECUTION_SUCCEED, // Succed
X_SIGNAL_EXECUTION_FAILED_SPREAD, // Spread more than Max Allowed
X_SIGNAL_EXECUTION_FAILED_NOT_ALLOWED, // Not Allowed Trade Type
X_SIGNAL_EXECUTION_FAILED_NO_EQUITY, // No Equity for Trade
X_SIGNAL_EXECUTION_FAILED_PRICE_ERROR, // Price Error
X_SIGNAL_EXECUTION_FAILED_MAX_REACHED, // Max Allowed Positions Reached
X_SIGNAL_EXECUTION_FAILED_DELAY_NOT_PASSED, // Same Positions Delay Not Passed
X_SIGNAL_EXECUTION_FAILED_INVALID_PARAMS, // Invalid Params
X_SIGNAL_EXECUTION_UNKNOWN, // Unknown
X_SIGNAL_EXECUTION_SUCCEED, // Succed
X_SIGNAL_EXECUTION_FAILED_SPREAD, // Spread more than Max Allowed
X_SIGNAL_EXECUTION_FAILED_NOT_ALLOWED, // Not Allowed Trade Type
X_SIGNAL_EXECUTION_FAILED_NO_EQUITY, // No Equity for Trade
X_SIGNAL_EXECUTION_FAILED_PRICE_ERROR, // Price Error
X_SIGNAL_EXECUTION_FAILED_PREV_PROFIT_ERROR, // Prev Profit Error
X_SIGNAL_EXECUTION_FAILED_MAX_REACHED, // Max Allowed Positions Reached
X_SIGNAL_EXECUTION_FAILED_DELAY_NOT_PASSED, // Same Positions Delay Not Passed
X_SIGNAL_EXECUTION_FAILED_INVALID_PARAMS, // Invalid Params
};
//
@@ -5328,6 +5329,11 @@ string ToString(ENUM_X_SIGNAL_EXECUTION_RESULT value)
result = "Price Error";
break;
//
case X_SIGNAL_EXECUTION_FAILED_PREV_PROFIT_ERROR:
result = "Previous Position Profit not Passed for Accept Next";
break;
//
case X_SIGNAL_EXECUTION_FAILED_MAX_REACHED:
result = "Max Allowed Positions Reached";
@@ -5337,7 +5343,7 @@ string ToString(ENUM_X_SIGNAL_EXECUTION_RESULT value)
case X_SIGNAL_EXECUTION_FAILED_DELAY_NOT_PASSED:
result = "Min Delay Between to Signal not Passed";
break;
//
case X_SIGNAL_EXECUTION_FAILED_INVALID_PARAMS:
result = "Invalid Params";