last works on XCZone test EA ...
This commit is contained in:
+41
-4
@@ -15,6 +15,12 @@
|
||||
#include "../XCAEA/Helpers/xcaea.helper.mq5"
|
||||
#include "../XCAEA/Libraries/xcaea.trigger.block.lib.mq5"
|
||||
|
||||
//
|
||||
// Inputs ...
|
||||
input group "Signals";
|
||||
input double eaSLAdditionalPoint = 0.0; // Additional SL in Point
|
||||
input double eaSLATRMultiplier = 0.0; // Additional SL using ATR Multiplier
|
||||
|
||||
//
|
||||
// Variables ...
|
||||
XCAEAInputs eaInputs;
|
||||
@@ -22,7 +28,7 @@ XCXCAEAHelper *eaHelper;
|
||||
XBarTracker eaBarTraker;
|
||||
|
||||
//
|
||||
CArrayObj eaObjects;
|
||||
CArrayObj *eaObjects;
|
||||
|
||||
//+------------------------------------------------------------------+
|
||||
//| Expert initialization function |
|
||||
@@ -36,6 +42,10 @@ int OnInit()
|
||||
_Period //
|
||||
);
|
||||
|
||||
//
|
||||
// Objects ...
|
||||
eaObjects = new CArrayObj();
|
||||
|
||||
//
|
||||
// Configure XCA ...
|
||||
eaInputs.Default();
|
||||
@@ -46,7 +56,7 @@ int OnInit()
|
||||
|
||||
//
|
||||
// we Can make Show all requirements here ...
|
||||
eaInputs.caInputs.showSar = true;
|
||||
eaInputs.caInputs.showSar = false;
|
||||
|
||||
//
|
||||
eaHelper = new XCXCAEAHelper();
|
||||
@@ -153,6 +163,30 @@ void OnTick()
|
||||
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(
|
||||
@@ -160,7 +194,9 @@ void OnTick()
|
||||
eaHelper,
|
||||
tbConfig,
|
||||
zBar.Index(),
|
||||
10 //
|
||||
10,
|
||||
eaSLAdditionalPoint,
|
||||
eaSLATRMultiplier //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
@@ -181,7 +217,8 @@ void OnTick()
|
||||
}
|
||||
|
||||
//
|
||||
Print("Trigger Block Detected ...");
|
||||
string message = tb.signal.GetMessage("Provided");
|
||||
Print(message);
|
||||
}
|
||||
tb.Clean();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user