Liquidity_Predator/Higher TimeFrame/M_CheckBuyLiqu.mqh

26 lines
874 B
MQL5
Raw Permalink Normal View History

2026-01-31 07:59:15 +01:00
bool M_CheckBuyLiqu()
{
// Candle 0 is the CURRENT candle that is NOT CLOSED YET !!!
bool bBullish_2 = stGVL.Candle_HTF[2].open < stGVL.Candle_HTF[2].close;
bool bBearish_3 = stGVL.Candle_HTF[3].open > stGVL.Candle_HTF[3].close;
2026-01-31 07:59:15 +01:00
bool bPattern = bBullish_2 && bBearish_3;
bool bNoWig = stGVL.Candle_HTF[2].open < stGVL.Candle_HTF[1].low && stGVL.Candle_HTF[3].close < stGVL.Candle_HTF[4].low;
2026-01-31 07:59:15 +01:00
if (bPattern && bNoWig)
{
double Liqu = MathMin(stGVL.Candle_HTF[2].low, stGVL.Candle_HTF[3].low);
2026-01-31 07:59:15 +01:00
M_ArrayUnshiftLimit_double(stGVL.BuyLiquidity, Liqu, nMaxLiqus);
ArraySortDesc_double(stGVL.BuyLiquidity); // Sort the array so the highest is always the first
2026-02-11 19:29:28 +01:00
M_LogInfo("Buyside Liquidity added: ");
2026-01-31 07:59:15 +01:00
if (!bOptimizationRun)
{
ArrayPrint(stGVL.BuyLiquidity);
}
}
return true;
}