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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
82 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
43 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
68 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
56 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment