The development of accurate forecasting systems for real-world time series modeling is a challenging task. Due to the presence of temporal patterns that change over time, the adoption of a single model can lead to underperformed forecasts. In this scenario, Multiple Predictor Systems (MPS) emerge as an alternative to adopting single models since they struggle to learn in the presence of temporal patterns that change over time. Dynamic prediction/ensemble selection is a special case of MPS where each model is an expert in the time series's specific patterns. In dynamic selection, instead of combining all models, the most competent models per test pattern are selected. A criterion commonly used is to evaluate the models' performance in the region of competence, formed by the patterns present in the in-sample set (training or validation sets) more similar to the test pattern. Thus, the region of competence's quality is a key factor in the precision of the MPS. However, adequately defining the similarity criterion and the size of the region of competence is challenging and problem-dependent. Furthermore, there is no guarantee that similar data exist in the in-sample set. This paper proposes a dynamic selection approach entitled Dynamic Selection based on the Nearest Windows (DSNAW) that selects one or more competent models according to their performance in the region of competence composed of the nearest antecedent windows to the new target time window. This strategy assumes that the temporal windows closer to a test pattern have a behavior more similar to the target than in-sample data. The experimental study using ten well-known time series showed that the DSNAW outperforms the literature approaches.