This commit is contained in:
2025-05-12 07:43:24 +03:30
parent 1910c42462
commit a02bf1ba13
3 changed files with 161 additions and 18 deletions
+59
View File
@@ -5588,6 +5588,65 @@ struct XBoxZone
//
double diffAvg = (upper - lower) / 2;
result = lower + diffAvg;
result = NormalizePrice(result, symbol);
//
return result;
}
/**
* Calculate Box Leg N Price ...
* N default is 2
*
* @param leg: int ...
*
* @return ( double )
*/
double GetLeg(int leg = 2)
{
//
double result = 0;
//
leg = NormalizeInt(leg, 2);
//
if (!IsValid())
{
return result;
}
//
double range = (upper - lower) * leg;
result =
IsBullish()
? upper + range
: lower - range;
result = NormalizePrice(result, symbol);
//
return result;
}
/**
* Calculate Box Range ...
*
* @return ( double )
*/
double GetRange()
{
//
double result = 0;
//
if (!IsValid())
{
return result;
}
//
result = (upper - lower);
result = NormalizePrice(result, symbol);
//
return result;
+81 -6
View File
@@ -1773,10 +1773,75 @@ bool CanTriggerCond3(
barIndex //
);
//
// Initialize iBar ...
XOHCL iBar;
result = iBar.Init(
symbol,
period,
barIndex //
);
if (!result)
{
//
iBar.Clean();
//
return result;
}
//
// Validate Box ...
// For Box Validating we use 50% of Box Range ...
// if Price Touched Box 50% rate we Invalidate Box ...
// r if Prce Touched Leg 2 of Box Size ...
double boxLeg2 = box.GetLeg(2);
//
// Draw Box Leg2 ...
string iLeg2Name = box.GetMiddleTag();
StringReplace(
iLeg2Name,
"Mid",
"Leg2" //
);
CChartObjectTrend *iLeg2Obj;
iLeg2Obj = new CChartObjectTrend();
has = iLeg2Obj.Create(
helper.poiDrawer.ChartIdentification(),
iLeg2Name,
helper.poiDrawer.SubWindowIdentification(),
box.from,
boxLeg2,
box.to,
boxLeg2 //
);
if (has)
{
//
iLeg2Obj.Color(clrYellow);
//
drawns.Add(iLeg2Obj);
}
ZeroMemory(iLeg2Obj);
//
bool isBoxValid =
isBullish
? iBar.close < boxLeg2
: iBar.close > boxLeg2;
result = isBoxValid;
if (!result)
{
//
box.Clean();
iBar.Clean();
//
return result;
}
iBar.Clean();
//
// Detect Box FVG ...
@@ -1890,11 +1955,6 @@ bool CanTriggerCond3(
result = !isBreaked;
if (!result)
{
//
// Here We Can Cleanup Decision Zone ...
// since the Conditions Destructed ...
// box.Clean();
//
fvg.Clean();
Clean(fvgs);
@@ -1930,7 +1990,6 @@ bool CanTriggerCond3(
//
// Detecting Liquiidties ...
XOHCL iBar;
XCAEALQSweep iLQ;
XCAEALQSweep lqs[];
toIDX = fvg.ToIndex();
@@ -2311,6 +2370,22 @@ bool CanTriggerCond3(
// Since Here TP Must Calculated
// Using R2R we Ignore Target ...
tp = 0;
//
// Add Target if price is Inside Analyse Box ...
double price = iBar.close;
double target =
isBullish
? box.upper
: box.lower;
has =
isBullish
? price < target
: price > target;
if (has)
{
tp = target;
}
}
//
+21 -12
View File
@@ -775,11 +775,7 @@ class XCXCAEASignaller : XCBase
inputs.ctInputs.showCandleTime = true;
//
// XCA ...
//
inputs.caInputs.supResSmoothingLength = 7;
inputs.caInputs.supResSmoothingMode = X_MA_MODE_NONE;
// X3MA ...
//
inputs.x3maInputs.applyColor = true;
@@ -793,10 +789,25 @@ class XCXCAEASignaller : XCBase
inputs.x3maInputs.showMedium = false;
//
// XCA ...
//
inputs.caInputs.sarStep = 0.001;
inputs.caInputs.sarMax = 0.05;
//
inputs.caInputs.supResSmoothingLength = 7;
inputs.caInputs.supResSmoothingMode = X_MA_MODE_NONE;
//
inputs.caInputs.showKI = false;
inputs.caInputs.showTKI = false;
inputs.caInputs.showMAH = false;
inputs.caInputs.showMAL = false;
inputs.caInputs.showMAC = false;
inputs.caInputs.showSar = false;
inputs.caInputs.showSar = true;
inputs.caInputs.showVidya = false;
inputs.caInputs.showTrend = false;
inputs.caInputs.showSwings = true;
inputs.caInputs.showFiboLevel1 = false;
inputs.caInputs.showFiboLevel2 = false;
@@ -804,12 +815,6 @@ class XCXCAEASignaller : XCBase
inputs.caInputs.showFiboLevel4 = false;
inputs.caInputs.showFiboLevel5 = false;
inputs.caInputs.showPeaksAndVales = true;
//
inputs.caInputs.showKI = false;
inputs.caInputs.showTKI = false;
inputs.caInputs.showVidya = false;
inputs.caInputs.showTrend = false;
inputs.caInputs.showPeakAndValeGolden = false;
inputs.caInputs.showSupportAndResistance = false;
@@ -833,6 +838,10 @@ class XCXCAEASignaller : XCBase
inputs.showADX = false;
inputs.showMACD = false;
//
//
//
//
// XCAEA Helper ...
helper = new XCXCAEAHelper();