last ...
This commit is contained in:
@@ -3260,6 +3260,61 @@ class XCPOIDrawer : public XCBase
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Specific Box on Chart ...
|
||||
*
|
||||
* @param box: XBoxZone instance Reference ...
|
||||
* @param clr: Color ...
|
||||
* @param width: Integer ...
|
||||
* @param fill: Boolean ...
|
||||
* @param style: ENUM_LINE_STYLE member ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool DrawBox(
|
||||
XBoxZone &box,
|
||||
XCBoxObject *&object //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
object = NULL;
|
||||
|
||||
//
|
||||
result = box.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
int width = 1;
|
||||
bool fill = false;
|
||||
color clr =
|
||||
box.IsBullish()
|
||||
? BullishFVGColor()
|
||||
: BearishFVGColor();
|
||||
ENUM_LINE_STYLE style = STYLE_DASHDOTDOT;
|
||||
|
||||
//
|
||||
result = CreateBox(
|
||||
object,
|
||||
box.upper,
|
||||
box.lower,
|
||||
box.from,
|
||||
box.to,
|
||||
clr,
|
||||
width,
|
||||
fill,
|
||||
style //
|
||||
);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Specific Box on Chart ...
|
||||
*
|
||||
|
||||
@@ -2271,6 +2271,185 @@ int ExtractInsideZones(
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add Specific Item into a Collection Reference only if it's not Exists ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
template <typename T>
|
||||
bool AddIfNotExists(
|
||||
T *item,
|
||||
T *&items[] //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result = item != NULL;
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
int before = ArraySize(items);
|
||||
|
||||
//
|
||||
int idx = FindIndex(
|
||||
item,
|
||||
items //
|
||||
);
|
||||
bool has = IsValidIndex(idx);
|
||||
result = !has;
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
Add(
|
||||
item,
|
||||
items //
|
||||
);
|
||||
|
||||
//
|
||||
int after = ArraySize(items);
|
||||
|
||||
//
|
||||
result = after > before;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
bool AddIfNotExists(
|
||||
XConsolidationZone &item,
|
||||
XConsolidationZone &items[] //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result = item.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
int before = ArraySize(items);
|
||||
|
||||
//
|
||||
int idx = FindIndex(
|
||||
item,
|
||||
items //
|
||||
);
|
||||
bool has = IsValidIndex(idx);
|
||||
result = !has;
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
AddRef(
|
||||
item,
|
||||
items //
|
||||
);
|
||||
|
||||
//
|
||||
int after = ArraySize(items);
|
||||
|
||||
//
|
||||
result = after > before;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add items Collection reference Members into source Collection only if it's not Exists ...alignas
|
||||
* @return ( int )
|
||||
*/
|
||||
template <typename T>
|
||||
int AddIfNotExists(
|
||||
T *&items[],
|
||||
T *&sources[] //
|
||||
)
|
||||
{
|
||||
//
|
||||
int result = 0;
|
||||
|
||||
//
|
||||
bool has = HasChild(items);
|
||||
if (!has)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
int before = ArraySize(sources);
|
||||
|
||||
//
|
||||
int count = ArraySize(items);
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
has = AddIfNotExists(
|
||||
items[i],
|
||||
sources //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
int after = ArraySize(sources);
|
||||
|
||||
//
|
||||
result = after > before;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
int AddIfNotExists(
|
||||
XConsolidationZone &items[],
|
||||
XConsolidationZone &sources[] //
|
||||
)
|
||||
{
|
||||
//
|
||||
int result = 0;
|
||||
|
||||
//
|
||||
bool has = HasChild(items);
|
||||
if (!has)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
int before = ArraySize(sources);
|
||||
|
||||
//
|
||||
int count = ArraySize(items);
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
has = AddIfNotExists(
|
||||
items[i],
|
||||
sources //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
int after = ArraySize(sources);
|
||||
|
||||
//
|
||||
result = after > before;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
template <typename T>
|
||||
int FilterZones(
|
||||
|
||||
@@ -5266,6 +5266,31 @@ struct XBoxZone
|
||||
return result;
|
||||
}
|
||||
|
||||
bool IsBullish()
|
||||
{
|
||||
return IsValid() &&
|
||||
IsBullish(dir);
|
||||
}
|
||||
|
||||
bool IsBearish()
|
||||
{
|
||||
return IsValid() &&
|
||||
IsBearish(dir);
|
||||
}
|
||||
|
||||
bool IsSameAs(XBoxZone &item)
|
||||
{
|
||||
//
|
||||
return IsValid() &&
|
||||
dir == item.dir &&
|
||||
from == item.from &&
|
||||
type == item.type &&
|
||||
lower == item.lower &&
|
||||
upper == item.upper &&
|
||||
symbol == item.symbol &&
|
||||
period == item.period;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check Box is Same as another ...
|
||||
*
|
||||
|
||||
@@ -4221,4 +4221,89 @@ int GetLowest(
|
||||
return result;
|
||||
}
|
||||
|
||||
bool AddIfNotExists(
|
||||
XOBFVG &item,
|
||||
XOBFVG &items[] //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result = item.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
int before = ArraySize(items);
|
||||
|
||||
//
|
||||
int idx = FindIndex(
|
||||
item,
|
||||
items //
|
||||
);
|
||||
bool has = IsValidIndex(idx);
|
||||
result = !has;
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
AddRef(
|
||||
item,
|
||||
items //
|
||||
);
|
||||
|
||||
//
|
||||
int after = ArraySize(items);
|
||||
|
||||
//
|
||||
result = after > before;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
int AddIfNotExists(
|
||||
XOBFVG &items[],
|
||||
XOBFVG &sources[] //
|
||||
)
|
||||
{
|
||||
//
|
||||
int result = 0;
|
||||
|
||||
//
|
||||
bool has = HasChild(items);
|
||||
if (!has)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
int before = ArraySize(sources);
|
||||
|
||||
//
|
||||
int count = ArraySize(items);
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
has = AddIfNotExists(
|
||||
items[i],
|
||||
sources //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
int after = ArraySize(sources);
|
||||
|
||||
//
|
||||
result = after > before;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -137,7 +137,7 @@ class XCX121SMCXWZSignalDetector : public XCBase
|
||||
}
|
||||
|
||||
//
|
||||
bool drawBar = true;
|
||||
bool drawBar = false;
|
||||
if (drawBar)
|
||||
{
|
||||
//
|
||||
@@ -467,6 +467,22 @@ class XCX121SMCXWZSignalDetector : public XCBase
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
bool hasInsideBoxes = hasWorkingZone &&
|
||||
workingZone.HasInsideBoxes();
|
||||
if (hasInsideBoxes)
|
||||
{
|
||||
Print("Inside Boxes ...");
|
||||
}
|
||||
|
||||
//
|
||||
bool hasBreakedBoxes = hasWorkingZone &&
|
||||
workingZone.HasBreakedBoxes();
|
||||
if (hasBreakedBoxes)
|
||||
{
|
||||
Print("Breaked Boxes ...");
|
||||
}
|
||||
|
||||
//
|
||||
// Checking Other Senario for Signals ...
|
||||
// if (!hasWaitingZones &&
|
||||
@@ -650,14 +666,38 @@ class XCX121SMCXWZSignalDetector : public XCBase
|
||||
drawer,
|
||||
true, // Draw Waiting Zones ..
|
||||
true, // Draw Inside Zones ..
|
||||
true, // Draw Breaked Zones ..
|
||||
true, // Draw Supply Zone ..
|
||||
true, // Draw Demand Zone ..
|
||||
true, // Draw Supply Zones ..
|
||||
true, // Draw Demand Zones ..
|
||||
true, // Draw Support Zones ..
|
||||
true // Draw Resistance Zones ..
|
||||
false, // Draw Breaked Zones ..
|
||||
false, // Draw Supply Zone ..
|
||||
false, // Draw Demand Zone ..
|
||||
false, // Draw Supply Zones ..
|
||||
false, // Draw Demand Zones ..
|
||||
false, // Draw Support Zones ..
|
||||
false // Draw Resistance Zones ..
|
||||
);
|
||||
|
||||
//
|
||||
// XCBaseObject *objects[];
|
||||
// drawer.DrawState(
|
||||
// decisionState,
|
||||
// objects,
|
||||
// false, // DrawT icksZone ...
|
||||
// true, // Ignore SwingHighs ...
|
||||
// true, // Ignore SwingLows ...
|
||||
// true, // Ignore SupportZones ...
|
||||
// true, // Ignore ResistanceZones ...
|
||||
// true, // Ignore SupplyZones ...
|
||||
// true, // Ignore DemandZones ...
|
||||
// true, // Ignore BullishOrderBlocks ...
|
||||
// true, // Ignore BearishOrderBlocks ...
|
||||
// true, // Ignore BullishFairValueGaps ...
|
||||
// true, // Ignore BearishFairValueGaps ...
|
||||
// true, // Ignore BullishRejectionBars ...
|
||||
// true, // Ignore BearishRejectionBars ...
|
||||
// true, // Ignore BullishMomentumBars ...
|
||||
// true, // Ignore BearishMomentumBars ...
|
||||
// true, // Ignore BullishConsolidationZones ...
|
||||
// true // Ignore BearishConsolidationZones ...
|
||||
// );
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -768,8 +768,8 @@ class XCX121SMCStrategy : public XCX121SMCBaseStrategy
|
||||
//
|
||||
// XPV ...
|
||||
x121Inputs.xpvInputs.showSar = showAll || false;
|
||||
x121Inputs.xpvInputs.showPeaks = showAll || false;
|
||||
x121Inputs.xpvInputs.showVales = showAll || false;
|
||||
x121Inputs.xpvInputs.showPeaks = showAll || true;
|
||||
x121Inputs.xpvInputs.showVales = showAll || true;
|
||||
|
||||
//
|
||||
// XHK ...
|
||||
@@ -805,9 +805,9 @@ class XCX121SMCStrategy : public XCX121SMCBaseStrategy
|
||||
|
||||
//
|
||||
// XVWAP ...
|
||||
x121Inputs.xvwapInputs.showVWapFast = showAll || true;
|
||||
x121Inputs.xvwapInputs.showVWapMedium = showAll || true;
|
||||
x121Inputs.xvwapInputs.showVWapSlow = showAll || true;
|
||||
x121Inputs.xvwapInputs.showVWapFast = showAll || false;
|
||||
x121Inputs.xvwapInputs.showVWapMedium = showAll || false;
|
||||
x121Inputs.xvwapInputs.showVWapSlow = showAll || false;
|
||||
|
||||
//
|
||||
// X3MA ...
|
||||
|
||||
Reference in New Issue
Block a user