NexusFi: Find Your Edge


Home Menu

 





NT Backtesting


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one togier with 7 posts (0 thanks)
    2. looks_two redratsal with 3 posts (0 thanks)
    3. looks_3 Big Mike with 2 posts (2 thanks)
    4. looks_4 TonyB with 2 posts (0 thanks)
    1. trending_up 7,714 views
    2. thumb_up 2 thanks given
    3. group 6 followers
    1. forum 17 posts
    2. attach_file 0 attachments




 
Search this Thread

NT Backtesting

  #1 (permalink)
 togier 
Boston, MA
 
Experience: Advanced
Platform: NinjaTrader
Broker: IB
Trading: EUR/USD
Posts: 42 since Apr 2010
Thanks Given: 1
Thanks Received: 3

For several months now I have been developing an automated strategy to trade the EURO/USD. I've bactested and further optimized the strategy over both long and short time frames. About a month ago, I began running the strategy in realtime. Yesturday, the strategy placed one trade and lost $700 total and did not trade again for the rest of the day because it reached the strategies daily loss limit. However, last night I did a quick backtest of the same day and it showed 2 trades with a total loss of $100. The two trades were not even in the same place as what was actually placed. To say the least, my confidence has been shaken in the NT backtesting tool. Am I wrong to think this way? If the NT backtesting tool is not a good bactesting engine, then what tool should I rely on? Is their another product that works with NT that would provide more accurate results? Thx.

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Futures True Range Report
The Elite Circle
Better Renko Gaps
The Elite Circle
ZombieSqueeze
Platforms and Indicators
Are there any eval firms that allow you to sink to your …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
The Program
18 thanks
GFIs1 1 DAX trade per day journal
18 thanks
  #3 (permalink)
 
gulabv's Avatar
 gulabv 
Dallas, TX
 
Experience: Beginner
Platform: Ninjatrader
Broker: Zen-Fire
Trading: ZN, 6E
Posts: 286 since May 2010
Thanks Given: 161
Thanks Received: 169


togier,

You did not specify any details about your strategy so I am making very general comments about NT backtesting. NT replay data only stored OHLC information so if you are using Calc on Bar Close = False or if you are using anything other than time-based bars then backtesting will not give you an accurate picture. Forward testing realtime in SIM will be more helpful to your cause. There are several threads on futures.io (formerly BMT) forum that talk about NT backtesting pitfalls so I suggest you spend some time searching through the forum. The most common proposed solution is to use a second bar series in your strategy to take trades off (like a 1-bar range)

Reply With Quote
  #4 (permalink)
Tundi
Fullerton, CA
 
Posts: 201 since Dec 2010
Thanks Given: 33
Thanks Received: 98

Welcome to the frustrating world of NT backtesting!

Your question entails many facets and, without having any knowledge of the strategy you refer to, any answer is speculative. However, the main culprits could be the data series or the inescapable rule which forces backtesting to use COBC. Order type can also be a factor in that the backtester will give you optimum fills that can't be easily replicated in live trading. So, in essence, the backtesting result is like going to trading heaven without dying.

I'm not aware of more accurate backtesting engines for the retail market.

Reply With Quote
  #5 (permalink)
 togier 
Boston, MA
 
Experience: Advanced
Platform: NinjaTrader
Broker: IB
Trading: EUR/USD
Posts: 42 since Apr 2010
Thanks Given: 1
Thanks Received: 3


gulabv View Post
togier,

You did not specify any details about your strategy so I am making very general comments about NT backtesting. NT replay data only stored OHLC information so if you are using Calc on Bar Close = False or if you are using anything other than time-based bars then backtesting will not give you an accurate picture. Forward testing realtime in SIM will be more helpful to your cause. There are several threads on futures.io (formerly BMT) forum that talk about NT backtesting pitfalls so I suggest you spend some time searching through the forum. The most common proposed solution is to use a second bar series in your strategy to take trades off (like a 1-bar range)


Thanks for your reply. I'm sorry I'm not able to provide more detail about the strategy. I was actually looking for an abstract answer. I have spent a sizable amount of time reading through the backtesting threads. I use the BetterRenko bars to trade on mainly because of the phantom bar issue associated with Renko. I use CalculateOnbarClose = TRUE. I'm not exactly sure I understand what you mean by a second bar series. Do you mean multi time frame. Thanks for your help.

Started this thread Reply With Quote
  #6 (permalink)
 togier 
Boston, MA
 
