Expert Advisor & back tests

 
Has anyone had any luck with getting the time of the bars and the historical data to match the charts. For example, if I have a 15min chart on my screen there is data with OHLC and the values of my indicators. However, when I back test the values I get would make the candle a bar off with strange values. Sometimes, the indicator values from the back test data are not even close to the ones plotted on the 15 chart.
 
Has anyone had any luck with getting the time of the bars and the historical data to match the charts. For example, if I have a 15min chart on my screen there is data with OHLC and the values of my indicators. However, when I back test the values I get would make the candle a bar off with strange values. Sometimes, the indicator values from the back test data are not even close to the ones plotted on the 15 chart.


Some brokers have a server for real trading and another one for demo. Usually, the quotes are NOT the same on both !!!. So when you backtest, it's important you are logged on the server you want to BT : it may be you have opened a chart on your real and do the BT on your demo...
MT stores two different history files : one for trading (real or demo) and, I don't know why, another one for testing purpose (real or demo too), so all this goes fastly to a big salad...
Good luck...
 
Thanks for the reply... I think my problem is that I am using Global variables from my indicator. When I back test, I get the current values rather than historical.