last ...
This commit is contained in:
@@ -3855,6 +3855,9 @@ bool ToZoneBox(
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool isBullish = fvg.IsBullish();
|
||||
|
||||
//
|
||||
// Retrieve Main Fair Value Gap's Started Bar ...
|
||||
XOHCL startedBar;
|
||||
@@ -3893,11 +3896,37 @@ bool ToZoneBox(
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Validate Start Bar ...
|
||||
result =
|
||||
isBullish
|
||||
? startedBar.high >= fvg.Upper() &&
|
||||
startedBar.low < fvg.Upper()
|
||||
: startedBar.low <= fvg.Lower() &&
|
||||
startedBar.high > fvg.Lower();
|
||||
if (!result)
|
||||
{
|
||||
//
|
||||
box.Clean();
|
||||
ZeroMemory(fvg);
|
||||
startedBar.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Update Box using Started Bar ...
|
||||
box.lower = startedBar.low;
|
||||
box.upper = startedBar.high;
|
||||
box.from = startedBar.NextAt();
|
||||
box.lower = isBullish
|
||||
? box.lower
|
||||
: startedBar.low;
|
||||
box.upper =
|
||||
isBullish
|
||||
? startedBar.high
|
||||
: box.upper;
|
||||
|
||||
//
|
||||
box.from = startedBar.time;
|
||||
|
||||
//
|
||||
// Check Box Validation ...
|
||||
|
||||
Reference in New Issue
Block a user