![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Apr 2006
Location: , ,
Posts: 1,316
Thanks: 1
Thanked 7 times in 7 posts
|
I have posted before re the time in the Orders and Executions showing the computer time instead of the time of the data.
I now had the same issue occur when trying to use DateTime.Now (which will only picks up the current computer time) in Market Replay. Also, in market replay, DateTime gives a date from April instead of today's date (11 sep). So...I can not use my strategy in market replay as it will never be able to compare the DateTime.Now with the DateTime and get values that are meaningful. Will this be changed in NT7? Thanks. |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
DateTime.Now is not related to anything in the Market Replay. It is a C# property and takes the current date and time as defined on your local computer.
http://msdn.microsoft.com/en-us/libr...etime.now.aspx
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 | |
|
Junior Member
Join Date: Jul 2008
Posts: 1
Thanks: 0
Thanked 0 times in 0 posts
|
Quote:
I tried using Time[0], but that gives me the time at the end of the current bar, which is no good. I could compare the MarketDataEventArgs times to DateTime.Now, and take the difference, but this will not work if I pause or speed up the replay. I could use MarketDataEventArgs.MarketData.Last.Time, but if there are no trades for a while this will fall behind the actual replay time as well. I think I need a replacement for DateTime.Now anyway, since my local PC might get out of sync with the exchange time. |
|
|
|
|
|
|
#4 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
This is on our list already, thanks for the suggestion.
Ray
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| backtesting and DateTime.Now | andrewbee | Strategy Analyzer | 3 | 06-28-2010 09:18 AM |
| Market Replay | MJT | Historical NinjaTrader 6.5 Beta Threads | 11 | 02-21-2008 07:31 AM |
| Market Replay | pgabriel | Miscellaneous Support | 3 | 05-28-2007 10:11 AM |
| Market data for market replay function | grd974 | Miscellaneous Support | 1 | 05-26-2007 09:02 AM |
| Market replay | saroj | Miscellaneous Support | 6 | 06-13-2006 09:16 AM |