Trust brings a novel means to improve the security of entities. Entities potentially initiate interactions with each other without having prior contacts. These interactions can either be formed directly between two entities or indirect through the recommendation of their acquaintances or third parties. In this paper, we present a novel trust model according to historical interaction between entities so that, the relations between entities are modeled based on four types (i.e. completely successful, completely unsuccessful, relatively successful and relatively unsuccessful) of their prior interactions. We also consider the reward and penalty for encouraging honest behaviors and preventing malicious behaviors, respectively. Unlike other proposed models, instead of taking into account the fixed amount of interactions for the experience level, in this paper, to calculate more accurate we have used the confidence interval to determine the level of experience. Also, to resist selfish and malicious behavior, the recommendation trust value for an entity computed by calculating the similarity-weighted recommendations of the entities that have interacted with him according to adjusted cosine similar function. In addition, we have developed the Petri Net model for design, analysis, and performance evaluation of the proposed model. By performing empirical evaluations, we have demonstrated that various scenarios can be better explained by our proposed reward and penalty trust model based on the confidence interval (RTMC) rather than the commonly used classical models. Simulation results and theoretical analysis proved that the RTMC promotes interaction between entities with containment capability in synergies cheating.