Recent developments in brain-machine interfaces (BMIs) have proposed the use of errorrelated potentials as cognitive signal that can provide feedback to control devices or to teach them how to solve a task. Due to the nature of these signals, all the proposed error-based BMIs use discrete tasks to classify a signal as correct or incorrect under the assumption that the response is time-locked to a known event. However, during the continuous operation of a robotic device, the occurrence of an error is not known a priori and thus it is required to be constantly classifying. Here, we present an experimental protocol that allows to train a decoder and detect errors in single trial using a sliding window.