last ...
This commit is contained in:
@@ -51,6 +51,8 @@ class XCXCAEASignaller : XCBase
|
||||
XCXCAEAHelper *analyseHelper;
|
||||
XCXCAEAPOIDetector *detector;
|
||||
XCAEAStrategyConditions mConditions;
|
||||
bool allowAnalyseDecisionZoneSignalling;
|
||||
bool allowTriggerBlockDecisionZoneSignalling;
|
||||
XCAEAStrategyConditions mConditionsCollection[];
|
||||
|
||||
//
|
||||
@@ -92,6 +94,11 @@ class XCXCAEASignaller : XCBase
|
||||
allowDrawPOIs = false;
|
||||
maxAllowedSetupAge = 576;
|
||||
|
||||
//
|
||||
// Signallings ...
|
||||
allowAnalyseDecisionZoneSignalling = false;
|
||||
allowTriggerBlockDecisionZoneSignalling = true;
|
||||
|
||||
//
|
||||
// Initial Bar Tracker ...
|
||||
barTraker.Init(
|
||||
@@ -166,13 +173,16 @@ class XCXCAEASignaller : XCBase
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool DetectSignalSetup(
|
||||
double tpReward = 3,
|
||||
double maxAllowedSLDistanceInPoint = 100 //
|
||||
double tpReward = 3 //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize Args ...
|
||||
tpReward = NormalizeDouble(tpReward, 1);
|
||||
|
||||
//
|
||||
// Check Bar Processing ...
|
||||
if (!barTraker.CanProcessBar())
|
||||
@@ -181,59 +191,30 @@ class XCXCAEASignaller : XCBase
|
||||
}
|
||||
|
||||
//
|
||||
int idx = -1;
|
||||
int count = 0;
|
||||
int zIndex = 0;
|
||||
bool has = false;
|
||||
int loopback = 10;
|
||||
bool isBullish = false;
|
||||
bool isBearish = false;
|
||||
|
||||
//
|
||||
int zIndex = 0;
|
||||
int cIndex = zIndex + 1;
|
||||
int pIndex = cIndex + 1;
|
||||
int p2Index = pIndex + 1;
|
||||
|
||||
//
|
||||
int loopback = 10;
|
||||
|
||||
//
|
||||
int idx = -1;
|
||||
int count = 0;
|
||||
bool has = false;
|
||||
|
||||
//
|
||||
double ask = GetAsk(symbol);
|
||||
double bid = GetBid(symbol);
|
||||
datetime cTime = TimeCurrent();
|
||||
double points = GetPoints(symbol);
|
||||
|
||||
//
|
||||
XOHCL zBar;
|
||||
XOHCL cBar;
|
||||
XOHCL pBar;
|
||||
XOHCL pPBar;
|
||||
result = zBar.Init(
|
||||
symbol,
|
||||
period,
|
||||
zIndex //
|
||||
);
|
||||
result =
|
||||
result &&
|
||||
zBar.GetPreviousBar(cBar);
|
||||
result =
|
||||
result &&
|
||||
cBar.GetPreviousBar(pBar);
|
||||
result =
|
||||
result &&
|
||||
pBar.GetPreviousBar(pPBar);
|
||||
if (!result)
|
||||
{
|
||||
//
|
||||
zBar.Clean();
|
||||
cBar.Clean();
|
||||
pBar.Clean();
|
||||
pPBar.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
datetime cTime = zBar.time;
|
||||
|
||||
//
|
||||
// Detect Pivots ...
|
||||
@@ -262,23 +243,42 @@ class XCXCAEASignaller : XCBase
|
||||
ENUM_X_DIRECTION decisionZoneDir = X_DIRECTION_NONE;
|
||||
|
||||
//
|
||||
// Checking Signal's Decision Zone ...
|
||||
// On Analyse Time Frame ...
|
||||
hasDecisionZone = DetectDecisionZone(
|
||||
analyseHelper,
|
||||
drawer,
|
||||
decisionZone,
|
||||
decisionZoneDir,
|
||||
unavailables,
|
||||
conditions,
|
||||
zIndex,
|
||||
loopback //
|
||||
);
|
||||
// Check Decision Zone Detection Based On Several Signalling ...
|
||||
|
||||
//
|
||||
// Analyse DecisionZone ...
|
||||
// In this Used Case we fond an Analyse TF OB
|
||||
// then waits for trigger on it ...
|
||||
if (allowAnalyseDecisionZoneSignalling)
|
||||
{
|
||||
//
|
||||
// Checking Signal's Decision Zone ...
|
||||
// On Analyse Time Frame ...
|
||||
hasDecisionZone = DetectDecisionZone(
|
||||
analyseHelper,
|
||||
drawer,
|
||||
decisionZone,
|
||||
decisionZoneDir,
|
||||
unavailables,
|
||||
conditions,
|
||||
zIndex,
|
||||
loopback //
|
||||
);
|
||||
|
||||
//
|
||||
// Here we Can Validate Decision Zone ...
|
||||
if (hasDecisionZone)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Here we Can Validate Decision Zone ...
|
||||
if (hasDecisionZone)
|
||||
{
|
||||
// TriggerBlock Decision Zone ...
|
||||
// In this Used Case we found a Tigger Block and use it
|
||||
// for Triggering ...
|
||||
if (!hasDecisionZone &&
|
||||
allowTriggerBlockDecisionZoneSignalling) {
|
||||
//
|
||||
}
|
||||
|
||||
//
|
||||
@@ -339,11 +339,6 @@ class XCXCAEASignaller : XCBase
|
||||
|
||||
//
|
||||
zBar.Clean();
|
||||
cBar.Clean();
|
||||
pBar.Clean();
|
||||
pPBar.Clean();
|
||||
|
||||
//
|
||||
conditions.Clean();
|
||||
decisionZone.Clean();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user