last works ...
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -4002,7 +4002,7 @@ class XCXFIMAHelperParser : XCBase
|
||||
{
|
||||
//
|
||||
// Define Requirements ...
|
||||
|
||||
|
||||
//
|
||||
datetime toTime = NULL;
|
||||
datetime fromTime = NULL;
|
||||
@@ -5121,7 +5121,7 @@ class XCXFIMAHelperParser : XCBase
|
||||
{
|
||||
//
|
||||
// Define Requirements ...
|
||||
|
||||
|
||||
//
|
||||
datetime toTime = NULL;
|
||||
datetime fromTime = NULL;
|
||||
@@ -6240,7 +6240,7 @@ class XCXFIMAHelperParser : XCBase
|
||||
{
|
||||
//
|
||||
// Define Requirements ...
|
||||
|
||||
|
||||
//
|
||||
datetime toTime = NULL;
|
||||
datetime fromTime = NULL;
|
||||
@@ -7359,7 +7359,7 @@ class XCXFIMAHelperParser : XCBase
|
||||
{
|
||||
//
|
||||
// Define Requirements ...
|
||||
|
||||
|
||||
//
|
||||
datetime toTime = NULL;
|
||||
datetime fromTime = NULL;
|
||||
@@ -7467,6 +7467,158 @@ class XCXFIMAHelperParser : XCBase
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve Cycles MA(s) ...
|
||||
*
|
||||
* @param scMA: double, reference to holds cycle value ...
|
||||
* @param mcMA: double, reference to holds cycle value ...
|
||||
* @param lcMA: double, reference to holds cycle value ...
|
||||
* @param hcMA: double, reference to holds cycle value ...
|
||||
* @param barIndex: int, Specified Bar Index ...
|
||||
*/
|
||||
void GetCycleMAs(
|
||||
double &scMA,
|
||||
double &mcMA,
|
||||
double &lcMA,
|
||||
double &hcMA,
|
||||
int barIndex = 0 //
|
||||
)
|
||||
{
|
||||
//
|
||||
// Prepare ...
|
||||
scMA = EMPTY_VALUE;
|
||||
mcMA = EMPTY_VALUE;
|
||||
lcMA = EMPTY_VALUE;
|
||||
hcMA = EMPTY_VALUE;
|
||||
|
||||
//
|
||||
// Normalize ...
|
||||
barIndex = NormalizeBarIndex(barIndex);
|
||||
|
||||
//
|
||||
// Validate ...
|
||||
bool has = IsValid();
|
||||
if (!has)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
scMA = helper.GetSCMA(barIndex);
|
||||
mcMA = helper.GetMCMA(barIndex);
|
||||
lcMA = helper.GetLCMA(barIndex);
|
||||
hcMA = helper.GetHCMA(barIndex);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve Cycles MA State(s) ...
|
||||
*
|
||||
* @param scMAState: double, reference to holds cycle value ...
|
||||
* @param mcMAState: double, reference to holds cycle value ...
|
||||
* @param lcMAState: double, reference to holds cycle value ...
|
||||
* @param hcMAState: double, reference to holds cycle value ...
|
||||
* @param barIndex: int, Specified Bar Index ...
|
||||
*/
|
||||
void GetCycleMAStates(
|
||||
double &scMAState,
|
||||
double &mcMAState,
|
||||
double &lcMAState,
|
||||
double &hcMAState,
|
||||
int barIndex = 0 //
|
||||
)
|
||||
{
|
||||
//
|
||||
// Prepare ...
|
||||
scMAState = EMPTY_VALUE;
|
||||
mcMAState = EMPTY_VALUE;
|
||||
lcMAState = EMPTY_VALUE;
|
||||
hcMAState = EMPTY_VALUE;
|
||||
|
||||
//
|
||||
// Normalize ...
|
||||
barIndex = NormalizeBarIndex(barIndex);
|
||||
|
||||
//
|
||||
// Validate ...
|
||||
bool has = IsValid();
|
||||
if (!has)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
scMAState = helper.GetSCMAState(barIndex);
|
||||
mcMAState = helper.GetMCMAState(barIndex);
|
||||
lcMAState = helper.GetLCMAState(barIndex);
|
||||
hcMAState = helper.GetHCMAState(barIndex);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check Cycle Hind and Long is Bullish or not ...
|
||||
*
|
||||
* @param barIndex: int, Specified Bar Index ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool IsCycleMABullish(int barIndex = 0)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize ...
|
||||
barIndex = NormalizeBarIndex(barIndex);
|
||||
|
||||
//
|
||||
// Validate ...
|
||||
result = IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result =
|
||||
IsLCMABullish(barIndex) &&
|
||||
IsHCMABullish(barIndex);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check Cycle Hind and Long is Bearish or not ...
|
||||
*
|
||||
* @param barIndex: int, Specified Bar Index ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool IsCycleMABearish(int barIndex = 0)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normalize ...
|
||||
barIndex = NormalizeBarIndex(barIndex);
|
||||
|
||||
//
|
||||
// Validate ...
|
||||
result = IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result =
|
||||
IsLCMABearish(barIndex) &&
|
||||
IsHCMABearish(barIndex);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Boundary Tools ...
|
||||
// =============================
|
||||
|
||||
@@ -298,6 +298,13 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
|
||||
drawResistance = true;
|
||||
drawIResistance = true;
|
||||
|
||||
//
|
||||
manageLegs = true;
|
||||
manageZones = true;
|
||||
manageIZones = true;
|
||||
manageTrends = false;
|
||||
manageOrderFlow = true;
|
||||
|
||||
//
|
||||
structureConfig.Default();
|
||||
structureDrawConfig.Default();
|
||||
@@ -632,6 +639,7 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
|
||||
|
||||
XLeg leg; // Exists Leg ...
|
||||
bool drawLeg; // Draw Leg ...
|
||||
bool manageLegs;
|
||||
|
||||
//
|
||||
bool HasLeg()
|
||||
@@ -756,6 +764,7 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
|
||||
//
|
||||
bool drawOrderFlow;
|
||||
XBoxZone orderFlow[];
|
||||
bool manageOrderFlow;
|
||||
ENUM_X_DIRECTION orderFlowDir;
|
||||
|
||||
//
|
||||
@@ -943,6 +952,7 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
|
||||
XBoxZone resistance;
|
||||
bool drawZones;
|
||||
bool drawSupport;
|
||||
bool manageZones;
|
||||
bool drawResistance;
|
||||
|
||||
//
|
||||
@@ -1214,6 +1224,7 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
|
||||
XBoxZone iResistance;
|
||||
bool drawIZones;
|
||||
bool drawISupport;
|
||||
bool manageIZones;
|
||||
bool drawIResistance;
|
||||
|
||||
//
|
||||
@@ -1385,6 +1396,7 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
|
||||
bool drawMCTrend;
|
||||
bool drawLCTrend;
|
||||
bool drawHCTrend;
|
||||
bool manageTrends;
|
||||
|
||||
//
|
||||
bool HasTrend()
|
||||
@@ -1552,10 +1564,10 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
|
||||
|
||||
//
|
||||
// Signaller Flags ...
|
||||
bool useSignaller1 = false;
|
||||
bool useSignaller1 = true;
|
||||
bool useSignaller2 = false;
|
||||
bool useSignaller3 = true;
|
||||
bool useSignaller4 = true;
|
||||
bool useSignaller3 = false;
|
||||
bool useSignaller4 = false;
|
||||
|
||||
//
|
||||
// Validator Flags ...
|
||||
@@ -1600,82 +1612,154 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
|
||||
// Analyse Market Strucutre ...
|
||||
XFIMAMarketStructure marketStructure;
|
||||
|
||||
//
|
||||
// Signal Detection Flags ...
|
||||
|
||||
//
|
||||
XBoxZone tmpZone;
|
||||
ENUM_X_DIRECTION tmpDir;
|
||||
|
||||
//
|
||||
bool signaller1HasSignal = false;
|
||||
bool signaller2HasSignal = false;
|
||||
bool signaller3HasSignal = false;
|
||||
bool signaller4HasSignal = false;
|
||||
|
||||
//
|
||||
// Signaller 1 ...
|
||||
if (!result && useSignaller1)
|
||||
if (useSignaller1)
|
||||
{
|
||||
//
|
||||
result = Strategy1HasSignal(
|
||||
signaller1HasSignal = Strategy1HasSignal(
|
||||
bar,
|
||||
zone,
|
||||
tmpZone,
|
||||
targets,
|
||||
dir //
|
||||
tmpDir //
|
||||
);
|
||||
|
||||
//
|
||||
if (result)
|
||||
if (signaller1HasSignal)
|
||||
{
|
||||
provider = "1";
|
||||
//
|
||||
provider += "1";
|
||||
|
||||
//
|
||||
if (!zone.IsValid())
|
||||
{
|
||||
//
|
||||
dir = tmpDir;
|
||||
zone = tmpZone;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
tmpZone.Clean();
|
||||
tmpDir = X_DIRECTION_NONE;
|
||||
}
|
||||
|
||||
//
|
||||
// Signaller 2 ...
|
||||
if (!result && useSignaller2)
|
||||
if (useSignaller2)
|
||||
{
|
||||
//
|
||||
result = Strategy2HasSignal(
|
||||
signaller2HasSignal = Strategy2HasSignal(
|
||||
bar,
|
||||
zone,
|
||||
tmpZone,
|
||||
targets,
|
||||
dir //
|
||||
tmpDir //
|
||||
);
|
||||
|
||||
//
|
||||
if (result)
|
||||
if (signaller2HasSignal)
|
||||
{
|
||||
provider = "2";
|
||||
//
|
||||
provider += "2";
|
||||
|
||||
//
|
||||
if (!zone.IsValid())
|
||||
{
|
||||
//
|
||||
dir = tmpDir;
|
||||
zone = tmpZone;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
tmpZone.Clean();
|
||||
tmpDir = X_DIRECTION_NONE;
|
||||
}
|
||||
|
||||
//
|
||||
// Signaller 3 ...
|
||||
if (!result && useSignaller3)
|
||||
if (useSignaller3)
|
||||
{
|
||||
//
|
||||
result = Strategy3HasSignal(
|
||||
signaller3HasSignal = Strategy3HasSignal(
|
||||
bar,
|
||||
zone,
|
||||
tmpZone,
|
||||
targets,
|
||||
dir //
|
||||
tmpDir //
|
||||
);
|
||||
|
||||
//
|
||||
if (result)
|
||||
if (signaller3HasSignal)
|
||||
{
|
||||
provider = "3";
|
||||
//
|
||||
provider += "3";
|
||||
|
||||
//
|
||||
if (!zone.IsValid())
|
||||
{
|
||||
//
|
||||
dir = tmpDir;
|
||||
zone = tmpZone;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
tmpZone.Clean();
|
||||
tmpDir = X_DIRECTION_NONE;
|
||||
}
|
||||
|
||||
//
|
||||
// Signaller 4 ...
|
||||
if (!result && useSignaller4)
|
||||
if (useSignaller4)
|
||||
{
|
||||
//
|
||||
result = Strategy4HasSignal(
|
||||
signaller4HasSignal = Strategy4HasSignal(
|
||||
bar,
|
||||
zone,
|
||||
tmpZone,
|
||||
targets,
|
||||
dir //
|
||||
tmpDir //
|
||||
);
|
||||
|
||||
//
|
||||
if (result)
|
||||
if (signaller4HasSignal)
|
||||
{
|
||||
provider = "4";
|
||||
//
|
||||
provider += "4";
|
||||
|
||||
//
|
||||
if (!zone.IsValid())
|
||||
{
|
||||
//
|
||||
dir = tmpDir;
|
||||
zone = tmpZone;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
tmpZone.Clean();
|
||||
tmpDir = X_DIRECTION_NONE;
|
||||
}
|
||||
|
||||
//
|
||||
// Summarize Signallers Result ...
|
||||
result = signaller1HasSignal ||
|
||||
signaller2HasSignal ||
|
||||
signaller3HasSignal ||
|
||||
signaller4HasSignal;
|
||||
|
||||
//
|
||||
// Signal Validating ...
|
||||
|
||||
@@ -1849,6 +1933,7 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
|
||||
|
||||
//
|
||||
// Draw Market Structure ...
|
||||
|
||||
//
|
||||
// Analyse Market Structure if Required ...
|
||||
if (!marketStructure.IsValid())
|
||||
@@ -1898,6 +1983,7 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
|
||||
|
||||
//
|
||||
// Other Drawing Materials ...
|
||||
Print("Signaller Providers: ", provider);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -1912,6 +1998,7 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
|
||||
|
||||
//
|
||||
// Cleanup ...
|
||||
tmpZone.Clean();
|
||||
iDrawConfig.Clean();
|
||||
marketStructure.Clean();
|
||||
|
||||
@@ -2197,7 +2284,20 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
|
||||
}
|
||||
|
||||
/**
|
||||
* Check Bar Has Signal Based on Strategy 3 ...
|
||||
* Check Bar Has Signal Based on Strategy 2 ...
|
||||
*
|
||||
* Strategy 2:
|
||||
* ===========
|
||||
* - Works Based On PBar Patterns Focused on PinBar ...
|
||||
* - Looking for a Bar Directional Pattern Happens ...
|
||||
* - Validate Fast Ma Over/Under Slow ...
|
||||
* - Validate P2Peak/Vale doesnt Under or Over Last (InDirectional) ...
|
||||
* - Validate P2Bar Has Directional Market Strucuture Zone (OB, FVG, Support/Resistance) ...
|
||||
*
|
||||
* Manipulations:
|
||||
* ================
|
||||
* there are Some Flags properties to Change Validations in Strategy ...
|
||||
* we can use them for Testing Purposes ...
|
||||
*
|
||||
* @param bar: XOHCL, reference to Bar ...
|
||||
* @param zone: XBoxZone, reference to holds affected zone ...
|
||||
@@ -2236,6 +2336,7 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
|
||||
//
|
||||
XOHCL pBar;
|
||||
XOHCL p2Bar;
|
||||
XOHCL p3Bar;
|
||||
bool isBullish = false;
|
||||
bool isBearish = false;
|
||||
|
||||
@@ -2244,11 +2345,14 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
|
||||
result = bar.GetPreviousBar(pBar);
|
||||
result = result &&
|
||||
pBar.GetPreviousBar(p2Bar);
|
||||
result = result &&
|
||||
p2Bar.GetPreviousBar(p3Bar);
|
||||
if (!result)
|
||||
{
|
||||
//
|
||||
pBar.Clean();
|
||||
p2Bar.Clean();
|
||||
p3Bar.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -2256,37 +2360,59 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
|
||||
|
||||
//
|
||||
// Reading pBar Patterns ...
|
||||
XPatternAnalysis pBarAnalysis;
|
||||
XPatternAnalysis pBarPatterns;
|
||||
poiDetector.AnalyseBarPatterns(
|
||||
pBar,
|
||||
pBarAnalysis,
|
||||
pBarPatterns,
|
||||
structureConfig.barsAnalysisConfig //
|
||||
);
|
||||
bool hasSupport = pBarPatterns.IsSupport();
|
||||
bool hasResistance = pBarPatterns.IsResistance();
|
||||
|
||||
//
|
||||
// Check Boundary Trend ...
|
||||
XTrend boundaryTrend;
|
||||
bool hasBoundaryTrend = fimaParser.HasBoundaryTrend(boundaryTrend, pBar.Index());
|
||||
bool hasBoundaryBullishTrend = hasBoundaryTrend && boundaryTrend.IsBullish();
|
||||
bool hasBoundaryBearishTrend = hasBoundaryTrend && boundaryTrend.IsBearish();
|
||||
|
||||
//
|
||||
// Check Bar Patterns ...
|
||||
|
||||
//
|
||||
// Bars Sequences ...
|
||||
bool hasBullishSequence = p3Bar.IsBearish() &&
|
||||
pBar.IsBullish();
|
||||
bool hasBearishSequence = p3Bar.IsBullish() &&
|
||||
pBar.IsBearish();
|
||||
|
||||
//
|
||||
// Bullish ...
|
||||
bool isPBarHasBullishPatterns =
|
||||
(bar.close > pBar.low ||
|
||||
bar.open > pBar.low) &&
|
||||
(
|
||||
//
|
||||
pBarAnalysis.IsPinned(X_DIRECTION_BULLISH) ||
|
||||
pBarAnalysis.IsEngulfed(X_DIRECTION_BULLISH) ||
|
||||
pBarAnalysis.IsMomentum(X_DIRECTION_BULLISH) ||
|
||||
pBarAnalysis.IsPiercing(X_DIRECTION_BULLISH) ||
|
||||
pBarAnalysis.IsSignalKey(X_DIRECTION_BULLISH)
|
||||
pBarPatterns.IsPinned(X_DIRECTION_BULLISH) ||
|
||||
pBarPatterns.IsEngulfed(X_DIRECTION_BULLISH) ||
|
||||
pBarPatterns.IsMomentum(X_DIRECTION_BULLISH) ||
|
||||
pBarPatterns.IsPiercing(X_DIRECTION_BULLISH) ||
|
||||
pBarPatterns.IsSignalKey(X_DIRECTION_BULLISH)
|
||||
//
|
||||
);
|
||||
|
||||
//
|
||||
// Bearish ...
|
||||
bool isPBarHasBearishPatterns =
|
||||
(bar.close < pBar.high ||
|
||||
bar.open < pBar.high) &&
|
||||
(
|
||||
//
|
||||
pBarAnalysis.IsPinned(X_DIRECTION_BEARISH) ||
|
||||
pBarAnalysis.IsEngulfed(X_DIRECTION_BEARISH) ||
|
||||
pBarAnalysis.IsMomentum(X_DIRECTION_BEARISH) ||
|
||||
pBarAnalysis.IsPiercing(X_DIRECTION_BEARISH) ||
|
||||
pBarAnalysis.IsSignalKey(X_DIRECTION_BEARISH)
|
||||
pBarPatterns.IsPinned(X_DIRECTION_BEARISH) ||
|
||||
pBarPatterns.IsEngulfed(X_DIRECTION_BEARISH) ||
|
||||
pBarPatterns.IsMomentum(X_DIRECTION_BEARISH) ||
|
||||
pBarPatterns.IsPiercing(X_DIRECTION_BEARISH) ||
|
||||
pBarPatterns.IsSignalKey(X_DIRECTION_BEARISH)
|
||||
//
|
||||
);
|
||||
|
||||
@@ -2329,17 +2455,34 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
|
||||
isP2BarPinned &&
|
||||
IsXBearish(p2Dir);
|
||||
|
||||
//
|
||||
// Check Based On LC and HC MA State ...
|
||||
|
||||
//
|
||||
bool isLCMABullish = fimaParser.IsLCMABullish(pBar.Index());
|
||||
bool isHCMABullish = fimaParser.IsHCMABullish(pBar.Index());
|
||||
bool isCycleMABullish = isLCMABullish && isHCMABullish;
|
||||
|
||||
//
|
||||
bool isLCMABearish = fimaParser.IsLCMABearish(pBar.Index());
|
||||
bool isHCMABearish = fimaParser.IsHCMABearish(pBar.Index());
|
||||
bool isCycleMABearish = isLCMABearish && isHCMABearish;
|
||||
|
||||
//
|
||||
// Do ...
|
||||
|
||||
//
|
||||
isBullish =
|
||||
//
|
||||
hasSupport &&
|
||||
isFastOverLast &&
|
||||
isValeUnderLast &&
|
||||
isCycleMABullish &&
|
||||
hasBullishSequence &&
|
||||
!isP2PeakUnderLast &&
|
||||
isPBarCloseOverFast &&
|
||||
isP2BarBullishPinned &&
|
||||
hasBoundaryBullishTrend &&
|
||||
isPBarHasBullishPatterns
|
||||
//
|
||||
;
|
||||
@@ -2347,11 +2490,15 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
|
||||
//
|
||||
isBearish =
|
||||
//
|
||||
hasResistance &&
|
||||
isPeakOverLast &&
|
||||
isFastUnderLast &&
|
||||
isCycleMABearish &&
|
||||
!isP2ValeOverLast &&
|
||||
hasBearishSequence &&
|
||||
isPBarCloseUnderFast &&
|
||||
isP2BarBearishPinned &&
|
||||
hasBoundaryBearishTrend &&
|
||||
isPBarHasBearishPatterns
|
||||
//
|
||||
;
|
||||
@@ -2386,61 +2533,19 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
|
||||
);
|
||||
|
||||
//
|
||||
// Manage Stops ...
|
||||
// Draws ...
|
||||
if (result)
|
||||
{
|
||||
//
|
||||
double entry = GetEntry(zone.symbol, zone.dir);
|
||||
double riskSide = zone.IsBullish() ? zone.lower : zone.upper;
|
||||
double risk = MathAbs(entry - riskSide);
|
||||
// XPOIDrawConfig iConfig = structureDrawConfig.drawConfig;
|
||||
// iConfig.trendRayLeft = false;
|
||||
// iConfig.trendRayRight = false;
|
||||
// poiDrawer.DrawTrendLine(boundaryTrend, iConfig);
|
||||
// poiDrawer.DrawZone(zone, structureDrawConfig.drawConfig);
|
||||
// iConfig.Clean();
|
||||
|
||||
//
|
||||
// Collecting Affected Zones ...
|
||||
XBoxZone tmps[];
|
||||
XBoxZone zones[];
|
||||
XBoxZone actedZones[];
|
||||
XBoxZone insideZones[];
|
||||
XBoxZone breakedZones[];
|
||||
XBoxZone affectedZones[];
|
||||
|
||||
//
|
||||
// Support and Resistances ...
|
||||
poiDetector.CollectZones(bar, tmps);
|
||||
Copy(tmps, zones, false);
|
||||
|
||||
//
|
||||
// OBS ...
|
||||
poiDetector.CollectOBs(bar, tmps);
|
||||
Copy(tmps, zones, false);
|
||||
|
||||
//
|
||||
// FVGs ...
|
||||
poiDetector.CollectFVGs(bar, tmps);
|
||||
Copy(tmps, zones, false);
|
||||
|
||||
//
|
||||
ExtractAffectedZones(bar, zones, affectedZones);
|
||||
|
||||
//
|
||||
// Acteds Zones ...
|
||||
ExtractActeds(bar, actedZones, affectedZones);
|
||||
|
||||
//
|
||||
// Inside Zones ...
|
||||
ExtractInsides(bar, insideZones, affectedZones);
|
||||
|
||||
//
|
||||
// Breaked Zones ...
|
||||
ExtractBreakeds(bar, breakedZones, affectedZones);
|
||||
|
||||
//
|
||||
// Cleanup ...
|
||||
XClean(tmps);
|
||||
XClean(zones);
|
||||
XClean(actedZones);
|
||||
XClean(insideZones);
|
||||
XClean(breakedZones);
|
||||
XClean(affectedZones);
|
||||
// DebugBreak();
|
||||
}
|
||||
|
||||
//
|
||||
@@ -2464,13 +2569,31 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
|
||||
}
|
||||
pBar.Clean();
|
||||
p2Bar.Clean();
|
||||
p3Bar.Clean();
|
||||
pBarPatterns.Clean();
|
||||
boundaryTrend.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check Bar Has Signal Based on Strategy 4 ...
|
||||
* Check Bar Has Signal Based on Strategy 3 ...
|
||||
*
|
||||
* Strategy 3:
|
||||
* ===========
|
||||
* - Works Based On Breaked Support or Resistances ...
|
||||
* - Looking for a Support or Resistance to Breaked ...
|
||||
* - Validate Breaker Bar to Change Peak or Vale ...
|
||||
* - Validate Bar Opposit Side of Breaker Bar's Shadow ...
|
||||
* - Validate by Checking Market Strucutre to Has Directional Zone
|
||||
* (Support for Resistance Break / Resistance for Support Break) ...
|
||||
* - Validate Breaker Bar to Has Directional FVG ...
|
||||
*
|
||||
* Manipulations:
|
||||
* ================
|
||||
* there are Some Flags properties to Change Validations in Strategy ...
|
||||
* we can use them for Testing Purposes ...
|
||||
*
|
||||
* @param bar: XOHCL, reference to Bar ...
|
||||
* @param zone: XBoxZone, reference to holds affected zone ...
|
||||
@@ -2750,17 +2873,17 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
|
||||
// Draw ...
|
||||
if (result)
|
||||
{
|
||||
//
|
||||
XPOIDrawConfig iConfig = structureDrawConfig.drawConfig;
|
||||
iConfig.trendRayLeft = false;
|
||||
iConfig.trendRayRight = false;
|
||||
// //
|
||||
// XPOIDrawConfig iConfig = structureDrawConfig.drawConfig;
|
||||
// iConfig.trendRayLeft = false;
|
||||
// iConfig.trendRayRight = false;
|
||||
|
||||
//
|
||||
poiDrawer.DrawTrendLine(zoneTrend, iConfig);
|
||||
poiDrawer.DrawTrendLine(zoneToTrend, iConfig);
|
||||
// //
|
||||
// poiDrawer.DrawTrendLine(zoneTrend, iConfig);
|
||||
// poiDrawer.DrawTrendLine(zoneToTrend, iConfig);
|
||||
|
||||
//
|
||||
iConfig.Clean();
|
||||
// //
|
||||
// iConfig.Clean();
|
||||
}
|
||||
|
||||
//
|
||||
@@ -3423,7 +3546,7 @@ class XCXFIMAStrategy1Signaller : public XCXFIMABaseSignaller
|
||||
iTarget.doRFOnEntry = true;
|
||||
iTarget.target = highRiskTP;
|
||||
iTarget.volumeMultiplier = 0.8;
|
||||
AddRef(iTarget, targets);
|
||||
// AddRef(iTarget, targets);
|
||||
|
||||
//
|
||||
// Cleanup ...
|
||||
|
||||
Reference in New Issue
Block a user