![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Sunday May 26th at 12PM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Aug 2008
Posts: 109
Thanks: 0
Thanked 0 times in 0 posts
|
I'm doing a chart based strategy backtest using InteractiveBrokers historical data. Am I right that the only way to test the strategy and see how it handles both tick data and the bar update is to run it against the live feed (with a paper trading account)? Or is there a way to get it to handle tick updates on the backtest with historical data?
|
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
That is correct. You can use the Market Replay feature for forward testing, but that requires you to record live market data for the instruments you wish to test.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 | |
|
Senior Member
Join Date: Aug 2008
Posts: 109
Thanks: 0
Thanked 0 times in 0 posts
|
Quote:
Will NT support tick based backtesting in the next version? Thx. |
|
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
You can use the Market Analyzer to load more instruments for recording.
Tick backtesting doesn't exist because there is no way to know how a 1min bar looks during that 1min. Even with tick data you are still missing bid/ask spread throughout that duration. This is why many people use forward testing on top of their backtesting. For backtesting at the tick level you could try creating a multi-time framed strategy with a 1tick bar series.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#5 | |
|
Senior Member
Join Date: Aug 2008
Posts: 109
Thanks: 0
Thanked 0 times in 0 posts
|
Quote:
Also, doesn't a tick include the bid and the ask? |
|
|
|
|
|
|
#6 | |
|
Senior Member
Join Date: Aug 2008
Posts: 109
Thanks: 0
Thanked 0 times in 0 posts
|
Quote:
|
|
|
|
|
|
|
#7 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
Your understanding is correct.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#8 |
|
Senior Member
Join Date: Aug 2008
Posts: 109
Thanks: 0
Thanked 0 times in 0 posts
|
I still don't quite get why if you are collecting tick data with OnMarketUpdate() you can't store whether its the bid or the ask and then provide that during historical replay? There are other tools out there that do tick based backtesting so what am I missing?
Also I tried a multi-time framed strategy and I didn't get that far. |
|
|
|
|
|
#9 |
|
Certified NinjaScript Consultant
Join Date: Sep 2006
Location: New York, USA
Posts: 774
Thanks: 1
Thanked 7 times in 5 posts
|
tradefaz,
OnMarketUpdate doesn't store bid / ask data, its just a method you can use to get that data real-time. In terms of backtesting, the best bet is to use the replay recorder. If you want to record data for multiple pairs without having a chart open for each, reference my post #14 @ http://www.ninjatrader-support.com/v...ead.php?t=9727 NT 7 will allow for historic volume, bid, ask references, as well as other things. hope this helps.
"You look closely enough, you can find everything has a ... weak spot where it can break, sooner or later"
PureLogikTrading |
|
|
|
|
|
#10 | |
|
Member
Join Date: Mar 2007
Location: Minnesota,USA
Posts: 95
Thanks: 0
Thanked 0 times in 0 posts
|
Quote:
In other words will there be a new function VolumePlayback() added to the current bid, ask, last ...Playback() functions? Thanks, Gains |
|
|
|
|
|
|
#11 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
Gains, I'm not aware of changes to the External Feed data interface / DLL connection, but will check with development on this and update this thread then.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#12 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
Gains, to follow up - this is already supported as the Bid / AskPlayback functions for the ATI support the 'size' parameter - http://www.ninjatrader-support.com/H...unctions2.html
Bertrand
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Chart not displaying tick data after historical tick data import | Big D | Miscellaneous Support | 17 | 10-18-2010 03:14 AM |
| Please! Can we backtest strategies with tick by tick?? | cassb | Suggestions And Feedback | 4 | 01-05-2009 02:54 AM |
| backtest tick by tick | foxthorn | Strategy Analyzer | 1 | 05-18-2008 10:43 PM |
| Backtest on Tick, Chart on Minute | shortorlong | Strategy Analyzer | 3 | 05-03-2008 04:02 PM |
| Backtest accuracy to the tick | maxpi | Suggestions And Feedback | 2 | 08-05-2007 02:42 AM |