This commit is contained in:
2025-03-07 03:56:11 +03:30
parent 6157bbe125
commit 5534bde7e5
6 changed files with 3636 additions and 3126 deletions
+2992 -2678
View File
File diff suppressed because it is too large Load Diff
+140 -105
View File
@@ -30,7 +30,7 @@ int OnInit()
_Symbol,
_Period //
);
// mPOIDetector.Init();
mPOIDetector.Init();
//---
mPOIDrawer = new XCPOIDrawer();
@@ -79,130 +79,165 @@ void OnTick()
mPOIDetector.GetState(mPOIState);
//
bool has = mPOIState.HasFairValueGaps();
bool has = Contains(
X_BULLISH_FVG_DETECTED,
mPOIEvents //
) ||
Contains(
X_BEARISH_FVG_DETECTED,
mPOIEvents //
);
if (has)
{
//
int count = mPOIState.CountFairValueGaps();
for (int i = 0; i < count; i++)
XCFVG *fvg;
int idx = GetYoungest(mPOIState.fairValueGaps);
has = IsValidIndex(idx);
if (has)
{
//
mPOIState.fairValueGaps[i].To(TimeCurrent());
fvg = mPOIState.fairValueGaps[idx];
//
XCBaseObject *iObj;
bool isCreated = mPOIDrawer.CreateFairValueGap(
mPOIState.fairValueGaps[i],
has = mPOIDrawer.CreateFairValueGap(
fvg,
iObj //
);
}
//
Print("Salam");
//
if (has)
{
//
Print("New Fair Value Gap ...");
}
}
}
// //
// bool has = mPOIState.HasFairValueGaps();
// if (has)
// {
// //
// int count = mPOIState.CountFairValueGaps();
// for (int i = 0; i < count; i++)
// {
// //
// mPOIState.fairValueGaps[i].To(TimeCurrent());
// //
// XCBaseObject *iObj;
// bool isCreated = mPOIDrawer.CreateFairValueGap(
// mPOIState.fairValueGaps[i],
// iObj //
// );
// }
//
// Print("Salam");
//
return;
//
XOHCL bar;
bool isInited = bar.Init(
_Symbol,
_Period,
0 //
);
if (!isInited)
{
return;
}
// //
// XOHCL bar;
// bool isInited = bar.Init(
// _Symbol,
// _Period,
// 0 //
// );
// if (!isInited)
// {
// return;
// }
//
int index = 0;
ENUM_X_DIRECTION sameBarDir;
bool hasSameBars = mBarAnalyser.HasSameBars(
bar,
sameBarDir,
index,
3 //
);
if (hasSameBars)
{
}
// //
// int index = 0;
// ENUM_X_DIRECTION sameBarDir;
// bool hasSameBars = mBarAnalyser.HasSameBars(
// bar,
// sameBarDir,
// index,
// 3 //
// );
// if (hasSameBars)
// {
// }
//
// Detect Fair Value Gap ...
XOHCL fvgEndBar;
XOHCL fvgStartBar;
ENUM_X_DIRECTION fvgDir;
bool hasFVG = mBarAnalyser.HasFairValueGap(
bar,
fvgStartBar,
fvgEndBar,
fvgDir,
3 //
);
if (hasFVG)
{
//
XCFVG *fvg;
fvg = new XCFVG();
bool isInit = fvg.Init(
fvgStartBar,
fvgEndBar,
fvgDir //
);
// if (isInit)
// {
// //
// XCBaseObject *iObj;
// bool isCreated = mPOIDrawer.CreateFairValueGap(
// fvg,
// iObj //
// );
//
// //
// if (isCreated)
// {
// }
// }
}
// //
// // Detect Fair Value Gap ...
// XOHCL fvgEndBar;
// XOHCL fvgStartBar;
// ENUM_X_DIRECTION fvgDir;
// bool hasFVG = mBarAnalyser.HasFairValueGap(
// bar,
// fvgStartBar,
// fvgEndBar,
// fvgDir,
// 3 //
// );
// if (hasFVG)
// {
// //
// XCFVG *fvg;
// fvg = new XCFVG();
// bool isInit = fvg.Init(
// fvgStartBar,
// fvgEndBar,
// fvgDir //
// );
// // if (isInit)
// // {
// // //
// // XCBaseObject *iObj;
// // bool isCreated = mPOIDrawer.CreateFairValueGap(
// // fvg,
// // iObj //
// // );
// //
// // //
// // if (isCreated)
// // {
// // }
// // }
// }
//
XOHCL obBar;
ENUM_X_DIRECTION obDir;
bool hasOB = mBarAnalyser.HasOrderBlock(
bar,
obBar,
obDir,
3 //
);
if (hasOB)
{
//
XCOrderBlock *ob;
ob = new XCOrderBlock();
bool isInit = ob.Init(
obBar,
obDir //
);
if (isInit)
{
// //
// XCBaseObject *iObj;
// bool isCreated = mPOIDrawer.CreateOrderBlock(
// ob,
// iObj //
// );
// //
// XOHCL obBar;
// ENUM_X_DIRECTION obDir;
// bool hasOB = mBarAnalyser.HasOrderBlock(
// bar,
// obBar,
// obDir,
// 3 //
// );
// if (hasOB)
// {
// //
// XCOrderBlock *ob;
// ob = new XCOrderBlock();
// bool isInit = ob.Init(
// obBar,
// obDir //
// );
// if (isInit)
// {
// // //
// // XCBaseObject *iObj;
// // bool isCreated = mPOIDrawer.CreateOrderBlock(
// // ob,
// // iObj //
// // );
// //
// if (isCreated)
// {
// Print("Order Block ...");
// }
// }
}
// // //
// // if (isCreated)
// // {
// // Print("Order Block ...");
// // }
// // }
// }
//
}
// //
// }
}
//+------------------------------------------------------------------+