Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Time Stamp issue
Collapse
X
-
Time Stamp issue
I downloaded the SampleStreamWriter and tried to export the data of specific indicators. It works. Except for thing: the Time[0] function uses AM PM in the time stamp rather than a 24 hour clock. This begs for trouble, when I want to import the txt file into R. Still trying to figure out how to convert the AM PM time into 24 hour clock. Or is there another function within NinjaScript other Time[0] to give a 24 hour clock ?Tags: None
-
So I resolved the AM PM issue, but still can not import the data into R. So, I guess I need some time stamp format the same as the export of Ninja historical data like this:
20190419 000100;1.1235;1.12353;1.12348;1.12353;31
20190419 000200;1.12353;1.12353;1.12353;1.12353;3
20190419 000300;1.12353;1.12353;1.12353;1.12353;3
20190419 000400;1.12353;1.12354;1.12353;1.12354;4
While now the SampleStreamWriter gives is like this:
2018-04-25 21:10:00,1.39393,1.39435,1.39392,1.39412,0.0004299 9999999993
2018-04-25 21:20:00,1.39412,1.39413,1.39348,1.39354,0.0009399 99999999941
2018-04-25 21:30:00,1.39355,1.39375,1.3935,1.39365,0.00036999 9999999981
2018-04-25 21:40:00,1.39364,1.39434,1.39363,1.39432,0.0011224 9999999992
2018-04-25 21:50:00,1.3943,1.39437,1.39412,1.39427,0.00053999 9999999985
Any suggestion how can I do this? Thank you !
-
All right, fixed !
For the first problem, change the date format in you windows system; for the second one, replace all "-" with "", and all ":" with "".
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
628 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
359 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
105 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
562 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
568 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment