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 charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
71 views
0 likes
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
152 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
162 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
100 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
288 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|

Comment