last works ...

This commit is contained in:
2024-12-02 03:11:52 +03:30
parent 4d472bf7e8
commit de90f2d5fb
10 changed files with 5360 additions and 1374 deletions
+113
View File
@@ -2148,3 +2148,116 @@
//
}
////////////////////////////////////////
bool canContinue = true;
while (canContinue)
{
//
XOHCL iBar;
bool isBarInited = iBar.Init(
mBar.symbol,
mBar.period,
barIndex //
);
if (!isBarInited)
{
break;
}
//
if (bullOB == NULL)
{
//
XCOrderBlock *ob;
bool isBullOB = cycleHelper
.mPOIDetector
.DetectBullishOrderBlock(
mBar,
ob //
);
if (isBullOB)
{
//
bool isPricePassed = bar.low > ob.Upper();
if (isPricePassed)
{
//
if (mBullOB == NULL)
{
//
mBullOB = ob;
}
else
{
//
bool isRefined = mBullOB.Upper() < ob.Upper();
if (isRefined)
{
mBullOB = ob;
}
}
}
}
}
//
if (bearOB == NULL)
{
//
XCOrderBlock *ob;
bool isBearOB = cycleHelper
.mPOIDetector
.DetectBearishOrderBlock(
mBar,
ob //
);
if (isBearOB)
{
//
bool isPricePassed = bar.high < ob.Lower();
if (isPricePassed)
{
//
if (mBearOB == NULL)
{
//
mBearOB = ob;
}
else
{
//
bool isRefined = mBearOB.Lower() > ob.Lower();
if (isRefined)
{
mBearOB = ob;
}
}
}
}
}
//
canContinue =
(bullOB == NULL && mBullOB == NULL) ||
(bearOB == NULL && mBearOB == NULL);
if (canContinue)
{
barIndex++;
}
}
//
if (mBullOB != NULL)
{
bullOB = mBullOB;
}
//
if (mBearOB != NULL)
{
bearOB = mBearOB;
}