Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
NT8 acceessing time stamp when using calculation methid On Each Tick
Collapse
X
-
NT8 acceessing time stamp when using calculation methid On Each Tick
What is the best way to get the current timestamp when I have Calculate On each Tick selected. ie the exact time when that tick is processed, as we don't have a bar index to access it, or do we? -
Hello,
Thank you for the question.
For this, if you are only using 1 series, you could use OnMarketData to get the current ticks time stamps, Time[0] would refer to the Current bar which may or may not be a 1 tick series so that would not be accurate in this case when referring to only the current tick.
Otherwise you could also Add a 1 tick series and then get the Time[0] from the secondary series which would be the time of each tick.
I look forward to being of further assistance.
-
Time[0] is it.Originally posted by GKonheiser View PostWhat is the best way to get the current timestamp when I have Calculate On each Tick selected. ie the exact time when that tick is processed, as we don't have a bar index to access it, or do we?
Edit: This is only true if you are not using a time-delimited series. i.e., using Range bars, tick bars, renko or some such. I apologize. I am usually watching range bars, so had a brain poop on this one.Last edited by koganam; 11-25-2015, 12:55 PM.
Comment
-
So if mit primary bars are 10min bars but I have calculate on it tick set in ninja trader 8 there is no way of accessing the time stamp when it calculates without adding the tick time series ?
Comment
-
Hello,
I would suggest trying this question and Printing the time stamp, The print I received for a 10 minute series on each tick is:
protected override void OnBarUpdate()
{
Print(Time[0]);
}
11/25/2015 11:10:00 AM
11/25/2015 11:10:00 AM
11/25/2015 11:10:00 AM
11/25/2015 11:10:00 AM
11/25/2015 11:10:00 AM
11/25/2015 11:10:00 AM
or with milisecond:
protected override void OnBarUpdate()
{
Print(Time[0].ToString("MM/dd/yyyy hh:mm:ss.fff tt"));
}
11/25/2015 11:10:00.000 AM
11/25/2015 11:10:00.000 AM
11/25/2015 11:10:00.000 AM
11/25/2015 11:10:00.000 AM
11/25/2015 11:10:00.000 AM
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
81 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
42 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
64 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
66 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
54 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment