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

Sample FileReadWrite Indicator

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

    #16
    Hello aadbosma,

    Take a look at BarsPeriods -
    http://www.ninjatrader.com/support/h...arsperiods.htm

    I believe this is what you are looking for.
    Cal H.NinjaTrader Customer Service

    Comment


      #17
      I tried this and a text file is created but it is blank I am running this in Market analyzer, on a couple of forex pairs. Any ideas?

      Comment


        #18
        Hello pdawg,

        Thank you for writing in.

        As we are currently outside of session hours, please right-click within the Market Analyzer and select Properties.

        Change the Session template section to Default 24/7 and click on OK.

        Does the text file still remain blank after this change?
        Zachary G.NinjaTrader Customer Service

        Comment


          #19
          OK I figured out what it was, my fault I forgot I had commented out the write string. However I was wondering if you could help me with my next problem. I can create a .csv file by adding commas and changing the file output name, which is awesome. However I would like for it to write the data in reverse, right now it writes data from oldest timestamp at the top to newest at the bottom of the spreadsheet. I would like it to output the data in reverse order. Is this possible with StreamWriter?
          Last edited by pdawg; 03-26-2016, 08:30 PM.

          Comment


            #20
            Originally posted by pdawg View Post
            OK I figured out what it was, my fault I forgot I had commented out the write string. However I was wondering if you could help me with my next problem. I can create a .csv file by adding commas and changing the file output name, which is awesome. However I would like for it to write the data in reverse, right now it writes data from oldest timestamp at the top to newest at the bottom of the spreadsheet. I would like it to output the data in reverse order. Is this possible with StreamWriter?
            Streamwriter writes in the order of your data. I'm not sure what code you are looking at - you might be able to reverse the output if it is stored in a temporary buffer of sorts.

            Anyways - Why not reverse it in the spreadsheet? There is a sort in Excel/open office.

            Comment


              #21
              That's what I ended up doing (excel sort), thanks for your help.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Segwin, 05-07-2018, 02:15 PM
              14 responses
              1,789 views
              0 likes
              Last Post aligator  
              Started by Jimmyk, 01-26-2018, 05:19 AM
              6 responses
              837 views
              0 likes
              Last Post emuns
              by emuns
               
              Started by jxs_xrj, 01-12-2020, 09:49 AM
              6 responses
              3,294 views
              1 like
              Last Post jgualdronc  
              Started by Touch-Ups, Today, 10:36 AM
              0 responses
              13 views
              0 likes
              Last Post Touch-Ups  
              Started by geddyisodin, 04-25-2024, 05:20 AM
              11 responses
              63 views
              0 likes
              Last Post halgo_boulder  
              Working...
              X