last ...
This commit is contained in:
@@ -927,13 +927,226 @@ else if (isPriceRejected)
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//
|
||||
// When FVg is Worked ...
|
||||
else
|
||||
{
|
||||
//
|
||||
XCFVG *fvgs[];
|
||||
if (isBullish)
|
||||
{
|
||||
//
|
||||
Copy(
|
||||
analyseState.bullishFairValueGaps,
|
||||
fvgs //
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
Copy(
|
||||
analyseState.bearishFairValueGaps,
|
||||
fvgs //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// int count = ArraySize(fvgs);
|
||||
// bool has = IsValidSize(count);
|
||||
// if (has)
|
||||
// {
|
||||
// //
|
||||
// for (int i = 0; i < count; i++)
|
||||
// {
|
||||
// //
|
||||
// XCBaseObject *iObj;
|
||||
// bool isCreate = visionCycleHelper
|
||||
// .mPOIDrawer
|
||||
// .CreateFairValueGap(
|
||||
// fvgs[i],
|
||||
// iObj //
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
|
||||
//
|
||||
// Extract UnActivated FVGs ...
|
||||
int fvgsCount = FilterZones(
|
||||
//
|
||||
fvgs,
|
||||
//
|
||||
trend,
|
||||
NULL, // For Period ...
|
||||
workerBar.time,
|
||||
//
|
||||
// Start ...
|
||||
XZONE_STATE_IGNORED,
|
||||
true, // Force Body Out ...
|
||||
//
|
||||
// Activation ...
|
||||
XZONE_STATE_FAILED,
|
||||
false, // Force Body Out ...
|
||||
//
|
||||
// Breaktion ...
|
||||
XZONE_STATE_IGNORED,
|
||||
false, // Force Body Out ...
|
||||
//
|
||||
// Works ...
|
||||
XZONE_STATE_IGNORED,
|
||||
false, // Body Out ...
|
||||
//
|
||||
true, // Apply Sorting ...
|
||||
true // Ignore Inside ...
|
||||
);
|
||||
|
||||
//
|
||||
bool has = IsValidSize(fvgsCount);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
int youngestIDX = GetYoungest(fvgs);
|
||||
has = IsValidIndex(youngestIDX);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
workingZone
|
||||
.orderFlow[youngestOBFVGIDX]
|
||||
.fvg = fvgs[youngestIDX];
|
||||
|
||||
//
|
||||
workingZone.UpdateTo(cTime);
|
||||
|
||||
//
|
||||
XCBaseObject *iFVGObj;
|
||||
bool isCreated = visionCycleHelper
|
||||
.mPOIDrawer.CreateFairValueGap(
|
||||
fvgs[youngestIDX],
|
||||
iFVGObj //
|
||||
);
|
||||
if (isCreated)
|
||||
{
|
||||
Print("");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//
|
||||
// TODO: Neews to Review ...
|
||||
else if (
|
||||
isOBWorked &&
|
||||
isFVGWorked &&
|
||||
isOBActivated &&
|
||||
isFVGActivated &&
|
||||
fvgActivationBar.time >= obActivationBar.time &&
|
||||
fvgActivationBar.time <= obActivationBar.NextAt() &&
|
||||
obWorkerBar.time > fvgWorkerBar.time)
|
||||
{
|
||||
//
|
||||
XOHCL iBar;
|
||||
bool isBarPassed = iBar.Init(
|
||||
symbol,
|
||||
period,
|
||||
zIndex //
|
||||
);
|
||||
|
||||
//
|
||||
if (isBarPassed)
|
||||
{
|
||||
//
|
||||
bool isBarInsideFVG =
|
||||
isBullish
|
||||
? (
|
||||
//
|
||||
iBar.low < workingZone.orderFlow[youngestOBFVGIDX].fvg.Upper() &&
|
||||
iBar.high > workingZone.orderFlow[youngestOBFVGIDX].fvg.Lower() &&
|
||||
//
|
||||
consolidationZBar.low < workingZone.orderFlow[youngestOBFVGIDX].fvg.Upper()
|
||||
//
|
||||
)
|
||||
: (
|
||||
//
|
||||
iBar.high > workingZone.orderFlow[youngestOBFVGIDX].fvg.Lower() &&
|
||||
iBar.low < workingZone.orderFlow[youngestOBFVGIDX].fvg.Upper() &&
|
||||
//
|
||||
consolidationZBar.high > workingZone.orderFlow[youngestOBFVGIDX].fvg.Lower()
|
||||
//
|
||||
);
|
||||
if (isBarInsideFVG)
|
||||
{
|
||||
Print("");
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
iBar.Clean();
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
//
|
||||
// TODO:
|
||||
// Remove Drawn Objects ...
|
||||
|
||||
// //
|
||||
// if (hasNewOB)
|
||||
// {
|
||||
// //
|
||||
// XCBaseObject *iObj;
|
||||
// bool isCreated = visionCycleHelper
|
||||
// .mPOIDrawer
|
||||
// .CreateOrderBlock(
|
||||
// newOB,
|
||||
// iObj //
|
||||
// );
|
||||
// Print("New OB");
|
||||
// }
|
||||
|
||||
// //
|
||||
// if (hasNewFVG)
|
||||
// {
|
||||
// //
|
||||
// XCBaseObject *iObj;
|
||||
// bool isCreated = visionCycleHelper
|
||||
// .mPOIDrawer
|
||||
// .CreateFairValueGap(
|
||||
// newFVG,
|
||||
// iObj //
|
||||
// );
|
||||
// Print("New FVG");
|
||||
// }
|
||||
|
||||
// //
|
||||
// if (hasNewAnalyseOB)
|
||||
// {
|
||||
// //
|
||||
// XCBaseObject *iObj;
|
||||
// bool isCreated = analyseCycleHelper
|
||||
// .mPOIDrawer
|
||||
// .CreateOrderBlock(
|
||||
// newAnalyseOB,
|
||||
// iObj //
|
||||
// );
|
||||
// Print("New OB");
|
||||
// }
|
||||
|
||||
// //
|
||||
// if (hasNewAnalyseFVG)
|
||||
// {
|
||||
// //
|
||||
// XCBaseObject *iObj;
|
||||
// bool isCreated = analyseCycleHelper
|
||||
// .mPOIDrawer
|
||||
// .CreateFairValueGap(
|
||||
// newAnalyseFVG,
|
||||
// iObj //
|
||||
// );
|
||||
// Print("New FVG");
|
||||
// }
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user