backtesting in NT - NinjaTrader | futures io social day trading
futures io futures trading


backtesting in NT
Updated: Views / Replies:3,237 / 8
Created: by gparkis Attachments:1

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • 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.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

backtesting in NT

  #1 (permalink)
Elite Member
New York City, NY/USA
 
Futures Experience: Intermediate
Platform: NT
Favorite Futures: 6E, ZN, CL
 
Posts: 121 since Dec 2010
Thanks: 3 given, 74 received

backtesting in NT

I have purchased historical tick data to run in NT for some risk strategy building. I know that in MT4 one can back test on on tick data to get 99% for intra bar accuracy; can the same be said of NT when utilizing back testing on tick data?

Reply With Quote
 
  #2 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,238 since Jun 2009
Thanks: 29,350 given, 83,218 received

Yes, the capability is there to backtest on tick data.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #3 (permalink)
Elite Member
New York City, NY/USA
 
Futures Experience: Intermediate
Platform: NT
Favorite Futures: 6E, ZN, CL
 
Posts: 121 since Dec 2010
Thanks: 3 given, 74 received


will this need special script or is it just in how i load the tick data?

Reply With Quote
 
  #4 (permalink)
Elite Member
Denver, CO
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: NinjaTrader Brokerage
Favorite Futures: ES
 
NinjaTrader's Avatar
 
Posts: 1,260 since May 2010
Thanks: 153 given, 1,890 received


gparkis View Post
I have purchased historical tick data to run in NT for some risk strategy building. I know that in MT4 one can back test on on tick data to get 99% for intra bar accuracy; can the same be said of NT when utilizing back testing on tick data?

I am not sure 100% what you are after but this reference sample might put you in the right direction Strategy: Backtesting NinjaScript Strategies with an intrabar granularity - NinjaTrader Support Forum.

Reply With Quote
 
  #5 (permalink)
Elite Member
NC, USA
 
Futures Experience: None
Platform: None Yet
Favorite Futures: Guitar
 
MrYou's Avatar
 
Posts: 403 since Jun 2011
Thanks: 618 given, 193 received

As of today (NT v7) strategies can not be backtested intra-bar. Backtesting historical data can only be performed on the close of the bar. Backtesting historical data defaults to a "fixed" CalculateOnBarClose = true. OnMarketData or OnMarketDepth can not be used on historical data.

You can only use Market Replay to "backtest" against intra-bar, OnMarketData, or OnMarketDepth.

Also there are "intra-bar granularity" issues when backtesting multi-timeframe strategies.

Reply With Quote
 
  #6 (permalink)
Elite Member
San Diego, CA USA
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: ES
 
GridKing's Avatar
 
Posts: 3,650 since May 2011
Thanks: 588 given, 877 received

Would there be reasons why a strategy needs to be separated into two so that buy side and sell side have to be back tested separately?

What are some best practices so that there is no conflicts I guess ... Thanks

"Successful trading is one long journey, not a destination" Peter Borish Former Head of Research for Paul Tudor Jones speaking on conversations with John F. Carter
Reply With Quote
The following user says Thank You to GridKing for this post:
 
  #7 (permalink)
Trading Apprentice
Denver, Colorado, USA
 
Futures Experience: Intermediate
Platform: Ninjatrader
Broker/Data: Kinetick
Favorite Futures: Forex
 
Posts: 36 since Aug 2011
Thanks: 6 given, 17 received


MrYou View Post
As of today (NT v7) strategies can not be backtested intra-bar. Backtesting historical data can only be performed on the close of the bar. Backtesting historical data defaults to a "fixed" CalculateOnBarClose = true. OnMarketData or OnMarketDepth can not be used on historical data.

You can only use Market Replay to "backtest" against intra-bar, OnMarketData, or OnMarketDepth.

Also there are "intra-bar granularity" issues when backtesting multi-timeframe strategies.

The reference sample NinjaTrader provided above would work here. It's an example on adding a second series to the strategy that has tick resolution.

What issues have you run into?

Reply With Quote
 
  #8 (permalink)
Elite Member
San Francisco, CA
 
Futures Experience: Advanced
Platform: NinjaTrader, Tradestation
Favorite Futures: ES
 
Posts: 2 since Sep 2012
Thanks: 8 given, 0 received

Hi Antisyzygy,
I've been trying to get the following issue addressed in NT forum but no luck.
I have looked at their reference code and all the docs.

I appreciate if you could shed some light.

Unexpected behavior of OnOrderUpdate() calls with Intrabar data

Although I am using Intrabar data (1Min), the OnOrderUpdate() was always called on the main time frame (60Min)

Here are the specifics:
Instrument: ES ##-##
Main Time Frame = 60 Min
Secondary Time Frame = 1 Min
Bar in question was on 11/16/2012 at 11:30 AM
The Buy order was filled at 1350.75 at time 11:30AM
The Profit target was filled at 1354.75 at time 11:30AM
Looking at the 1Min Chart, I see that the 1354.75 level was not touched until 12:16PM

