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

Autodetect time and date format

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

    Autodetect time and date format

    Hello,

    Is there a way in C# to autodetect format of Entry time by your culture setting and then convert it for use together with php import of csv generated by ninjatrader? eg "d. MMMM yyyy H:mm:ss"

    But it does not seem to work properly or in php at all.

    Thanks Paul

    #2
    Hello,

    I am not sure I follow the question.

    Are you trying to convert a date or time that you enter into NinjaTrader or is this regarding exporting data?

    Can you provide more details on what you are trying to do?

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Also, what you currently using in the NT code to do this?

      I assume you are creating a custom string for your DateTime format to the exportation, based on your example?

      Comment


        #4
        My goal is to import trades from CSV file, which generates Ninjatrader when click right mouse on trade list. I need save file to my hdd and ten upload it to my website using php and form. when uploaded i want to store each line in mysql db where i have column datetime which accepts format "yyyy-mm-dd HH:mm:ss" so i need datetime format string for date in ninjatrader csv to convert it into my required format "yyyy-mm-dd HH:mm:ss", Am I clear now? Thanks

        Paul

        Comment


          #5
          Sounds doable.

          wHY NOT?!

          Comment


            #6
            question is how can i tell to PHP in what format is exported datetime in csv - generated by ninjatrader. i have no code in nt to generate csv i tab account performance -> trades and right click to table.
            any idea where can i get entry time format. in czech republic it is e.g. "1.7.2015 9:04:54"

            Comment


              #7
              Hello,

              Thank you for the reply.

              This would be possible although I can not help with the PHP/web side as that is outside of the scope of our support.

              You can certainly export data from NinjaTrader, for trades the easiest way would be using the export to excel feature from any grid.

              If you right click in any of the Trades grids, you should see "Grid" and inside that menu is "Export to Excel".

              This can assist in exporting trade information. As for the Web side, I would suggest searching a question similar to: "PHP upload forms" online to find other boards more in line with web development.

              I look forward to being of further assistance.
              JesseNinjaTrader Customer Service

              Comment


                #8
                Originally posted by kujista View Post
                question is how can i tell to PHP in what format is exported datetime in csv - generated by ninjatrader. i have no code in nt to generate csv i tab account performance -> trades and right click to table.
                any idea where can i get entry time format. in czech republic it is e.g. "1.7.2015 9:04:54"
                More than likely your format is set to "dd.mm.yyyy HH:mm:ss" for anything outside of the United States, BUT! you want to check what your region settings are set to for the computer since NinjaTrader 7 will use that for your DateTime info. This should translate to what is being exported out as well. Just compare the CSV to your trades performance tab for more info.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Stanfillirenfro, Today, 07:23 AM
                1 response
                3 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Started by cmtjoancolmenero, Yesterday, 03:58 PM
                2 responses
                20 views
                0 likes
                Last Post cmtjoancolmenero  
                Started by olisav57, Yesterday, 07:39 PM
                1 response
                9 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by cocoescala, 10-12-2018, 11:02 PM
                7 responses
                944 views
                0 likes
                Last Post Jquiroz1975  
                Started by oviejo, Today, 12:28 AM
                1 response
                12 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Working...
                X