Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is there no way to backtest with OnMarketData() ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • tradefaz
    replied
    Thanks Josh as always, very helpful. Can't believe I missed that, that explains why the timestamps on each data item are the same when I do a backtest

    Leave a comment:


  • NinjaTrader_JoshP
    replied
    Market Replay is its own thing. If you open a chart and it populates with old data that is backtesting. Market Replay is an actual replay of the market as recorded by NinjaTrader. You can access your Market Replay as a connection. Just like how you would connect to your brokerage/data provider accounts.

    Leave a comment:


  • tradefaz
    replied
    Originally posted by Josh View Post
    Backtesting is not the same as forward testing. Forward testing with Market Replay allows you to most accurately simulate the data as it would come in if it were live. Backtesting just takes a set of data and calculates based on already predisposed OHLC values. In realtime you would never know the HLC of a bar while the bar is in progress.

    You use whatever method you want. You just don't run Strategy Analyzer. You run Market Replay or run it live if you want OnMarketData() to work. If backtesting is what you want. You cannot get tick granularity. That is just not what backtesting does unless you want to add a 1tick series to your strategy, but even then it will not simulate it as well as a Market Replay does.
    So when I open up a new chart and format the data range to go back 2 days, and I have market data recording, what is that? Market replay or backtesting? I guess I am not clear because I am not specifically telling it to do either.

    Leave a comment:


  • NinjaTrader_JoshP
    replied
    Backtesting is not the same as forward testing. Forward testing with Market Replay allows you to most accurately simulate the data as it would come in if it were live. Backtesting just takes a set of data and calculates based on already predisposed OHLC values. In realtime you would never know the HLC of a bar while the bar is in progress.

    You use whatever method you want. You just don't run Strategy Analyzer. You run Market Replay or run it live if you want OnMarketData() to work. If backtesting is what you want. You cannot get tick granularity. That is just not what backtesting does unless you want to add a 1tick series to your strategy, but even then it will not simulate it as well as a Market Replay does.

    Leave a comment:


  • tradefaz
    replied
    Originally posted by Josh View Post
    OnMarketData() will not be useful in backtesting. To go on tick granularity you need to forward test with Market Replay or simulation live.
    I don't understand. What method do I want to override in this case? Also I am using data that I recorded with my test MB Trading account. So what is the difference between backtesting and forward testing with Market Replay? Is that not the same thing?

    Leave a comment:


  • NinjaTrader_JoshP
    replied
    OnMarketData() will not be useful in backtesting. To go on tick granularity you need to forward test with Market Replay or simulation live.

    Leave a comment:


  • tradefaz
    started a topic Is there no way to backtest with OnMarketData() ?

    Is there no way to backtest with OnMarketData() ?

    It seems the docs say that this won't fire on historical data for backtesting. Doesn't that sort of making difficult to test a strategy that uses this granular level of tick data? Am I missing something on how to go about this?

    Thanks.

Latest Posts

Collapse

Topics Statistics Last Post
Started by soon123, Today, 12:51 AM
2 responses
6 views
0 likes
Last Post NinjaTrader_PaulH  
Started by bomberone3, 07-16-2020, 05:01 PM
7 responses
373 views
0 likes
Last Post 00deluxe00  
Started by Jema1, Today, 12:23 AM
3 responses
23 views
0 likes
Last Post s.kinra
by s.kinra
 
Started by elliot5, Today, 03:09 AM
0 responses
4 views
0 likes
Last Post elliot5
by elliot5
 
Started by soon123, Yesterday, 11:14 PM
1 response
12 views
0 likes
Last Post s.kinra
by s.kinra
 
Working...
X