Thanks.
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Is there no way to backtest with OnMarketData() ?
Collapse
X
-
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.Tags: None
-
Originally posted by Josh View PostOnMarketData() will not be useful in backtesting. To go on tick granularity you need to forward test with Market Replay or simulation live.
Comment
-
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.Josh P.NinjaTrader Customer Service
Comment
-
Originally posted by Josh View PostBacktesting 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.
Comment
-
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.Josh P.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Rapine Heihei, Today, 08:19 PM
|
1 response
8 views
0 likes
|
Last Post Today, 08:30 PM | ||
Started by Rapine Heihei, Today, 08:25 PM
|
0 responses
6 views
0 likes
|
Last Post Today, 08:25 PM | ||
Started by f.saeidi, Today, 08:01 PM
|
1 response
9 views
0 likes
|
Last Post Today, 08:17 PM | ||
Change colour of Stop market and limit orders to red and green via indicator script
by Rapine Heihei
Started by Rapine Heihei, Today, 07:51 PM
|
0 responses
8 views
0 likes
|
Last Post Today, 07:51 PM | ||
Started by frslvr, 04-11-2024, 07:26 AM
|
5 responses
98 views
1 like
|
Last Post
by caryc123
Today, 07:47 PM
|
Comment