This commit is contained in:
2025-05-21 18:57:44 +03:30
parent 3e29a557bf
commit 8f6d0f9889
7 changed files with 1197 additions and 102 deletions
+1 -101
View File
@@ -6,7 +6,7 @@
#property copyright "Copyright 2023, SaherElm IT Center"
#property link "https://saherelm.ir"
#property version "1.00"
#property description "EA based on X121 XCA and X3MA indicators"
#property description "EA based on X121 XCZone indicators"
#property strict
//
@@ -17,9 +17,6 @@
//
// Inputs ...
input group "Signals";
input double eaSLAdditionalPoint = 0.0; // Additional SL in Point
input double eaSLATRMultiplier = 0.0; // Additional SL using ATR Multiplier
//
// Variables ...
@@ -105,11 +102,6 @@ void OnTick()
//
bool has = false;
//
// Required Chart Identification ...
ulong chartId = eaHelper.poiDrawer.ChartIdentification();
int subWindow = eaHelper.poiDrawer.SubWindowIdentification();
//
// Retrieve Bars ...
XOHCL zBar;
@@ -132,96 +124,6 @@ void OnTick()
return;
}
//
// Define Trigger Block ...
XTriggerBlock tb;
XCAEATriggerBlockConfiguration tbConfig;
//
// Configure Detector ...
//
// Validation ...
tbConfig.maxAllowedRange = 0.0;
tbConfig.minAllowedBlockEdgeLength = 7;
//
// Validation ...
tbConfig.forceFVGBarType = true;
tbConfig.forceHasSwingBar = true;
tbConfig.forceOBOppositBar = true;
tbConfig.forceHasLiquidity = false;
tbConfig.forceGapBarBreakout = true;
tbConfig.forceHasReversalLiquidity = true;
//
// Filters ...
tbConfig.filterBasedOnSar = true;
tbConfig.filterBasedOnADX = true;
tbConfig.filterBasedOnRSI = true;
tbConfig.filterBasedOnTrend = true;
tbConfig.filterBasedOnScores = true;
tbConfig.filterBasedOnVolumes = true;
//
// Targets ...
double targets[] = {
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
};
Copy(
targets,
tbConfig.targets //
);
//
// Do Detection ...
has = DetectTriggerBlock(
tb,
eaHelper,
tbConfig,
zBar.Index(),
10,
eaSLAdditionalPoint,
eaSLATRMultiplier //
);
if (has)
{
//
CArrayObj *tObjects;
tObjects = new CArrayObj();
//
has = DrawTriggerBlock(
tb,
tObjects,
eaHelper,
zBar.time //
);
if (has)
{
AddObjects(tObjects, eaObjects);
}
//
string message = tb.signal.GetMessage("Provided");
Print(message);
}
tb.Clean();
//
// Do What we Want ...
// When we Need Waits Until Next Bar ...
@@ -231,8 +133,6 @@ void OnTick()
// Cleanup Resources ...
//
tb.Clean();
zBar.Clean();
cBar.Clean();
tbConfig.Clean();
}
File diff suppressed because it is too large Load Diff