Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Time Stamp issue

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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 ?

    #2
    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 !

    Comment


      #3
      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


        #4
        Hello wolfcuring,

        Thanks for opening the thread and sharing the steps you took to resolve so the thread can be referenced by others.

        If you have any other NinjaTrader inquiries, please don't hesitate to open a new thread.
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by gbourque, Today, 06:39 AM
        0 responses
        2 views
        0 likes
        Last Post gbourque  
        Started by cmtjoancolmenero, Yesterday, 03:58 PM
        1 response
        17 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by benmarkal, Yesterday, 12:52 PM
        3 responses
        23 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by helpwanted, Today, 03:06 AM
        1 response
        20 views
        0 likes
        Last Post sarafuenonly123  
        Started by Brevo, Today, 01:45 AM
        0 responses
        12 views
        0 likes
        Last Post Brevo
        by Brevo
         
        Working...
        X