The advent of portable cardiac monitoring devices has enabled real-time analysis of cardiac signals. These devices can be used to develop algorithms for real-time detection of dangerous heart rhythms such as ventricular arrhythmias. This paper presents a Markov model based algorithm for real-time detection of ventricular tachycardia, ventricular flutter, and ventricular fibrillation episodes. The algorithm does not rely on any noise removal pre-processing or peak annotation of the original signal. When evaluated using ECG signals from three publicly available databases, the model resulted in an AUC of 0.96 and F1-score of 0.91 for 5-second long signals and an AUC of 0.97 and F1-score of 0.93 for 2-second long signals.