The performance of the Dendritic Cell Algorithm (DCA) is promising in the ordered data set, however, with the context changing multiple times in quick succession there will be a sudden drop in the accuracy, and the rate of false positives and false negatives will increase significantly. A Multiplying and Merging Dendritic Cell Algorithm (MMDCA) is proposed in the light of the unordered data set in anomaly detection. Firstly the data set is multiplied n times, i.e., n instances are generated for each type of antigen, then each instance is assessed, and finally the n assessments of each type of antigen will be merged to get the final result. Experiments show that the algorithm presented has considerable detection accuracy and stable detection performance.