The urge for seamless and ubiquitous connectivity for heterogeneous devices and networks to deliver desired results has gathered a lot of attention of researchers, academicians and industry experts. To a large extent, this issue has been resolved by cloud computing through task offloading either partially or fully but sending so much data on cloud create overheads. So, a particular task has to be uploaded or not and handoff to be initiated or not is a major decision. Through this paper, an algorithm to take the decision for handoff and switching to the most lucrative network has been proposed. The scheme aims to preserve and provide the users with Quality of Service and Quality of Experience while keeping in mind the criteria of offloading traffic to another cell or network based on the number of mobile users, type of application being used on the mobile, available bandwidth, and network load. The proposed mobile edge architecture may improve the timely execution of the handover process, greatly reduces the ping-pong rate and terminal overhead.