So, it looks like the OnOrderUpdate() is called only on the 60Min time frame. I expect
OnOrderUpdate() to be called around time 12:16PM based on the 1Min data.

I printed 'Time[0]' at the beginning of OnOrderUpdate(). Here are the fills of the Buy and the Profit Target:
OnOrderUpdate Time: 11/16/2012 11:30:00 AM
IOrder Order='NT-00081/Sim101' Name='Buy' State=Filled Instrument='ES ##-##' Action=Buy Limit price=0 Stop price=0 Quantity=1 Strategy='RKMTest' Type=Market Tif=Gtc Oco='' Filled=1 Fill price\
=1350.75 Token='27ebb46b1e1f48589cfab756b19f1d66' Gtd='12/1/2099 12:00:00 AM'

OnOrderUpdate Time: 11/16/2012 11:30:00 AM
IOrder Order='NT-00083/Sim101' Name='Profit target' State=Filled Instrument='ES ##-##' Action=Sell Limit price=1354.75 Stop price=0 Quantity=1 Strategy='RKMTest' Type=Limit Tif=Gtc Oco='NT-00\
050-4323' Filled=1 Fill price=1354.75 Token='8ce78dd643fc489093af083bda429056' Gtd='12/1/2099 12:00:00 AM'

The Code for the strategy is attached.

Attached Files
Register to download File Type: cs RKMTest.cs (3.1 KB, 29 views)
Reply With Quote
 
  #9 (permalink)
Elite Member
Sydney
 
Futures Experience: Advanced
Platform: NinjaTrader
Favorite Futures: Forex
 
Posts: 63 since Nov 2015
Thanks: 31 given, 40 received


rkm2011 View Post
Hi Antisyzygy,
I've been trying to get the following issue addressed in NT forum but no luck.
I have looked at their reference code and all the docs.

I appreciate if you could shed some light.

Unexpected behavior of OnOrderUpdate() calls with Intrabar data

Although I am using Intrabar data (1Min), the OnOrderUpdate() was always called on the main time frame (60Min)

Here are the specifics:
Instrument: ES ##-##
Main Time Frame = 60 Min
Secondary Time Frame = 1 Min
Bar in question was on 11/16/2012 at 11:30 AM
The Buy order was filled at 1350.75 at time 11:30AM
The Profit target was filled at 1354.75 at time 11:30AM
Looking at the 1Min Chart, I see that the 1354.75 level was not touched until 12:16PM

So, it looks like the OnOrderUpdate() is called only on the 60Min time frame. I expect
OnOrderUpdate() to be called around time 12:16PM based on the 1Min data.

I printed 'Time[0]' at the beginning of OnOrderUpdate(). Here are the fills of the Buy and the Profit Target:
OnOrderUpdate Time: 11/16/2012 11:30:00 AM
IOrder Order='NT-00081/Sim101' Name='Buy' State=Filled Instrument='ES ##-##' Action=Buy Limit price=0 Stop price=0 Quantity=1 Strategy='RKMTest' Type=Market Tif=Gtc Oco='' Filled=1 Fill price\
=1350.75 Token='27ebb46b1e1f48589cfab756b19f1d66' Gtd='12/1/2099 12:00:00 AM'

OnOrderUpdate Time: 11/16/2012 11:30:00 AM
IOrder Order='NT-00083/Sim101' Name='Profit target' State=Filled Instrument='ES ##-##' Action=Sell Limit price=1354.75 Stop price=0 Quantity=1 Strategy='RKMTest' Type=Limit Tif=Gtc Oco='NT-00\
050-4323' Filled=1 Fill price=1354.75 Token='8ce78dd643fc489093af083bda429056' Gtd='12/1/2099 12:00:00 AM'

The Code for the strategy is attached.

Did you end up finding a solution for this? I have exactly the same problem

Impossible fill happening on the same bar for EnterLongLimit - NinjaTrader Support Forum

Reply With Quote

Reply



futures io > > > > backtesting in NT

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
NT Backtesting togier NinjaTrader 17 November 1st, 2012 07:11 AM
ES min data needed for NT backtesting from the very beginning ( 09 1997 ) till today kittyan Reviews of Brokers and Data Feeds 1 May 23rd, 2011 05:02 PM
Simple template to convert NT Strategy to NT IUndicator visounds NinjaTrader Programming 4 March 31st, 2011 08:16 AM
Converting your Indicator for free --> NT 6.5 to NT 7 Druid The Elite Circle 21 September 27th, 2010 09:49 AM
NT 6.5 issue - image sometimes stays on screen after I close NT window Todd The Elite Circle 11 March 19th, 2010 10:14 AM


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

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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 2017-12-11 in 0.14 seconds with 38 queries on phoenix via your IP 54.83.122.227