help!!!! ... My code is not returning false , i need help

 
#include <Trade\Trade.mqh>

double lowerBound , upperBound;

bool     IsPriceInZone(double openPrice,int zoneWidth)
{
  // Calculate the lower and upper bounds of the zone
  lowerBound = openPrice - zoneWidth;
  upperBound = openPrice + zoneWidth;
 double CurrentPrice = SymbolInfoDouble(_Symbol,SYMBOL_BID); 
  // Check if the current price is in the zone
  if (CurrentPrice >= lowerBound || CurrentPrice <= upperBound) {
    return true;
  } else {
    return false;
  }
}


void OnTick(){

// Check if the current price is in a zone of points around the open price of the candle
double OpenPrice =iOpen(_Symbol,PERIOD_CURRENT,0);
bool isInZone = IsPriceInZone(OpenPrice, 10);

// Print a message if the current price is in the zone
if (isInZone) {
  Print("The current price is in the zone");
} else {
  Print("The current price is not in the zone");
}


}
 
kekeli doe:
#include <Trade\Trade.mqh>

double lowerBound , upperBound;

bool     IsPriceInZone(double openPrice,int zoneWidth)
{
  // Calculate the lower and upper bounds of the zone
  lowerBound = openPrice - zoneWidth;
  upperBound = openPrice + zoneWidth;
 double CurrentPrice = SymbolInfoDouble(_Symbol,SYMBOL_BID); 
  // Check if the current price is in the zone
  if (CurrentPrice >= lowerBound || CurrentPrice <= upperBound) {
    return true;
  } else {
    return false;
  }
}


void OnTick(){

// Check if the current price is in a zone of points around the open price of the candle
double OpenPrice =iOpen(_Symbol,PERIOD_CURRENT,0);
bool isInZone = IsPriceInZone(OpenPrice, 10);

// Print a message if the current price is in the zone
if (isInZone) {
  Print("The current price is in the zone");
} else {
  Print("The current price is not in the zone");
}


}

this must be an and

 if (CurrentPrice >= lowerBound && CurrentPrice <= upperBound) {
 
  1. Please edit your (original) post and use the CODE button (or Alt+S)! (For large amounts of code, attach it.)
              General rules and best pratices of the Forum. - General - MQL5 programming forum #25 (2019)
              Forum rules and recommendations - General - MQL5 programming forum (2023)
              Messages Editor

  2. Your code
       if (CurrentPrice >= lowerBound && CurrentPrice <= upperBound) {
        return true;
      } else {
        return false;
      } 
    Simplified.
       return CurrentPrice >= lowerBound && CurrentPrice <= upperBound;