results: backtesting vs market replay vs live

Hi. If I have indicator X and use it on a backtest with an entryprice calculated from previous bar ex. entryprice= MvgAvg(10 Bar, Close). Let's say the buy trigger is

Buy = low < entryprice and X> 10 then buy at entryprice.

The test comes out 70%W/ L, good profit faactor , excellent Sharpe Ratio. It seems to good to be true since in real life trading, the last bar on the right is still being formed so does the fact that I did not offset x mean I am "cheating" in the backtest? I changed the buy trigger to

Buy = low < entryprice and X(1 bar back) > 10 then buy at entryprice and the backtest goes to 55%W/L . Does that imply that I looked" into the future in the first buy statement? (due to the incomplete nature of the right most bar? )

In entryprice= MvgAvg(10 Bar, Close) you must put a lag other wise you are forward looking.

entryprice= MvgAvg(10 Bar, Close, 1)
 
Thanks Sergio. I changed it to a 1 bar lag and confirmed that that is indeed more honest and not forward looking since when it was pasted to my chart as an indicator, it's value at Bar 0 (right most ) did not change as the "close mark" went all over the place since it is still the made.
 
Back
Top