Experience: Advanced
Platform: NinjaTrader
Broker: IB
Trading: EUR/USD
Posts: 42 since Apr 2010
Thanks Given: 1
Thanks Received: 3


Tundi View Post
Welcome to the frustrating world of NT backtesting!

Your question entails many facets and, without having any knowledge of the strategy you refer to, any answer is speculative. However, the main culprits could be the data series or the inescapable rule which forces backtesting to use COBC. Order type can also be a factor in that the backtester will give you optimum fills that can't be easily replicated in live trading. So, in essence, the backtesting result is like going to trading heaven without dying.

I'm not aware of more accurate backtesting engines for the retail market.

Thanks for your reply. I know backtesting is "not always that accurate" and I know sim trading is far more accurate but you can't beat the speed that backtesting offers. The only reason I asked about other products was that I am familar with NeuroShell and wasn't sure if something like that or Matlab might produce more accurate results. As you suggest, it's probably just the inherent flaw of bactesting and not the product itself. Thx.

Started this thread Reply With Quote
  #7 (permalink)
 
redratsal's Avatar
 redratsal 
Milan (I)
 
Experience: Advanced
Platform: Ninjatrader
Broker: Kinetick
Trading: FDAX,6E,CL,YM,NQ,ES
Posts: 1,648 since Oct 2010
Thanks Given: 1,215
Thanks Received: 2,090

Also, NT data recording and consequent plotting on the chart is not always correct, you might check this thread . Assuming your strategy is really profitable, the only way to discover bugs is going live and compare the results.

Data feed quality is an issue as well, it will affect your entries/exits and consequent profitability, don't use IB.

Visit my NexusFi Trade Journal Reply With Quote
  #8 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,396 since Jun 2009
Thanks Given: 33,172
Thanks Received: 101,536

As others have said, stay away from exotic bar types (Kase, Renko, 3LB, etc), implement a 1-range second dataseries and execute all orders on that dataseries, and then the backtest will be as accurate as it can be.

A backtest is only a small piece of the puzzle, it just gets you on the road. To drive down the freeway you need to forward test for a while in a live market.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #9 (permalink)
 togier 
Boston, MA
 
Experience: Advanced
Platform: NinjaTrader
Broker: IB
Trading: EUR/USD
Posts: 42 since Apr 2010
Thanks Given: 1
Thanks Received: 3


Big Mike View Post
As others have said, stay away from exotic bar types (Kase, Renko, 3LB, etc), implement a 1-range second dataseries and execute all orders on that dataseries, and then the backtest will be as accurate as it can be.

A backtest is only a small piece of the puzzle, it just gets you on the road. To drive down the freeway you need to forward test for a while in a live market.

Mike


Thanks Mike. I've been using a 5 tick Better Renko bar and as far as backtesting is concerned, it is a very profitable system. Average trade is $205 with a probability of 54%. That said, as much as I try, the bank fails to cash the checks the backtesting tool writes. The 1 tick range bar is an interesting idea. However, I don't understand what you mean by "second dataseries". Are you suggesting just scraping the use of the Better Renko bar all together or use it in conjunction with the 1 tick range bar. Sorry for my thick head. I'm sure my wife will simpathize with you.

If I were to use just a 1 tick range bar, that leads me to believe that the targets will be much smaller and the number of trades daily would be much higher. Not that I have a problem with that but I am just thinking through the idea. Thx.

Started this thread Reply With Quote
  #10 (permalink)
 togier 
Boston, MA
 
Experience: Advanced
Platform: NinjaTrader
Broker: IB
Trading: EUR/USD
Posts: 42 since Apr 2010
Thanks Given: 1
Thanks Received: 3



redratsal View Post
Also, NT data recording and consequent plotting on the chart is not always correct, you might check this thread . Assuming your strategy is really profitable, the only way to discover bugs is going live and compare the results.

Data feed quality is an issue as well, it will affect your entries/exits and consequent profitability, don't use IB.

Thanks for your reply. I'm most interested with your last note on IB. While I agree that the data sampling issue is not great, FX cash data is inherently flawed anyway. Is it that you don't like IB at all or just the data they provide. I tried Kenetick out for a month just to see how good it was and it is great data but I wasn't sure it would really make a difference in what I was doing. What I like the most about it was that they provided 4 months of historical tick data. I usually place between one and two trades a day so its not like I'm doing high frequency trading. So, I'm just not sold on the value it would bring me personally. I guess if I was trading a more centralized market at a higher frequency rate, it would probably mean more to me. Thx.

Started this thread Reply With Quote




Last Updated on November 1, 2012


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts