This commit is contained in:
2026-01-01 14:23:56 +03:30
parent cf30756f54
commit 1f7bd4404b
@@ -511,6 +511,7 @@ class XCX121XKIStrategy1Signaller : public XCX121XKIBaseSignaller
bool useSignaller3 = false;
bool useSignaller4 = false;
bool useSignaller5 = false;
bool useSignaller6 = false;
//
XBoxZone tmpZone;
@@ -523,6 +524,7 @@ class XCX121XKIStrategy1Signaller : public XCX121XKIBaseSignaller
bool signaller3HasSignal = false;
bool signaller4HasSignal = false;
bool signaller5HasSignal = false;
bool signaller6HasSignal = false;
//
// Validator Flags ...
@@ -547,6 +549,7 @@ class XCX121XKIStrategy1Signaller : public XCX121XKIBaseSignaller
//
// Signaller 1 ...
// POI ...
if (useSignaller1)
{
//
@@ -579,6 +582,7 @@ class XCX121XKIStrategy1Signaller : public XCX121XKIBaseSignaller
//
// Signaller 2 ...
// Breakout POI ...
if (useSignaller2)
{
//
@@ -611,6 +615,7 @@ class XCX121XKIStrategy1Signaller : public XCX121XKIBaseSignaller
//
// Signaller 3 ...
// Reversal ...
if (useSignaller3)
{
//
@@ -643,6 +648,7 @@ class XCX121XKIStrategy1Signaller : public XCX121XKIBaseSignaller
//
// Signaller 4 ...
// Continuation ...
if (useSignaller4)
{
//
@@ -675,6 +681,7 @@ class XCX121XKIStrategy1Signaller : public XCX121XKIBaseSignaller
//
// Signaller 5 ...
// Exhaustion ...
if (useSignaller5)
{
//
@@ -705,13 +712,47 @@ class XCX121XKIStrategy1Signaller : public XCX121XKIBaseSignaller
tmpDir = X_DIRECTION_NONE;
}
//
// Signaller 6 ...
// Trend Exhaustion ...
if (useSignaller6)
{
//
signaller6HasSignal = Strategy6HasSignal(
bar,
tmpZone,
targets,
tmpDir //
);
//
if (signaller6HasSignal)
{
//
provider += "6";
//
if (!zone.IsValid())
{
//
dir = tmpDir;
zone = tmpZone;
}
}
//
tmpZone.Clean();
tmpDir = X_DIRECTION_NONE;
}
//
// Summarize Signallers Result ...
result = signaller1HasSignal ||
signaller2HasSignal ||
signaller3HasSignal ||
signaller4HasSignal ||
signaller5HasSignal;
signaller5HasSignal ||
signaller6HasSignal;
//
// Signal Validating ...
@@ -866,16 +907,10 @@ class XCX121XKIStrategy1Signaller : public XCX121XKIBaseSignaller
return result;
}
//
// Custom Signal Strategies ...
// #region Custom Signal Strategies ...
/**
* Check Bar Has Signal Based on Strategy 1 ...
*
* Pattern‑based reversal:
* - Detects Pin Bar or Signal Key Bar.
* - Confirms with POI detector.
* - Good for reversals at support/resistance.
* POI ...
*
* @param bar: XOHCL, reference to Bar ...
* @param zone: XBoxZone, reference to holds affected zone ...
@@ -921,11 +956,7 @@ class XCX121XKIStrategy1Signaller : public XCX121XKIBaseSignaller
/**
* Check Bar Has Signal Based on Strategy 2 ...
*
* Trend‑following:
* - Requires KI Fast + KI Slow alignment.
* - Confirms with MA crossover.
* - RSI filter to avoid false signals.
* Breakout POI ...
*
* @return ( bool )
*/
@@ -966,10 +997,7 @@ class XCX121XKIStrategy1Signaller : public XCX121XKIBaseSignaller
/**
* Check Bar Has Signal Based on Strategy 3 ...
*
* Breakout:
* - Detects price breaking KI bands with ATR confirmation.
* - Confirms with Momentum Bar pattern.
* Reversal ...
*
* @return ( bool )
*/
@@ -1010,10 +1038,7 @@ class XCX121XKIStrategy1Signaller : public XCX121XKIBaseSignaller
/**
* Check Bar Has Signal Based on Strategy 4 ...
*
* Exhaustion:
* - Strong trend + RSI extreme + volatility low.
* - Confirms with Piercing/Dark Cloud Cover candlestick.
* Continuation ...
*
* @return ( bool )
*/
@@ -1054,11 +1079,7 @@ class XCX121XKIStrategy1Signaller : public XCX121XKIBaseSignaller
/**
* Check Bar Has Signal Based on Strategy 5 ...
*
* Continuation:
* - Requires strong trend confirmation (KI fast/slow + MA crossover + RSI filter).
* - Confirms with continuation candlestick patterns (Flag or Rising pattern).
* - Ensures zone validity for entry.
* Exhaustion ...
*
* @return ( bool )
*/
@@ -1097,6 +1118,422 @@ class XCX121XKIStrategy1Signaller : public XCX121XKIBaseSignaller
return result;
}
/**
* Check Bar Has Signal Based on Strategy 6 ...
* Trend Exhaustion ...
*
* @return ( bool )
*/
bool Strategy6HasSignal(
XOHCL &bar,
XBoxZone &zone,
XTarget &targets[],
ENUM_X_DIRECTION &dir //
)
{
//
bool result = false;
//
zone.Clean();
XClean(targets);
dir = X_DIRECTION_NONE;
//
result = bar.IsValid();
if (!result)
{
return result;
}
//
int barIndex = bar.Index() + 1;
//
result =
result &&
zone.IsValid() &&
HasDirection(dir);
//
return result;
}
// #endregion
// #region Signals ...
// #region POI ...
bool IsBullishPOILongEntry(
int barIndex = 0,
ENUM_TIMEFRAMES lowerTF = PERIOD_M5 //
)
{
//
// IMPORTANT: Use near Support/Resistance ...
bool result = poiDetector.IsBullishPOI(barIndex) &&
kiParser.IsSafeBullishEntry(barIndex) &&
IsTFBullishPattern(barIndex, lowerTF);
//
return result;
}
bool IsBearishPOIShortEntry(
int barIndex = 0,
ENUM_TIMEFRAMES lowerTF = PERIOD_M5 //
)
{
//
// IMPORTANT: Use near Support/Resistance ...
bool result = poiDetector.IsBearishPOI(barIndex) &&
kiParser.IsSafeBearishEntry(barIndex) &&
IsTFBearishPattern(barIndex, lowerTF);
//
return result;
}
bool ExitBullishPOILong(int barIndex = 0)
{
//
bool result =
poiDetector.IsBearishReversalPOI(barIndex) ||
poiDetector.IsBearishBreakoutPOI(barIndex) ||
poiDetector.IsBearishExhaustionPOI(barIndex);
//
return result;
}
bool ExitBearishPOIShort(int barIndex = 0)
{
//
bool result =
poiDetector.IsBullishReversalPOI(barIndex) ||
poiDetector.IsBullishBreakoutPOI(barIndex) ||
poiDetector.IsBullishExhaustionPOI(barIndex);
//
return result;
}
// #endregion
// #region Breakout ...
bool IsBreakoutLongEntry(
int barIndex = 0,
ENUM_TIMEFRAMES lowerTF = PERIOD_M5 //
)
{
//
bool result = false;
//
result =
kiParser.IsVolatilityHigh(barIndex) &&
IsTFBullishPattern(barIndex, lowerTF) &&
poiDetector.IsBullishBreakoutPOI(barIndex);
//
return result;
}
bool IsBreakoutShortEntry(
int barIndex = 0,
ENUM_TIMEFRAMES lowerTF = PERIOD_M5 //
)
{
//
bool result = false;
//
result =
kiParser.IsVolatilityHigh(barIndex) &&
IsTFBearishPattern(barIndex, lowerTF) &&
poiDetector.IsBearishBreakoutPOI(barIndex);
//
return result;
}
bool ExitBreakoutLong(int barIndex = 0)
{
//
bool result =
poiDetector.IsBearishReversalPOI(barIndex) ||
poiDetector.IsBearishExhaustionPOI(barIndex);
//
return result;
}
bool ExitBreakoutShort(int barIndex = 0)
{
//
bool result =
poiDetector.IsBullishReversalPOI(barIndex) ||
poiDetector.IsBullishExhaustionPOI(barIndex);
//
return result;
}
// #endregion
// #region Reversal ...
bool IsReversalLongEntry(
int barIndex = 0,
ENUM_TIMEFRAMES lowerTF = PERIOD_M5 //
)
{
//
bool result =
kiParser.IsRSIBullish(barIndex) &&
IsTFBullishPattern(barIndex, lowerTF) &&
poiDetector.IsBullishReversalPOI(barIndex);
//
return result;
}
bool IsReversalShortEntry(
int barIndex = 0,
ENUM_TIMEFRAMES lowerTF = PERIOD_M5 //
)
{
//
bool result =
kiParser.IsRSIBearish(barIndex) &&
IsTFBearishPattern(barIndex, lowerTF) &&
poiDetector.IsBearishReversalPOI(barIndex);
//
return result;
}
bool ExitReversalLong(int barIndex = 0)
{
//
bool result =
poiDetector.IsBearishBreakoutPOI(barIndex) ||
poiDetector.IsBearishContinuationPOI(barIndex);
//
return result;
}
bool ExitReversalShort(int barIndex = 0)
{
//
bool result =
poiDetector.IsBullishBreakoutPOI(barIndex) ||
poiDetector.IsBullishContinuationPOI(barIndex);
//
return result;
}
// #endregion
// #region Continuation ...
bool IsContinuationLongEntry(
int barIndex = 0,
ENUM_TIMEFRAMES lowerTF = PERIOD_M5 //
)
{
//
bool result =
IsTFBullishPattern(barIndex, lowerTF) &&
kiParser.IsTrendStrongBullish(barIndex) &&
poiDetector.IsBullishContinuationPOI(barIndex);
//
return result;
}
bool IsContinuationShortEntry(
int barIndex = 0,
ENUM_TIMEFRAMES lowerTF = PERIOD_M5 //
)
{
//
bool result =
IsTFBearishPattern(barIndex, lowerTF) &&
kiParser.IsTrendStrongBearish(barIndex) &&
poiDetector.IsBearishContinuationPOI(barIndex);
//
return result;
}
bool ExitContinuationLong(int barIndex = 0)
{
//
bool result =
poiDetector.IsBearishReversalPOI(barIndex) ||
poiDetector.IsBearishExhaustionPOI(barIndex);
//
return result;
}
bool ExitContinuationShort(int barIndex = 0)
{
//
bool result =
poiDetector.IsBullishReversalPOI(barIndex) ||
poiDetector.IsBullishExhaustionPOI(barIndex);
//
return result;
}
// #endregion
// #region Exhaustion ...
bool IsExhaustionLongEntry(
int barIndex = 0,
ENUM_TIMEFRAMES lowerTF = PERIOD_M5 //
)
{
//
bool result =
IsTFBullishPattern(barIndex, lowerTF) &&
poiDetector.IsBearishExhaustionPOI(barIndex);
//
return result;
}
bool IsExhaustionShortEntry(
int barIndex = 0,
ENUM_TIMEFRAMES lowerTF = PERIOD_M5 //
)
{
//
bool result =
IsTFBearishPattern(barIndex, lowerTF) &&
poiDetector.IsBullishExhaustionPOI(barIndex);
//
return result;
}
bool ExitExhaustionLong(int barIndex = 0)
{
return poiDetector.IsBearishBreakoutPOI(barIndex);
}
bool ExitExhaustionShort(int barIndex = 0)
{
return poiDetector.IsBullishBreakoutPOI(barIndex);
}
// #endregion
// #region Trend Exhaustion ...
bool IsTrendExhaustionLongEntry(
int barIndex = 0,
ENUM_TIMEFRAMES lowerTF = PERIOD_M5 //
)
{
//
bool result =
IsTFBullishPattern(barIndex, lowerTF) &&
poiDetector.IsBearishTrendExhaustedPOI(barIndex);
//
return result;
}
bool IsTrendExhaustionShortEntry(
int barIndex = 0,
ENUM_TIMEFRAMES lowerTF = PERIOD_M5 //
)
{
//
bool result =
IsTFBearishPattern(barIndex, lowerTF) &&
poiDetector.IsBullishTrendExhaustedPOI(barIndex);
//
return result;
}
bool ExitTrendExhaustionLong(int barIndex = 0)
{
//
bool result =
poiDetector.IsBearishBreakoutPOI(barIndex) ||
poiDetector.IsBearishContinuationPOI(barIndex);
//
return result;
}
bool ExitTrendExhaustionShort(int barIndex = 0)
{
//
bool result =
poiDetector.IsBullishBreakoutPOI(barIndex) ||
poiDetector.IsBullishContinuationPOI(barIndex);
//
return result;
}
// #endregion
// #endregion
// #region TF Patterns ...
bool IsTFBullishPattern(
int barIndex = 0,
ENUM_TIMEFRAMES forPeriod = NULL //
)
{
//
bool result = false;
//
// Normalize ...
barIndex = kiParser.NormalizeBarIndex(barIndex);
if (!IsXValid(forPeriod))
{
forPeriod = period;
}
//
XOHCL bar;
result = bar.Init(symbol, forPeriod, barIndex) &&
poiDetector.HasCandlestickDirection(bar, X_DIRECTION_BULLISH);
bar.Clean();
//
return result;
}
bool IsTFBearishPattern(
int barIndex = 0,
ENUM_TIMEFRAMES forPeriod = NULL //
)
{
//
bool result = false;
//
// Normalize ...
barIndex = kiParser.NormalizeBarIndex(barIndex);
if (!IsXValid(forPeriod))
{
forPeriod = period;
}
//
XOHCL bar;
result = bar.Init(symbol, forPeriod, barIndex) &&
poiDetector.HasCandlestickDirection(bar, X_DIRECTION_BEARISH);
bar.Clean();
//
return result;
}
// #endregion
//
};