fix trending draw issues ...
This commit is contained in:
@@ -779,7 +779,7 @@ class XCXFIMAPOIDetector : public XCMarketPatternDetector
|
||||
|
||||
//
|
||||
// Detect Supports ...
|
||||
if (config.detectSupports)
|
||||
if (config.detectSupport)
|
||||
{
|
||||
//
|
||||
XOHCL support;
|
||||
|
||||
@@ -33,6 +33,50 @@ class XCXFIMAPOIDrawer : public XCPOIDrawer
|
||||
public:
|
||||
//
|
||||
|
||||
//
|
||||
// Constructor ...
|
||||
XCXFIMAPOIDrawer() : XCPOIDrawer()
|
||||
{
|
||||
Default();
|
||||
}
|
||||
|
||||
//
|
||||
// Deconstructor ...
|
||||
~XCXFIMAPOIDrawer()
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// Overrides ...
|
||||
|
||||
/**
|
||||
* Do additional Configurations for Child Classes ...
|
||||
*/
|
||||
void virtual Default() override
|
||||
{
|
||||
//
|
||||
// Apply Default Props ...
|
||||
|
||||
//
|
||||
Prefix(NULL);
|
||||
ChartIdentification(0);
|
||||
SubWindowIdentification(0);
|
||||
|
||||
//
|
||||
defaultBullishStyle.width = 1;
|
||||
defaultBullishStyle.clr = clrAqua;
|
||||
defaultBullishStyle.style = STYLE_SOLID;
|
||||
|
||||
//
|
||||
defaultBearishStyle.width = 1;
|
||||
defaultBearishStyle.clr = clrMagenta;
|
||||
defaultBearishStyle.style = STYLE_SOLID;
|
||||
|
||||
//
|
||||
boxBullishStyle = defaultBullishStyle;
|
||||
boxBearishStyle = defaultBearishStyle;
|
||||
}
|
||||
|
||||
//
|
||||
// Get Specified Directional Arrow Anchor ...
|
||||
ENUM_ARROW_ANCHOR GetArrowAnchor(ENUM_X_DIRECTION forDir)
|
||||
@@ -155,6 +199,15 @@ class XCXFIMAPOIDrawer : public XCPOIDrawer
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw Specified Market Structure Based on Given Configs ...
|
||||
*
|
||||
* @param structure: XFIMAMarketStructure, reference to Provide Specifid Market Structure ...
|
||||
* @param config: XFIMAMarketStructureDrawerConfig, reference to Provide Drawing Configurations ...
|
||||
* @param objects: CArrayObj, pointer reference to Holds drawn Objects instances ...
|
||||
*
|
||||
* @return ( int )
|
||||
*/
|
||||
int DrawMarketStructure(
|
||||
XFIMAMarketStructure &structure,
|
||||
XFIMAMarketStructureDrawerConfig &config,
|
||||
@@ -314,9 +367,9 @@ class XCXFIMAPOIDrawer : public XCPOIDrawer
|
||||
has = DrawSwingTrend(
|
||||
structure.trendSwings,
|
||||
structure.trendDir,
|
||||
iObj, //
|
||||
true, // Ray Right ...
|
||||
false // Ray Left ...
|
||||
iObj, //
|
||||
config.swingTrendRayRight, // Ray Right ...
|
||||
config.swingTrendRayLeft // Ray Left ...
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@ struct XFIMAPatternDetectorConfig
|
||||
// Flags ...
|
||||
|
||||
//
|
||||
bool detectSupports;
|
||||
bool detectSupport;
|
||||
bool detectResistance;
|
||||
|
||||
//
|
||||
@@ -138,7 +138,7 @@ struct XFIMAPatternDetectorConfig
|
||||
//
|
||||
detectOB = false;
|
||||
detectFVG = false;
|
||||
detectSupports = false;
|
||||
detectSupport = false;
|
||||
detectResistance = false;
|
||||
detectSwingTrend = false;
|
||||
detectStarPattern = false;
|
||||
@@ -185,14 +185,14 @@ struct XFIMAPatternDetectorConfig
|
||||
{
|
||||
//
|
||||
// OB / FVG ...
|
||||
detectOB = true;
|
||||
detectFVG = true;
|
||||
detectOB = false;
|
||||
detectFVG = false;
|
||||
|
||||
//
|
||||
// Support and Resistances ...
|
||||
detectSupports = true;
|
||||
detectResistance = true;
|
||||
detectSwingTrend = true;
|
||||
detectSupport = false;
|
||||
detectResistance = false;
|
||||
detectSwingTrend = false;
|
||||
|
||||
//
|
||||
// Patterns ...
|
||||
@@ -223,12 +223,12 @@ struct XFIMAPatternDetectorConfig
|
||||
|
||||
//
|
||||
// Trending ...
|
||||
trendingNumberOfSwings = 3;
|
||||
trendingNumberOfSwings = 5;
|
||||
trendingSwingShoulders = 7;
|
||||
|
||||
//
|
||||
// Support and Resistance ...
|
||||
supportAndResistanceValidationLength = 21;
|
||||
supportAndResistanceValidationLength = 100;
|
||||
supportAndResistanceMaxAllowedLoopback = 1500;
|
||||
|
||||
//
|
||||
@@ -269,9 +269,6 @@ struct XFIMAPatternDetectorConfig
|
||||
*/
|
||||
void FullDetect()
|
||||
{
|
||||
//
|
||||
Default();
|
||||
|
||||
//
|
||||
// OB / FVG ...
|
||||
detectOB = true;
|
||||
@@ -279,7 +276,7 @@ struct XFIMAPatternDetectorConfig
|
||||
|
||||
//
|
||||
// Support and Resistances ...
|
||||
detectSupports = true;
|
||||
detectSupport = true;
|
||||
detectResistance = true;
|
||||
detectSwingTrend = true;
|
||||
|
||||
@@ -306,6 +303,45 @@ struct XFIMAPatternDetectorConfig
|
||||
analyseFIMAZigZagPivots = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Default Config, by turn off all detecting flags ...
|
||||
*/
|
||||
void OffDetectors()
|
||||
{
|
||||
//
|
||||
// OB / FVG ...
|
||||
detectOB = false;
|
||||
detectFVG = false;
|
||||
|
||||
//
|
||||
// Support and Resistances ...
|
||||
detectSupport = false;
|
||||
detectResistance = false;
|
||||
detectSwingTrend = false;
|
||||
|
||||
//
|
||||
// Patterns ...
|
||||
detectStarPattern = false;
|
||||
detectFlagPattern = false;
|
||||
detectRisingPattern = false;
|
||||
detectPiercingPattern = false;
|
||||
detectSignalKeyBarPattern = false;
|
||||
|
||||
//
|
||||
// Bars ...
|
||||
detectPinned = false;
|
||||
detectMomentum = false;
|
||||
detectEngulfed = false;
|
||||
detectTrueGaped = false;
|
||||
|
||||
//
|
||||
// Analysers ...
|
||||
analyseFIMAPVPivots = false;
|
||||
analyseFIMAMAPivots = false;
|
||||
analyseFIMASARPivots = false;
|
||||
analyseFIMAZigZagPivots = false;
|
||||
}
|
||||
|
||||
//
|
||||
};
|
||||
|
||||
@@ -418,6 +454,8 @@ struct XFIMAMarketStructureDrawerConfig
|
||||
|
||||
//
|
||||
bool drawSwingTrend;
|
||||
bool swingTrendRayLeft;
|
||||
bool swingTrendRayRight;
|
||||
|
||||
//
|
||||
bool drawOB;
|
||||
@@ -479,7 +517,9 @@ struct XFIMAMarketStructureDrawerConfig
|
||||
drawSwingTrend = false;
|
||||
drawStarPattern = false;
|
||||
drawFlagPattern = false;
|
||||
swingTrendRayLeft = false;
|
||||
drawRisingPattern = false;
|
||||
swingTrendRayRight = false;
|
||||
drawPiercingPattern = false;
|
||||
drawSignalKeyBarPattern = false;
|
||||
drawFIMAPVPivotsAnalysis = false;
|
||||
@@ -510,6 +550,8 @@ struct XFIMAMarketStructureDrawerConfig
|
||||
drawFlagPattern = true;
|
||||
drawRisingPattern = true;
|
||||
drawPiercingPattern = true;
|
||||
swingTrendRayLeft = false;
|
||||
swingTrendRayRight = true;
|
||||
drawSignalKeyBarPattern = true;
|
||||
drawFIMAPVPivotsAnalysis = true;
|
||||
drawFIMAMAPivotsAnalysis = true;
|
||||
@@ -542,6 +584,8 @@ struct XFIMAMarketStructureDrawerConfig
|
||||
drawStarPattern = true;
|
||||
drawFlagPattern = true;
|
||||
drawRisingPattern = true;
|
||||
swingTrendRayLeft = true;
|
||||
swingTrendRayRight = true;
|
||||
drawPiercingPattern = true;
|
||||
drawSignalKeyBarPattern = true;
|
||||
drawFIMAPVPivotsAnalysis = true;
|
||||
|
||||
Reference in New Issue
Block a user