The concept of transactive energy (TE) been adapted in the regulation of electricity market within the context of economic planning and control for grid reliability enhancement. The objective is to improve productivity and participation of the players in the market that is composed of distributed energy resources (DER). The main goal of implementing a market structure based on TE is to secure permission for the market players so that they could attain a higher payoff. In this study, an optimization-based algorithm in which an objective function premised on economic strategies, distribution limitations and the overall demand in the market structure is proposed. The objective function is solved for near global optima using four heuristically guided optimization algorithms. The proposed algorithm which ensures that none of the independent players has priority and/or advantage over others, emphasizes optimum use of electrical/thermal energy distribution resources, while maximizing profit for the owners of the home microgrids (H-MGs). Reduction in the market clearing price (MCP) for further participation and the response of the consumers' responsive loads are also considered in the study. The feasibility of the proposed algorithm is validated in a coalition formation scenario among the existing H-MGs. Results show an increase in the profit attained, enhanced system reliability and a reduction in the electricity cost of the consumers.