PDA

View Full Version : Difference Betwwen Real time & BackTest Mode


dgregor5
10-31-2007, 02:42 PM
Hi.
I am a little confused.
I am seeing signficantly different results between backtest mode & real time trading.
In the strategy, I have CalculateOnBarClose = False, but use the If (FirstTickOfBar) = true to enter a trade if certain criteria are met.

Two discrepencies:

1/ Certain trades appear on backtest that did not occur in real time mode& vice-versa.
2/ Certain trades being entered one bar later in backtest mode vs. real time mode.

The way is see it, if I am using the First Tick of Bar function to enter a trade there should be no discrepency between backtest mode & real time mode in the way trades are entered since the conditions should be identical (e.g. EMA, ATR, price momentum, MACD, etc.)

Any ideas guys.
thx in advance

David

NinjaTrader_Ray
10-31-2007, 02:50 PM
Hi David,

Here is some information that may provide some insight on this.

http://www.ninjatrader-support.com/HelpGuideV6/DiscrepanciesReal-TimeVsBacktest.html

dgregor5
10-31-2007, 03:37 PM
thx Ray, but I don't think that is the issue.
one question, in backtest mode, are the indicators calculated at the close of the bar to define whether entry criteria are met for the open of the subsequent bar or are the indicators calculated at the open of the subsequent bar.....
Since I am using entry criteria calculated using FirstTickOfBar, this could make the difference.

thx!
David

NinjaTrader_Ray
10-31-2007, 03:43 PM
In backtest, its *always* close of bar. If your strategy code executes tick by tick for sure you will have different results than when in backtest. If you use FirsTickOfBar, you have to check the values of 1 bar ago to be the same as running on the close of the bar.