This commit is contained in:
2025-05-19 15:13:49 +03:30
parent ebc437a2f2
commit 8451bcdd6e
5 changed files with 2794 additions and 200 deletions
@@ -1595,4 +1595,53 @@ bool DetectTriggerBlock(
return result;
};
bool DetectTriggerBlock1(
XBoxZone &triggerBlock,
XCAEAConditions &conditions,
XCXCAEAHelper *helper,
XCAEATriggerBlockConfiguration &config,
int bar_index = 0,
int loopback = 6 //
) {
//
bool result = false;
//
conditions.Clean();
triggerBlock.Clean();
//
// Normalize Args ...
loopback = NormalizeInt(loopback, 6);
bar_index = NormalizeInt(bar_index, 0);
//
// Validate Args ...
result = helper != NULL;
if (!result)
{
return result;
}
//
// Provide base Requirements ...
//
string symbol = helper.GetSymbol();
double points = GetPoints(symbol);
ENUM_TIMEFRAMES period = helper.GetPeriod();
//
// Conditions Reading Indexes ...
int zIDX = 0;
int cIDX = zIDX + 1;
int pIDX = cIDX + 1;
int p2IDX = pIDX + 1;
int p3IDX = p2IDX + 1;
int p4IDX = p3IDX + 1;
//
return result;
}
//
+228 -199
View File
@@ -288,10 +288,29 @@ class XCXCAEASignaller : XCBase
XBoxZone tmpZone;
XCAEATriggerBlockConfiguration config;
//
bool allowTwoFilters = false;
bool allowThreeFilters = false;
//
bool hasFullFiltered = false;
bool hasSarRsiAdxFiltered = false;
bool hasSarRsiTrendFiltered = false;
bool hasSarAdxTrendFiltered = false;
bool hasRsiAdxTrendFiltered = false;
//
bool hasSarRsiFiltered = false;
bool hasSarAdxFiltered = false;
bool hasRsiAdxFiltered = false;
bool hasSarTrendFiltered = false;
bool hasRsiTrendFiltered = false;
bool hasAdxTrendFiltered = false;
//
// Full Filteres ...
config.ConfigureFullFilter();
bool hasFullFiltered = DetectTriggerBlock(
hasFullFiltered = DetectTriggerBlock(
tmpZone,
conditions,
helper,
@@ -312,232 +331,242 @@ class XCXCAEASignaller : XCBase
}
//
tmpZone.Clean();
config.ConfigureSarRsiAdxFilter();
bool hasSarRsiAdxFiltered = DetectTriggerBlock(
tmpZone,
conditions,
helper,
config,
zIndex,
loopback //
);
if (hasSarRsiAdxFiltered)
// Check Three Filters ...
if (allowThreeFilters)
{
//
pushers++;
tmpZone.Clean();
config.ConfigureSarRsiAdxFilter();
hasSarRsiAdxFiltered = DetectTriggerBlock(
tmpZone,
conditions,
helper,
config,
zIndex,
loopback //
);
if (hasSarRsiAdxFiltered)
{
//
pushers++;
//
if (!decisionZone.IsValid())
{
decisionZone = tmpZone;
}
}
//
if (!decisionZone.IsValid())
tmpZone.Clean();
config.ConfigureSarRsiTrendFilter();
hasSarRsiTrendFiltered = DetectTriggerBlock(
tmpZone,
conditions,
helper,
config,
zIndex,
loopback //
);
if (hasSarRsiTrendFiltered)
{
decisionZone = tmpZone;
//
pushers++;
//
if (!decisionZone.IsValid())
{
decisionZone = tmpZone;
}
}
//
tmpZone.Clean();
config.ConfigureSarAdxTrendFilter();
hasSarAdxTrendFiltered = DetectTriggerBlock(
tmpZone,
conditions,
helper,
config,
zIndex,
loopback //
);
if (hasSarAdxTrendFiltered)
{
//
pushers++;
//
if (!decisionZone.IsValid())
{
decisionZone = tmpZone;
}
}
//
tmpZone.Clean();
config.ConfigureRsiAdxTrendFilter();
hasRsiAdxTrendFiltered = DetectTriggerBlock(
tmpZone,
conditions,
helper,
config,
zIndex,
loopback //
);
if (hasRsiAdxTrendFiltered)
{
//
pushers++;
//
if (!decisionZone.IsValid())
{
decisionZone = tmpZone;
}
}
}
//
tmpZone.Clean();
config.ConfigureSarRsiTrendFilter();
bool hasSarRsiTrendFiltered = DetectTriggerBlock(
tmpZone,
conditions,
helper,
config,
zIndex,
loopback //
);
if (hasSarRsiTrendFiltered)
// Check two Filters ...
if (allowTwoFilters)
{
//
pushers++;
//
if (!decisionZone.IsValid())
tmpZone.Clean();
config.ConfigureSarRsiFilter();
hasSarRsiFiltered = DetectTriggerBlock(
tmpZone,
conditions,
helper,
config,
zIndex,
loopback //
);
if (hasSarRsiFiltered)
{
decisionZone = tmpZone;
//
pushers++;
//
if (!decisionZone.IsValid())
{
decisionZone = tmpZone;
}
}
}
//
tmpZone.Clean();
config.ConfigureSarAdxTrendFilter();
bool hasSarAdxTrendFiltered = DetectTriggerBlock(
tmpZone,
conditions,
helper,
config,
zIndex,
loopback //
);
if (hasSarAdxTrendFiltered)
{
//
pushers++;
//
if (!decisionZone.IsValid())
tmpZone.Clean();
config.ConfigureSarAdxFilter();
hasSarAdxFiltered = DetectTriggerBlock(
tmpZone,
conditions,
helper,
config,
zIndex,
loopback //
);
if (hasSarAdxFiltered)
{
decisionZone = tmpZone;
//
pushers++;
//
if (!decisionZone.IsValid())
{
decisionZone = tmpZone;
}
}
}
//
tmpZone.Clean();
config.ConfigureRsiAdxTrendFilter();
bool hasRsiAdxTrendFiltered = DetectTriggerBlock(
tmpZone,
conditions,
helper,
config,
zIndex,
loopback //
);
if (hasRsiAdxTrendFiltered)
{
//
pushers++;
//
if (!decisionZone.IsValid())
tmpZone.Clean();
config.ConfigureSarTrendFilter();
hasSarTrendFiltered = DetectTriggerBlock(
tmpZone,
conditions,
helper,
config,
zIndex,
loopback //
);
if (hasSarTrendFiltered)
{
decisionZone = tmpZone;
//
pushers++;
//
if (!decisionZone.IsValid())
{
decisionZone = tmpZone;
}
}
}
//
tmpZone.Clean();
config.ConfigureSarRsiFilter();
bool hasSarRsiFiltered = DetectTriggerBlock(
tmpZone,
conditions,
helper,
config,
zIndex,
loopback //
);
if (hasSarRsiFiltered)
{
//
pushers++;
//
if (!decisionZone.IsValid())
tmpZone.Clean();
config.ConfigureRsiAdxFilter();
hasRsiAdxFiltered = DetectTriggerBlock(
tmpZone,
conditions,
helper,
config,
zIndex,
loopback //
);
if (hasRsiAdxFiltered)
{
decisionZone = tmpZone;
//
pushers++;
//
if (!decisionZone.IsValid())
{
decisionZone = tmpZone;
}
}
}
//
tmpZone.Clean();
config.ConfigureSarAdxFilter();
bool hasSarAdxFiltered = DetectTriggerBlock(
tmpZone,
conditions,
helper,
config,
zIndex,
loopback //
);
if (hasSarAdxFiltered)
{
//
pushers++;
//
if (!decisionZone.IsValid())
tmpZone.Clean();
config.ConfigureRsiTrendFilter();
hasRsiTrendFiltered = DetectTriggerBlock(
tmpZone,
conditions,
helper,
config,
zIndex,
loopback //
);
if (hasRsiTrendFiltered)
{
decisionZone = tmpZone;
//
pushers++;
//
if (!decisionZone.IsValid())
{
decisionZone = tmpZone;
}
}
}
//
tmpZone.Clean();
config.ConfigureSarTrendFilter();
bool hasSarTrendFiltered = DetectTriggerBlock(
tmpZone,
conditions,
helper,
config,
zIndex,
loopback //
);
if (hasSarTrendFiltered)
{
//
pushers++;
//
if (!decisionZone.IsValid())
tmpZone.Clean();
config.ConfigureAdxTrendFilter();
hasAdxTrendFiltered = DetectTriggerBlock(
tmpZone,
conditions,
helper,
config,
zIndex,
loopback //
);
if (hasAdxTrendFiltered)
{
decisionZone = tmpZone;
}
}
//
pushers++;
//
tmpZone.Clean();
config.ConfigureRsiAdxFilter();
bool hasRsiAdxFiltered = DetectTriggerBlock(
tmpZone,
conditions,
helper,
config,
zIndex,
loopback //
);
if (hasRsiAdxFiltered)
{
//
pushers++;
//
if (!decisionZone.IsValid())
{
decisionZone = tmpZone;
}
}
//
tmpZone.Clean();
config.ConfigureRsiTrendFilter();
bool hasRsiTrendFiltered = DetectTriggerBlock(
tmpZone,
conditions,
helper,
config,
zIndex,
loopback //
);
if (hasRsiTrendFiltered)
{
//
pushers++;
//
if (!decisionZone.IsValid())
{
decisionZone = tmpZone;
}
}
//
tmpZone.Clean();
config.ConfigureAdxTrendFilter();
bool hasAdxTrendFiltered = DetectTriggerBlock(
tmpZone,
conditions,
helper,
config,
zIndex,
loopback //
);
if (hasAdxTrendFiltered)
{
//
pushers++;
//
if (!decisionZone.IsValid())
{
decisionZone = tmpZone;
//
if (!decisionZone.IsValid())
{
decisionZone = tmpZone;
}
}
}
@@ -1214,7 +1243,7 @@ class XCXCAEASignaller : XCBase
inputs.x3maInputs.fastLength = 5;
//
inputs.x3maInputs.showFast = true;
inputs.x3maInputs.showFast = false;
inputs.x3maInputs.showSlow = false;
inputs.x3maInputs.showMedium = false;
@@ -1235,16 +1264,16 @@ class XCXCAEASignaller : XCBase
inputs.caInputs.showMAH = false;
inputs.caInputs.showMAL = false;
inputs.caInputs.showMAC = false;
inputs.caInputs.showSar = true;
inputs.caInputs.showSar = false;
inputs.caInputs.showVidya = false;
inputs.caInputs.showTrend = true;
inputs.caInputs.showSwings = true;
inputs.caInputs.showTrend = false;
inputs.caInputs.showSwings = false;
inputs.caInputs.showFiboLevel1 = false;
inputs.caInputs.showFiboLevel2 = false;
inputs.caInputs.showFiboLevel3 = false;
inputs.caInputs.showFiboLevel4 = false;
inputs.caInputs.showFiboLevel5 = false;
inputs.caInputs.showPeaksAndVales = true;
inputs.caInputs.showPeaksAndVales = false;
inputs.caInputs.showPeakAndValeGolden = false;
inputs.caInputs.showSupportAndResistance = false;