NexusFi: Find Your Edge


Home Menu

 





Historical Data and Marketreplay: Strategy not taking all trades


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one kidvic with 2 posts (0 thanks)
    2. looks_two sam028 with 1 posts (0 thanks)
    3. looks_3 ToMerK with 1 posts (1 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 1,286 views
    2. thumb_up 1 thanks given
    3. group 3 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread

Historical Data and Marketreplay: Strategy not taking all trades

  #1 (permalink)
kidvic
Los Angeles, CA
 
Posts: 92 since Mar 2015
Thanks Given: 13
Thanks Received: 3

So I've been testing a strategy on market replay. I downloaded 20 days from the ninjatrader server, and as well downloaded the historical data for those same 20 days, (same instrument, same contract, same date/times). Then when I backtetsted that same strategy on the historical version, I got DIFFERENT results!
I checked the graphs, to make sure they lined up, and they did.
Then I went to look at the trades they took, and noticed that on the historical data some of the trades weren't being taken.
Mind you, this is the same strategy, with the same time-frame, same expiration, same dates, same chart.
What is going on? Can anyone enlighten me?
Has anyone come across something similar?

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Trade idea based off three indicators.
Traders Hideout
How to apply profiles
Traders Hideout
REcommedations for programming help
Sierra Chart
MC PL editor upgrade
MultiCharts
ZombieSqueeze
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Tao te Trade: way of the WLD
24 thanks
Just another trading journal: PA, Wyckoff & Trends
24 thanks
Bigger Wins or Fewer Losses?
21 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #3 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,765 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,629


It's impossible to answer without the strategy logic.
You may add some debugging instructions in your strategy to get some clues. Simple Print() should be enough (high was X, indicator Z at bar Y say this, etc).

Success requires no deodorant! (Sun Tzu)
Follow me on Twitter Reply With Quote
  #4 (permalink)
kidvic
Los Angeles, CA
 
Posts: 92 since Mar 2015
Thanks Given: 13
Thanks Received: 3


sam028 View Post
It's impossible to answer without the strategy logic.
You may add some debugging instructions in your strategy to get some clues. Simple Print() should be enough (high was X, indicator Z at bar Y say this, etc).

It's the identical strategy. Why would it be different? Does it get interpreted differently?

Reply With Quote
  #5 (permalink)
 ToMerK 
Tel Aviv Israel
 
Experience: Beginner
Platform: NinjaTrader
Broker: CQG
Trading: Futures
Posts: 21 since Feb 2015
Thanks Given: 30
Thanks Received: 13


kidvic View Post
So I've been testing a strategy on market replay. I downloaded 20 days from the ninjatrader server, and as well downloaded the historical data for those same 20 days, (same instrument, same contract, same date/times). Then when I backtetsted that same strategy on the historical version, I got DIFFERENT results!
I checked the graphs, to make sure they lined up, and they did.
Then I went to look at the trades they took, and noticed that on the historical data some of the trades weren't being taken.
Mind you, this is the same strategy, with the same time-frame, same expiration, same dates, same chart.
What is going on? Can anyone enlighten me?
Has anyone come across something similar?

If you haven't read the following you should:
https://ninjatrader.com/support/helpGuides/nt7/?discrepancies_real_time_vs_bac.htm

When running a backtest you only use the end of the bar for OnBarUpdate calculations. In replay/real time if you use "CalculateOnBarClose = false" then each of the OnBarUpdate calculations takes place in each tick.

The fills are different as well as stated in the link above.

Other reasons are all given in the link.

Hope this answers your question...

Reply With Quote
Thanked by:




Last Updated on September 17, 2016


© 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