Getting error on for loop - bash script

Hi,
I am working on bash script after a long time. I am getting error near done statement while running a for loop snippet. The error says "Syntax error near unexpcted token 'done'"

please suggest what could be wrong. here is the snippet

elements=${#option_arr[@]} //an array of values
for((i=0;i<$elements;i++)); do
 if [ "${i}" -eq 0 ]; then
         BuySell="Buy"
        else if [ "${i}" -gt 0 ]; then
          if ["$BuySell" -eq "Buy" ]; then
                 BuySell="Sell"
                else
                        BuySell="Buy"
                fi
         fi
         #str="$ccyPair","$counterParty","${option_arr[${i}]}","$BuySell","$bidPrice","$askPrice","$tradeDate","$expiryDate"    
 done

Either change "else if" to "elif", which is the proper keyword for this, or add another "fi" before "done". Furthermore, "//" is not a comment introducer in bash, replace it with "#"

elements=${#option_arr[@]} #an array of values
for((i=0;i<$elements;i++)); do
 if [ "${i}" -eq 0 ]; then
         BuySell="Buy"
        elif [ "${i}" -gt 0 ]; then
          if ["$BuySell" -eq "Buy" ]; then
                 BuySell="Sell"
                else
                        BuySell="Buy"
                fi
         fi
         #str="$ccyPair","$counterParty","${option_arr[${i}]}","$BuySell","$bidPrice","$askPrice","$tradeDate","$expiryDate"
 done