Value at risk (VaR) is one of the most important risk measures for computing risk which is entered in financial framework in past two decades. In general there are three approaches including parametric, nonparametric and semi-parametric is used for estimating of VaR. this paper present a new method that is named window simulation which is classified in nonparametric approach. Processing of VaR calculation in window simulation method based on reproduction of data such as Monte Carlo simulation. But, in this new method, data production is done in basis of distance and similarity measures. Considering generated distribution quantile, VaR is estimated. Next, VaR of Tehran Stock Exchange indices are computed by this method. Also the accuracy of estimated VaR is evaluated by backtesting statistics. Empirical results indicate that based on window method, the best outcome is associated to measures of Euclidean, DTW, Kolmogorov-Smirnov, square χ^2 , distance-similar and cosine respectively.