Liquidity_Predator/Utilities/M_DojiCandle.mqh

15 lines
No EOL
300 B
MQL5

bool M_DojiCandle(MqlRates &CDL, int Percentage)
{
double candleSize = CDL.high - CDL.low;
double Body = MathAbs(CDL.open - CDL.close);
double BodyPercent = (Body / candleSize) * 100.0;
if(BodyPercent <= Percentage)
{
return true;
}
else
{
return false;
}
}