last ...
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user