last works ...

This commit is contained in:
2025-09-26 19:48:34 +03:30
parent 353a204162
commit 21ce1ebf4f
12 changed files with 3029 additions and 544 deletions
@@ -32,6 +32,22 @@ class XCXFIMAPOIDrawer : public XCPOIDrawer
//
public:
//
// Props ...
//
// Tested Zones ...
color testedBullishColor;
color testedBearishColor;
//
// Breaked Zones ...
color breakedBullishColor;
color breakedBearishColor;
//
// FakeBreaked Zones ...
color fakeBreakedBullishColor;
color fakeBreakedBearishColor;
//
// Constructor ...
@@ -75,6 +91,16 @@ class XCXFIMAPOIDrawer : public XCPOIDrawer
//
boxBullishStyle = defaultBullishStyle;
boxBearishStyle = defaultBearishStyle;
//
testedBullishColor = clrLime;
breakedBullishColor = clrGreen;
fakeBreakedBullishColor = clrYellow;
//
testedBearishColor = clrRed;
breakedBearishColor = clrDarkRed;
fakeBreakedBearishColor = clrDarkOrange;
}
//
@@ -161,6 +187,135 @@ class XCXFIMAPOIDrawer : public XCPOIDrawer
return result;
}
/**
* Get Tested Zone Style ...
*
* @param style: reference to hold result ...
* @param zone: Specified Zone ...
*
* @return ( bool )
*/
bool GetTestedStyle(
XPOIStyle &style,
XBoxZone &zone //
)
{
//
bool result = false;
//
style.Clean();
//
result = zone.IsValid();
if (!result)
{
return result;
}
//
GetBoxStyle(
style,
zone.dir //
);
//
style.width = 3;
style.clr =
zone.IsBullish()
? testedBullishColor
: testedBearishColor;
//
return result;
}
/**
* Get Breaked Zone Style ...
*
* @param style: reference to hold result ...
* @param zone: Specified Zone ...
*
* @return ( bool )
*/
bool GetBreakedStyle(
XPOIStyle &style,
XBoxZone &zone //
)
{
//
bool result = false;
//
style.Clean();
//
result = zone.IsValid();
if (!result)
{
return result;
}
//
GetBoxStyle(
style,
zone.dir //
);
//
style.width = 3;
style.clr =
zone.IsBullish()
? breakedBullishColor
: breakedBearishColor;
//
return result;
}
/**
* Get Fake Breaked Zone Style ...
*
* @param style: reference to hold result ...
* @param zone: Specified Zone ...
*
* @return ( bool )
*/
bool GetFakeBreakedStyle(
XPOIStyle &style,
XBoxZone &zone //
)
{
//
bool result = false;
//
style.Clean();
//
result = zone.IsValid();
if (!result)
{
return result;
}
//
GetBoxStyle(
style,
zone.dir //
);
//
style.width = 3;
style.clr =
zone.IsBullish()
? fakeBreakedBullishColor
: fakeBreakedBearishColor;
//
return result;
}
/**
* Fill Arrow Based Drawing Specs ...
*
@@ -199,6 +354,102 @@ class XCXFIMAPOIDrawer : public XCPOIDrawer
}
}
/**
* Apply Tested Style ...
*
* @param object: reference pointer to Object ...
* @param zone: reference to Zone ...
*/
void ApplyTestedStyle(
XCBoxObject *&object,
XBoxZone &zone //
)
{
//
if (!zone.IsValid() ||
object == NULL)
{
return;
}
//
XPOIStyle style;
if (!GetTestedStyle(style, zone))
{
return;
}
//
ApplyBoxStyle(
object,
style //
);
}
/**
* Apply Breaked Style ...
*
* @param object: reference pointer to Object ...
* @param zone: reference to Zone ...
*/
void ApplyBreakedStyle(
XCBoxObject *&object,
XBoxZone &zone //
)
{
//
if (!zone.IsValid() ||
object == NULL)
{
return;
}
//
XPOIStyle style;
if (!GetBreakedStyle(style, zone))
{
return;
}
//
ApplyBoxStyle(
object,
style //
);
}
/**
* Apply Tested Style ...
*
* @param object: reference pointer to Object ...
* @param zone: reference to Zone ...
*/
void ApplyFakeBreakStyle(
XCBoxObject *&object,
XBoxZone &zone //
)
{
//
if (!zone.IsValid() ||
object == NULL)
{
return;
}
//
XPOIStyle style;
if (!GetFakeBreakedStyle(style, zone))
{
return;
}
//
ApplyBoxStyle(
object,
style //
);
}
/**
* Draw Specified Market Structure Based on Given Configs ...
*
@@ -229,6 +480,7 @@ class XCXFIMAPOIDrawer : public XCPOIDrawer
objects.Clear();
//
int count = 0;
bool has = false;
int arrowCode = -1;
int arrowWidth = 3;
@@ -729,6 +981,8 @@ class XCXFIMAPOIDrawer : public XCPOIDrawer
has = DrawPivotAnalysis(
structure.pvAnalysis,
iObj,
config.drawFIMAPVPivotsAnalysisTrends,
config.drawFIMAPVPivotsAnalysisZones,
config.drawFIMAPVPivotsAnalysisPivots,
bearArrowCode,
bullArrowCode //
@@ -754,6 +1008,8 @@ class XCXFIMAPOIDrawer : public XCPOIDrawer
has = DrawPivotAnalysis(
structure.pvAnalysis,
iObj,
config.drawFIMAMAPivotsAnalysisTrends,
config.drawFIMAMAPivotsAnalysisZones,
config.drawFIMAMAPivotsAnalysisPivots,
bearArrowCode,
bullArrowCode //
@@ -779,6 +1035,8 @@ class XCXFIMAPOIDrawer : public XCPOIDrawer
has = DrawPivotAnalysis(
structure.pvAnalysis,
iObj,
config.drawFIMASARPivotsAnalysisTrends,
config.drawFIMASARPivotsAnalysisZones,
config.drawFIMASARPivotsAnalysisPivots,
bearArrowCode,
bullArrowCode //
@@ -804,6 +1062,8 @@ class XCXFIMAPOIDrawer : public XCPOIDrawer
has = DrawPivotAnalysis(
structure.pvAnalysis,
iObj,
config.drawFIMAZigZagPivotsAnalysisTrends,
config.drawFIMAZigZagPivotsAnalysisZones,
config.drawFIMAZigZagPivotsAnalysisPivots,
bearArrowCode,
bullArrowCode //
@@ -815,6 +1075,186 @@ class XCXFIMAPOIDrawer : public XCPOIDrawer
}
}
//
// Fake Breaked Zone ...
if (config.drawFakeBreakedZone &&
structure.fakeBreakedZone.IsValid())
{
//
XCBoxObject *iObj;
has = DrawBox(
structure.fakeBreakedZone,
iObj //
);
if (has)
{
//
// Apply Style ...
ApplyFakeBreakStyle(
iObj,
structure.fakeBreakedZone //
);
//
objects.Add(iObj);
}
//
ZeroMemory(iObj);
}
//
// Recently Tested Zones ...
if (config.drawRecentlyTestedZones &&
HasChild(structure.recentlyTestedZones))
{
//
XCBoxObject *iObj;
count = ArraySize(structure.recentlyTestedZones);
for (int i = 0; i < count; i++)
{
//
// Draw Box ...
has = DrawBox(
structure.recentlyTestedZones[i],
iObj //
);
if (has)
{
//
ApplyTestedStyle(
iObj,
structure.recentlyTestedZones[i] //
);
//
objects.Add(iObj);
}
//
ZeroMemory(iObj);
}
}
//
// Recently Breaked Zones ...
if (config.drawRecentlyBreakedZones &&
HasChild(structure.recentlyBreakedZones))
{
//
XCBoxObject *iObj;
count = ArraySize(structure.recentlyBreakedZones);
for (int i = 0; i < count; i++)
{
//
// Draw Box ...
has = DrawBox(
structure.recentlyBreakedZones[i],
iObj //
);
if (has)
{
//
ApplyBreakedStyle(
iObj,
structure.recentlyBreakedZones[i] //
);
//
objects.Add(iObj);
}
//
ZeroMemory(iObj);
}
}
//
// Draw Recent Patterns ...
if (config.drawRecentPatterns)
{
//
// Pin Bars ...
if (config.drawPinned &&
HasChild(structure.pinBars))
{
//
// TODO: Complete this ...
}
//
// Engulf Bars ...
if (config.drawEngulfed &&
HasChild(structure.engulfBars))
{
//
// TODO: Complete this ...
}
//
// TrueGap Bars ...
if (config.drawTrueGaped &&
HasChild(structure.trueGapBars))
{
//
// TODO: Complete this ...
}
//
// TrueGap Bars ...
if (config.drawMomentum &&
HasChild(structure.momentumBars))
{
//
// TODO: Complete this ...
}
//
// Flag Pattern ...
if (config.drawFlagPattern &&
HasChild(structure.flagPatterns))
{
//
// TODO: Complete this ...
}
//
// Star Pattern ...
if (config.drawStarPattern &&
HasChild(structure.starPatterns))
{
//
// TODO: Complete this ...
}
//
// Rising Pattern ...
if (config.drawRisingPattern &&
HasChild(structure.risingPatterns))
{
//
// TODO: Complete this ...
}
//
// Piercing Pattern ...
if (config.drawPiercingPattern &&
HasChild(structure.piercingPatterns))
{
//
// TODO: Complete this ...
}
//
// SignalKeyBar Pattern ...
if (config.drawSignalKeyBarPattern &&
HasChild(structure.signalKeyBarPatterns))
{
//
// TODO: Complete this ...
}
}
//
result = objects.Total();