NinjaTrader and the time zone on your computer
In this article, you will learn why you should be careful when you switch the time zone on your PC (maybe while traveling), and you use NinjaTrader, especially when you are doing a backtest. You will also learn how to fix this data problem.
NinjaTrader charts are based on your local PC clock
Unlike MT4, which bases its charts on your broker's clock, charts within NinjaTrader are based on your local PC clock. If you develop a trading strategy and use the trading time as a filter, you might not want to change the time zone on your PC, because this would get you an inconsistent local data. Inconsistent local data leads to poor quality backtest results.
A client of mine backtested a NinjaTrader 7 Strategy on his computer, which had a UTC+01:00 time zone. Later he decided to trade this strategy live on a VPS witch time zone was UTC-05:00 (Unfortunately, he was not allowed to change the time zone). I knew I had to adapt the strategies I developed to make them able to trade in any time zone.
After implementing the new logic that would allow the strategy to run on any time zone, I started to switch the time zone on my PC back and forth and to test if everything worked fine. Even though the logic seemed correct, and when I was unit testing, everything worked fine, I was getting different backtesting results with different time zones. I was struggling to understand why that strange behavior, until I compared the charts on two different computers (I was playing with the time zone only on one of them). When I saw that the same bars on the chart had different times, I suddenly realized why I was getting different results. As the tick data was already downloaded when using the original time zone on my computer, NinjaTrader 7 did not have to download it again, the platform just used it (but with the wrong time).
Keep the same time zone on your PC
I believe it is safer to keep the same time zone on your PC if you use it for backtesting NinjaTrader trading strategies. This way, you will avoid mixing up data with different time zones. I remember many years ago when Joe Ross (the founder of Trading Educators) coached me, and he told me that he's keeping the Chicago time on his trading computer, wherever he goes. Having always the Chicago time helped him know when it's the right time to trade. Now I found another reason; it helps me keep my data consistent.
How to fix it
In case you have changed the time zone on your computer and, you have already backtested some strategies using NinjaTrader, you can check the historical data NinjaTrader has downloaded and eventually remove it. In NinjaTrader 8 you can do it by going clicking Tools -> Historical Data in Control Center