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

How to write an external file from a single array ?

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

    How to write an external file from a single array ?

    Hi Ninjas,

    I want to run a backtest that will generate a single double array ( not the results but other data ), that I'd like to write on disk, then later, I want to read and load ONCE, that same file ( perhaps through OnStarUp method ) into a single array to be used in a new strategy or algorithm. I've been checking in this forum and others about similars subjects such as text files, but I don't have yet a simple and reliable procedure to do it beside many doubts.

    Do you have some suggestion, reference that I could learn from?
    It seems that this one might fit with my goal, but not sure if it's the best or even supported in Ninjascript.
    Link: https://msdn.microsoft.com/en-us/lib...or=-2147217396

    Thanks in advance
    Last edited by pstrusi; 03-19-2017, 02:19 PM.

    #2
    Hello pstrusi,

    I would recommend writing to a text file and then reading this back from the text file in OnStartUp().

    StreamWriter - http://www.ninjatrader.com/support/f...ead.php?t=3475
    StreamReader - http://www.ninjatrader.com/support/f...ead.php?t=3475
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks for your suggestion Chelsea, I'll check it out
      Regards

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mizzouman1, Today, 07:35 AM
      3 responses
      17 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by RubenCazorla, Today, 09:07 AM
      2 responses
      13 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by i019945nj, 12-14-2023, 06:41 AM
      7 responses
      82 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by timmbbo, 07-05-2023, 10:21 PM
      4 responses
      158 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by tkaboris, Today, 08:01 AM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Working...
      X