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