apply some fixe on Reversal POI Detection and Passed it ...
This commit is contained in:
@@ -890,12 +890,12 @@ class XCX121XKIHelperParser : XCBase
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
double atr = helper.GetATR(barIndex);
|
||||
double atrMa = helper.GetATRSmoothed(barIndex);
|
||||
double atr = helper.GetATR(barIndex);
|
||||
double atrMa = helper.GetATRSmoothed(barIndex);
|
||||
result = atr > atrMa;
|
||||
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
@@ -918,8 +918,8 @@ class XCX121XKIHelperParser : XCBase
|
||||
}
|
||||
|
||||
//
|
||||
double atr = helper.GetATR(barIndex);
|
||||
double atrMa = helper.GetATRSmoothed(barIndex);
|
||||
double atr = helper.GetATR(barIndex);
|
||||
double atrMa = helper.GetATRSmoothed(barIndex);
|
||||
result = atr < atrMa;
|
||||
|
||||
//
|
||||
@@ -1234,7 +1234,29 @@ class XCX121XKIHelperParser : XCBase
|
||||
}
|
||||
|
||||
//
|
||||
result = IsKIWaveSwitchedToBullish(barIndex) && IsRSIOversold(barIndex);
|
||||
// RSI oversold and turning upward ...
|
||||
double rsiNow = helper.GetRSI(barIndex);
|
||||
double rsiPrev = helper.GetRSI(barIndex + 1);
|
||||
bool rsiFlip = (rsiNow > rsiPrev) && (rsiPrev < 30);
|
||||
|
||||
//
|
||||
// ATR check (volatility supportive) ...
|
||||
double atrNow = helper.GetATR(barIndex);
|
||||
double atrPrev = helper.GetATR(barIndex + 1);
|
||||
double atrMaNow = helper.GetATRSmoothed(barIndex);
|
||||
double atrMaPrev = helper.GetATRSmoothed(barIndex + 1);
|
||||
bool atrOk = atrNow > atrMaNow || atrNow > atrPrev || atrMaNow > atrMaPrev;
|
||||
|
||||
//
|
||||
// MA crossover bullish ...
|
||||
double maFastNow = helper.GetMAFast(barIndex);
|
||||
double maSlowNow = helper.GetMASlow(barIndex);
|
||||
bool maOk = maFastNow > maSlowNow;
|
||||
|
||||
//
|
||||
result = rsiFlip && (atrOk || maOk);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -1256,7 +1278,29 @@ class XCX121XKIHelperParser : XCBase
|
||||
}
|
||||
|
||||
//
|
||||
result = IsKIWaveSwitchedToBearish(barIndex) && IsRSIOverbought(barIndex);
|
||||
// RSI overbought and turning downward ...
|
||||
double rsiNow = helper.GetRSI(barIndex);
|
||||
double rsiPrev = helper.GetRSI(barIndex + 1);
|
||||
bool rsiFlip = (rsiNow < rsiPrev) && (rsiPrev > 70);
|
||||
|
||||
//
|
||||
// ATR check (volatility supportive) ...
|
||||
double atrNow = helper.GetATR(barIndex);
|
||||
double atrPrev = helper.GetATR(barIndex + 1);
|
||||
double atrMaNow = helper.GetATRSmoothed(barIndex);
|
||||
double atrMaPrev = helper.GetATRSmoothed(barIndex + 1);
|
||||
bool atrOk = atrNow > atrMaNow || atrNow > atrPrev || atrMaNow > atrMaPrev;
|
||||
|
||||
//
|
||||
// MA crossover bearish ...
|
||||
double maFastNow = helper.GetMAFast(barIndex);
|
||||
double maSlowNow = helper.GetMASlow(barIndex);
|
||||
bool maOk = maFastNow < maSlowNow;
|
||||
|
||||
//
|
||||
result = rsiFlip && (atrOk || maOk);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -954,13 +954,13 @@ class XCX121XKIStrategy1Signaller : public XCX121XKIBaseSignaller
|
||||
IsXBullish(dir);
|
||||
bool isBearishReversalPOI = isReversalPOI &&
|
||||
IsXBearish(dir);
|
||||
isSafe = (isBullishReversalPOI && isSafeForBullishEntry) ||
|
||||
(isBearishReversalPOI && isSafeForBearishEntry);
|
||||
if (isReversalPOI && isSafe)
|
||||
isSafe = (isBullishReversalPOI && isSafeForBearishEntry) ||
|
||||
(isBearishReversalPOI && isSafeForBullishEntry);
|
||||
if (isReversalPOI)
|
||||
{
|
||||
//
|
||||
Print("isReversalPOI: ", ToXString(dir));
|
||||
DebugBreak();
|
||||
// //
|
||||
// Print("isReversalPOI: ", ToXString(dir));
|
||||
// DebugBreak();
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -658,10 +658,12 @@ class XCX121XKIPOIDetector : public XCMarketPatternDetector
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
DebugBreak();
|
||||
|
||||
//
|
||||
// Add candlestick confirmation ...
|
||||
XOHCL bar;
|
||||
ENUM_X_DIRECTION dir;
|
||||
result = result &&
|
||||
bar.Init(symbol, period, barIndex);
|
||||
if (!result)
|
||||
@@ -671,8 +673,10 @@ class XCX121XKIPOIDetector : public XCMarketPatternDetector
|
||||
|
||||
//
|
||||
result = result &&
|
||||
IsStarPattern(bar, dir) &&
|
||||
IsXBullish(dir);
|
||||
HasCandlestickDirection(
|
||||
bar,
|
||||
X_DIRECTION_BULLISH //
|
||||
);
|
||||
|
||||
//
|
||||
bar.Clean();
|
||||
@@ -696,10 +700,12 @@ class XCX121XKIPOIDetector : public XCMarketPatternDetector
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
DebugBreak();
|
||||
|
||||
//
|
||||
// Add candlestick confirmation ...
|
||||
XOHCL bar;
|
||||
ENUM_X_DIRECTION dir;
|
||||
result = result &&
|
||||
bar.Init(symbol, period, barIndex);
|
||||
if (!result)
|
||||
@@ -709,8 +715,10 @@ class XCX121XKIPOIDetector : public XCMarketPatternDetector
|
||||
|
||||
//
|
||||
result = result &&
|
||||
IsStarPattern(bar, dir) &&
|
||||
IsXBearish(dir);
|
||||
HasCandlestickDirection(
|
||||
bar,
|
||||
X_DIRECTION_BEARISH //
|
||||
);
|
||||
|
||||
//
|
||||
bar.Clean();
|
||||
|
||||
Reference in New Issue
Block a user