last ...
This commit is contained in:
@@ -136,7 +136,8 @@ class XCX121XKIPOIDetector : public XCMarketPatternDetector
|
||||
}
|
||||
|
||||
//
|
||||
if (minFVGAllowedPoints < 0) {
|
||||
if (minFVGAllowedPoints < 0)
|
||||
{
|
||||
minFVGAllowedPoints = 0;
|
||||
}
|
||||
|
||||
@@ -168,48 +169,82 @@ class XCX121XKIPOIDetector : public XCMarketPatternDetector
|
||||
//
|
||||
// Initialize Bar ...
|
||||
has = tmpBar.Init(forSymbol, forPeriod, i);
|
||||
if (has)
|
||||
if (!has)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
//
|
||||
// Check Same Bars ...
|
||||
has = HasSameBars(tmpBar, tmpDir, tmpCount, minAllowedSameDirectionalBars);
|
||||
has = has &&
|
||||
IsXBullish(tmpDir);
|
||||
if (!has)
|
||||
{
|
||||
//
|
||||
// Next Step is Detect Sequence Same Directional Bars ...
|
||||
has = HasSameBars(tmpBar, tmpDir, tmpCount, minAllowedSameDirectionalBars);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// Zone Bar ...
|
||||
XOHCL zoneBar;
|
||||
has = zoneBar.Init(tmpBar.symbol, tmpBar.period, i + tmpCount + 1);
|
||||
|
||||
//
|
||||
// Validate Zone Bar Direction ...
|
||||
has = has &&
|
||||
zoneBar.GetDirection() != tmpBar.GetDirection();
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// Validate FVG Exists ...
|
||||
CollectFVGs(tmpBar, tmpFVGs, 5, 0, zoneBar.Index() - tmpBar.Index());
|
||||
FilterZones(tmpBar, tmpFVGs, tmpBar.GetDirection(), X_PRICE_CLOSE, tmpBar.GetDirection());
|
||||
has = ArraySize(tmpFVGs) > 0;
|
||||
if (has && minFVGAllowedPoints > 0) {
|
||||
//
|
||||
// Validate FVG Gap
|
||||
}
|
||||
|
||||
//
|
||||
if (has)
|
||||
{
|
||||
DebugBreak();
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
zoneBar.Clean();
|
||||
}
|
||||
tmpCount = 0;
|
||||
tmpBar.Clean();
|
||||
tmpDir = X_DIRECTION_NONE;
|
||||
|
||||
//
|
||||
tmpBar.Clean();
|
||||
continue;
|
||||
}
|
||||
|
||||
//
|
||||
DebugBreak();
|
||||
|
||||
//
|
||||
// Cleanup Resources ...
|
||||
tmpCount = 0;
|
||||
tmpBar.Clean();
|
||||
tmpDir = X_DIRECTION_NONE;
|
||||
|
||||
//
|
||||
|
||||
// if (has)
|
||||
// {
|
||||
// //
|
||||
// // Next Step is Detect Sequence Same Directional Bars ...
|
||||
// has = HasSameBars(tmpBar, tmpDir, tmpCount, minAllowedSameDirectionalBars);
|
||||
// if (has)
|
||||
// {
|
||||
// //
|
||||
// // Zone Bar ...
|
||||
// XOHCL zoneBar;
|
||||
// has = zoneBar.Init(tmpBar.symbol, tmpBar.period, i + tmpCount + 1);
|
||||
|
||||
// //
|
||||
// // Validate Zone Bar Direction ...
|
||||
// has = has &&
|
||||
// zoneBar.GetDirection() != tmpBar.GetDirection();
|
||||
// if (has)
|
||||
// {
|
||||
// //
|
||||
// // Validate FVG Exists ...
|
||||
// CollectFVGs(tmpBar, tmpFVGs, 5, 0, zoneBar.Index() - tmpBar.Index());
|
||||
// FilterZones(tmpBar, tmpFVGs, tmpBar.GetDirection(), X_PRICE_CLOSE, tmpBar.GetDirection());
|
||||
// has = ArraySize(tmpFVGs) > 0;
|
||||
// if (has && minFVGAllowedPoints > 0)
|
||||
// {
|
||||
// //
|
||||
// // Validate FVG Gap
|
||||
// }
|
||||
|
||||
// //
|
||||
// if (has)
|
||||
// {
|
||||
// DebugBreak();
|
||||
// }
|
||||
// }
|
||||
|
||||
// //
|
||||
// zoneBar.Clean();
|
||||
// }
|
||||
|
||||
// //
|
||||
// tmpBar.Clean();
|
||||
|
||||
// }
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user