backtesting discrepency with forward testing - NinjaTrader Programming | futures trading

Go Back

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming

backtesting discrepency with forward testing
Started:April 16th, 2010 (09:58 PM) by phyzfer Views / Replies:1,481 / 2
Last Reply:April 28th, 2010 (12:49 PM) Attachments:0

Welcome to

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple, and we will never resell your private information.

-- Big Mike

Thread Tools Search this Thread

backtesting discrepency with forward testing

Old April 16th, 2010, 09:58 PM   #1 (permalink)
Elite Member
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Mirus/Zen-FIre
Favorite Futures: GC, ES
Posts: 73 since Mar 2010
Thanks: 40 given, 31 received

backtesting discrepency with forward testing

Hi all,

I am having some difficulty using NT's built in backtester. Here's some background. I have a fairly sophisticated position-management based NT7 strategy that scales in and scales out on multiple legs (separate IOrders). The strategy works perfectly fine during forward testing and executes all orders/traders perfectly as to the rules. However every time I run the backtester, over whatever period (1 day, 1 week, 1 month, etc), the backtester takes a lot of time (which I understand) and comes back with exactly 2 trades. One entry and One exit for the FIRST leg. The entry is the first trade that is executed on the first day (if it is triggered) and the last trade is the exit at the end of the period (end of day exit)).

Again during forward testing the strategy works perfectly fine, but when I run the backtest (the standard NT7 backtest), I get 2 trades.

I realized a few things while going through this process:

1. CalculateOnBarClose has to be set to true (although the strategy is a tick-based strategy)
2. I need to comment out the Historical check (obviously)

Are there any other tidbits of information I need to implement specifically for backtesting (I'm hoping its something simple I'm overlooking). Also, are the above two realizations true realizations?


Reply With Quote

Old April 16th, 2010, 09:58 PM   #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.


Old April 28th, 2010, 12:49 PM   #3 (permalink)
Elite Member
Castle Pines N, CO.
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Amp Futures/Zen-Fire)
Favorite Futures: ES
Posts: 201 since Jul 2009
Thanks: 196 given, 121 received

Bogus Ninja backtesting

Here is what my testing has shown about Ninja Strategy Analyzer , its a joke(too bad the jokes on us!)... There are 3 types of data Ninja has,, Real Time(same as sim mode during the day, wether trading live or not), this is where the rubber hits the road... The next best data is recording the daily files and doing a playback,, course less u can keep ninja up 24hrs a day(lots of luck),, u can only test one day or so at a time.. The historical data (Strategy Analyzer) is just a joke.. The further u move away from daily bars the less accurate things get,, by the time U get to 1 min bars forget it.. All the other types of charts , range , vol, tic, etc..--- Forget it on the historical testing..
. I sent in a suggestion that NT7 spend more time with the ability to merge the daily recorded files and forget about that historical trash...
Do a test so u dont fool yourself.. Let your strategy run in sim mode during the trading hours,,,, be sure to print out before u disconnect the data,,, the daily stats on the strategy(real time).. If u disconnect the data all the real time is merged ((and lost) with the historical and becomes worthless...
1. So now u got a printout of today real time..
2. Reload Historical chart data,, print out the stats again (this is what u would see with the strategy analyzer,
3.. Do a replay of the data for the day u recorded (this will be closer or almost right on
what ur first real report said...
4. Run the Strategy Analyzer and feel bad about all the time u wasted with historical data.

If u look at the charts the differences are so minute that ur eye cant pick it up.. So u really need to test code in like a bot strategy and let it go..

A tic here and a tic there,, but since this is a game of tics-------------------------

If anyone has had any better luck with this,, please post.. I can post screen shots of a strategy I run on range 2 bars and v2000. These totally stink on the Strategy Analyzer and u would be afraid to trade but make money every month for me... If u ask Ninja they have a convenient link that seems to say, dont trust any of this...

Turning on the traceorders = true (output window),, checking the log and trace file will give u a clue as to what is blowing up on ur order entry problem,, I have had similar issues,, and it is usually a stop order blowing up or placing the wrong type of order for where the current price is.. I have had that happen to me ,, get in one trade only then gets out end of day...

Last edited by gg80108; April 28th, 2010 at 01:05 PM.
Reply With Quote

Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming > backtesting discrepency with forward testing

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

An Afternoon with FIO trader bobwest

Elite only

NinjaTrader 8: Programming Profitable Trading Edges w/Scott Hodson

Elite only

Anthony Drager: Executing on Intermarket Correlations & Order Flow, Part 2

Elite only

Adam Grimes: Five critically important keys to professional trading

Elite only

Machine Learning Concepts w/FIO member NJAMC

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Dec 1

NinjaTrader 8: Features and Enhancements

Dec 6

Similar Threads
Thread Thread Starter Forum Replies Last Post
Going forward JEHs Elite Trading Journals 265 June 2nd, 2013 07:52 PM
Walk Forward Experiment Silver Dragon Elite Automated Trading 327 September 8th, 2012 11:56 PM
Testing the BackTesting >> SIM Trader.Jon NinjaTrader Programming 5 March 25th, 2011 10:38 AM
Sharpe ratio... 1 Step Forward ... lots more to go Trader.Jon Elite Automated Trading 2 December 13th, 2010 03:12 PM
Walk Forward caprica NinjaTrader 4 August 31st, 2009 05:51 PM

All times are GMT -4. The time now is 06:06 PM.

Copyright © 2016 by All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts

Page generated 2016-10-21 in 0.09 seconds with 19 queries on phoenix via your IP