This commit is contained in:
2024-12-29 05:42:27 +03:30
parent 408422dcfc
commit ecdba76c3f
12 changed files with 2310 additions and 104 deletions
+72
View File
@@ -50,6 +50,56 @@ enum ENUM_X_DIRECTION
X_DIRECTION_BEARISH, // Bearish
};
//
enum ENUM_X_FIBO_LEVELS
{
X_FIBO_LEVEL_236,
X_FIBO_LEVEL_382,
X_FIBO_LEVEL_500,
X_FIBO_LEVEL_618,
X_FIBO_LEVEL_764,
};
//
double GetFiboLevelValue(ENUM_X_FIBO_LEVELS value)
{
//
double result = 0;
//
switch (value)
{
//
case X_FIBO_LEVEL_236:
result = 0.236;
break;
//
case X_FIBO_LEVEL_382:
result = 0.382;
break;
//
case X_FIBO_LEVEL_500:
result = 0.500;
break;
//
case X_FIBO_LEVEL_618:
result = 0.618;
break;
//
case X_FIBO_LEVEL_764:
result = 0.764;
break;
}
//
return result;
}
//
string ToString(ENUM_X_DIRECTION value)
{
//
@@ -13269,6 +13319,28 @@ bool IsSpecifiedBearish(ENUM_X_DIRECTION value)
return result;
}
//
ENUM_X_DIRECTION Opposit(ENUM_X_DIRECTION value)
{
//
ENUM_X_DIRECTION result = X_DIRECTION_NONE;
//
if (!HasDirection(value))
{
return result;
}
//
result =
IsBullish(value)
? X_DIRECTION_BEARISH
: X_DIRECTION_BULLISH;
//
return result;
}
//
// Moving Average ...
+137 -1
View File
@@ -1301,6 +1301,29 @@ class XCSwing : public XCBasePOI
return result;
}
/**
* Get Time of Swing ...
*
* @return ( datetime )
*/
datetime GetTime()
{
//
datetime result = NULL;
//
if (!IsValid() || !mBar.IsValid())
{
return result;
}
//
result = mBar.time;
//
return result;
}
ENUM_TIMEFRAMES GetPeriod()
{
//
@@ -3761,7 +3784,6 @@ struct XPOIState
//
};
//
//
//
@@ -4092,6 +4114,78 @@ struct XPVPivot
return result;
}
/**
* Check Price in Premium or not ...
*
* @return ( bool )
*/
bool IsPriceInPremium()
{
//
bool result = false;
//
result = IsValid();
if (!result)
{
return result;
}
//
double ask = GetAsk(symbol);
double bid = GetBid(symbol);
//
double mid = CalculateMid();
//
result =
//
ask > mid &&
bid > mid
//
;
//
return result;
}
/**
* Check Price in Discount or not ...
*
* @return ( bool )
*/
bool IsPriceInDiscount()
{
//
bool result = false;
//
result = IsValid();
if (!result)
{
return result;
}
//
double ask = GetAsk(symbol);
double bid = GetBid(symbol);
//
double mid = CalculateMid();
//
result =
//
ask > mid &&
bid > mid
//
;
//
return result;
}
//
/**
@@ -5512,6 +5606,9 @@ void DetectPivotPOIs(
bool isInside = iBar.high <= pivot.upper;
if (isInside)
{
//
// iSwing.To(pivot.to);
//
Add(
iSwing,
@@ -5548,6 +5645,9 @@ void DetectPivotPOIs(
bool isInside = iBar.low >= pivot.lower;
if (isInside)
{
//
// iSwing.To(pivot.to);
//
Add(
iSwing,
@@ -5581,6 +5681,9 @@ void DetectPivotPOIs(
iZone.Lower() >= pivot.lower;
if (isInside)
{
//
iZone.To(pivot.to);
//
Add(
iZone,
@@ -5611,6 +5714,9 @@ void DetectPivotPOIs(
iZone.Lower() >= pivot.lower;
if (isInside)
{
//
iZone.To(pivot.to);
//
Add(
iZone,
@@ -5644,6 +5750,9 @@ void DetectPivotPOIs(
iZone.Lower() >= pivot.lower;
if (isInside)
{
//
iZone.To(pivot.to);
//
Add(
iZone,
@@ -5674,6 +5783,9 @@ void DetectPivotPOIs(
iZone.Lower() >= pivot.lower;
if (isInside)
{
//
iZone.To(pivot.to);
//
Add(
iZone,
@@ -5707,6 +5819,9 @@ void DetectPivotPOIs(
iZone.Lower() >= pivot.lower;
if (isInside)
{
//
iZone.To(pivot.to);
//
Add(
iZone,
@@ -5737,6 +5852,9 @@ void DetectPivotPOIs(
iZone.Lower() >= pivot.lower;
if (isInside)
{
//
iZone.To(pivot.to);
//
Add(
iZone,
@@ -5770,6 +5888,9 @@ void DetectPivotPOIs(
iZone.Lower() >= pivot.lower;
if (isInside)
{
//
iZone.To(pivot.to);
//
Add(
iZone,
@@ -5800,6 +5921,9 @@ void DetectPivotPOIs(
iZone.Lower() >= pivot.lower;
if (isInside)
{
//
iZone.To(pivot.to);
//
Add(
iZone,
@@ -5840,6 +5964,9 @@ void DetectPivotPOIs(
iBar.low >= pivot.lower;
if (isInside)
{
//
iRejection.To(pivot.to);
//
Add(
iRejection,
@@ -5877,6 +6004,9 @@ void DetectPivotPOIs(
iBar.high >= pivot.lower;
if (isInside)
{
//
iRejection.To(pivot.to);
//
Add(
iRejection,
@@ -5917,6 +6047,9 @@ void DetectPivotPOIs(
iBar.low >= pivot.lower;
if (isInside)
{
//
iMomentum.To(pivot.to);
//
Add(
iMomentum,
@@ -5954,6 +6087,9 @@ void DetectPivotPOIs(
iBar.high >= pivot.lower;
if (isInside)
{
//
iMomentum.To(pivot.to);
//
Add(
iMomentum,
+10
View File
@@ -5313,6 +5313,11 @@ string ToString(ENUM_X_SIGNAL_EXECUTION_RESULT value)
result = "Spread more than Max Allowed";
break;
//
case X_SIGNAL_EXECUTION_FAILED_NOT_ALLOWED:
result = "not Allowed";
break;
//
case X_SIGNAL_EXECUTION_FAILED_NO_EQUITY:
result = "No Equity for Trade";
@@ -5328,6 +5333,11 @@ string ToString(ENUM_X_SIGNAL_EXECUTION_RESULT value)
result = "Max Allowed Positions Reached";
break;
//
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";