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 GussJ, 03-04-2020, 03:11 PM
              16 responses
              3,281 views
              0 likes
              Last Post Leafcutter  
              Started by WHICKED, Today, 12:45 PM
              2 responses
              19 views
              0 likes
              Last Post WHICKED
              by WHICKED
               
              Started by Tim-c, Today, 02:10 PM
              1 response
              9 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by Taddypole, Today, 02:47 PM
              0 responses
              5 views
              0 likes
              Last Post Taddypole  
              Started by chbruno, 04-24-2024, 04:10 PM
              4 responses
              53 views
              0 likes
              Last Post chbruno
              by chbruno
               
              Working...
              X