Unexpected end of program/ Unbalanced parentheses Error

 
I want to fix first the;
input bool isOneMin = true;

Once it is executing i can then code the rest of the conditions;

input bool isFiveMin = false;
input bool isFifteenMin = false;

I am having an error balancing my parentheses and its cracking head. I am suspecting when i created this variable but not sure where i got wrong. I need help. 

int getOneMinSignal()

Here is the EA. 

#include <Trade/Trade.mqh>
CTrade trade;

input group "==== EAs Timeframe ===="
input bool isOneMin = true;
input bool isFiveMin = false;
input bool isFifteenMin = false;
                                               
int totalBars; 

int OnInit()
  {
   totalBars = iBars(_Symbol,PERIOD_CURRENT);   // define total number of bars in the chart
   
   trade.SetExpertMagicNumber(InpMagicNumber);  // set magic number to trade object 
   return(INIT_SUCCEEDED);
  }

void OnDeinit(const int reason)
  {
   
  }

void OnTick(){
   int bars = iBars(_Symbol,PERIOD_CURRENT);//with every single tick calculate the total amount bars again
   if(bars > totalBars){ //if we have more bars than before
      totalBars = bars;  //then we have new bars on the chart updated
        
   double Ask = NormalizeDouble(SymbolInfoDouble(_Symbol,SYMBOL_ASK),_Digits); // calculate the ask price
   double Bid = NormalizeDouble(SymbolInfoDouble(_Symbol,SYMBOL_BID),_Digits); // calculate the bid price
   
   // process this information only once per bar 
      if(isOneMin){
         int isOneMinSignal = getOneMinSignal();
         if(OneMinSignal < 0){
           Print(__FUNCTION__," > New OneMin sell signal..."); 
           trade.Sell(1.00,_Symbol,Bid,(Bid+60000 * _Point),(Bid - 20000 * _Point),"OneMin");
         }
      }
     
int getOneMinSignal(){  
   MqlRates PriceInfo[]; // create an array for price
    
   ArraySetAsSeries(PriceInfo,true); // Sort the price array from the current candle downwards
   
   int PriceData = CopyRates(_Symbol,_Period,0,3,PriceInfo); // fill the array with price data
   
   // create Arrays for Ichimoku and SMA
   double IchimokuArray[],oneMAArray[],twentyoneMAArray[],fiftyMAArray[];
   
   // define the arrays
   int IchimokuDefinition     = iIchimoku(_Symbol,_Period,9,9,52);
   int oneMADefinition        = iMA(_Symbol,_Period,1,0,MODE_SMA,PRICE_OPEN);
   int twentyoneMADefinition  = iMA(_Symbol,_Period,21,0,MODE_SMA,PRICE_OPEN);
   int fiftyMADefinition      = iMA(_Symbol,_Period,50,0,MODE_SMA,PRICE_OPEN);
   
   // sort the price arrays from the current candle downwards
   ArraySetAsSeries(IchimokuArray,true);
   ArraySetAsSeries(oneMAArray,true);
   ArraySetAsSeries(twentyoneMAArray,true);
   ArraySetAsSeries(fiftyMAArray,true);
   
   // fill the arrays with price data
   // copy defined indicator, place in one line, start from current candle for 3 candles, store in array
   CopyBuffer(IchimokuDefinition,0,0,3,IchimokuArray);
   CopyBuffer(oneMADefinition,0,0,3,oneMAArray);
   CopyBuffer(twentyoneMADefinition,0,0,3,twentyoneMAArray);
   CopyBuffer(fiftyMADefinition,0,0,3,fiftyMAArray);

// OneMinSell Signal
   if(oneMAArray[0] < IchimokuArray[0]) { // if current price open is below Ichimoku
      if(oneMAArray[0] < twentyoneMAArray[0]) {  // if current price open is below 21 MA
         if(IchimokuArray[1] > fiftyMAArray[1]) {  // if previously Ichimoku was above 50 MA
            if(IchimokuArray[0] < fiftyMAArray[0]){ // if current Ichimoku is below 50 MA       
            createObj(time,high,234,-1,clrRed,"OneMin"); //-1 means sell signal
            return -1;
            }
         }
      }
   }                 
   return 0;   
}

void createObj(datetime time, double price, int arrowCode,int direction, color clr, string txt){ 
   string objName = "";
   StringConcatenate(objName, "Signal@",time,"at",DoubleToString(price,_Digits),"(",arrowCode,")"); 
   if(ObjectCreate(0,objName,OBJ_ARROW,0,time,price)){
      ObjectSetInteger(0,objName,OBJPROP_ARROWCODE,arrowCode);
      ObjectSetInteger(0,objName,OBJPROP_COLOR,clr);
      if(direction > 0) ObjectSetInteger(0,objName,OBJPROP_ANCHOR,ANCHOR_TOP); // > 0 meaning buy signal      
      if(direction < 0) ObjectSetInteger(0,objName,OBJPROP_ANCHOR,ANCHOR_BOTTOM); // < 0 meaning sell signal      

   }
   string objNameDesc = objName+txt;
   if(ObjectCreate(0,objNameDesc,OBJ_TEXT,0,time,price)){
      ObjectSetString(0,objNameDesc,OBJPROP_TEXT," "+txt);
      ObjectSetInteger(0,objNameDesc,OBJPROP_COLOR,clr);
      if(direction > 0) ObjectSetInteger(0,objNameDesc,OBJPROP_ANCHOR,ANCHOR_TOP);      
      if(direction < 0) ObjectSetInteger(0,objNameDesc,OBJPROP_ANCHOR,ANCHOR_BOTTOM);      
      
   }   
}

 
Brian Jaka:
I want to fix first the;

Once it is executing i can then code the rest of the conditions;

I am having an error balancing my parentheses and its cracking head. I am suspecting when i created this variable but not sure where i got wrong. I need help. 

Here is the EA. 

I suggest to use the built-in styler to find your imbalance.

It's easy to use, and find your misformed code.