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

SampleStreamWriter

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

    SampleStreamWriter

    Is it possible to write to the same output file from a strategy that is running concurrently on different instruments?
    I have a strategy that is running on five different currencies at the same time, and I would like each instance to update the same text file as orders are executed.
    I understand that you cannot read and write to the same file at the same time, but can you write to the same file from multiple sources at the same time?

    thanks.

    #2
    astrolobe, I believe you can only have one working Stream object working at the same time.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Astrolobe, I think you could do everything setting up this constructor accordingly:

      public FileStream(
      string path,
      FileMode mode,
      FileAccess access,
      FileShare share
      )

      Regards
      Ralph

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by DawnTreader, 05-08-2024, 05:58 PM
      23 responses
      85 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by DustyContrer, Today, 04:02 AM
      0 responses
      3 views
      0 likes
      Last Post DustyContrer  
      Started by ETFVoyageur, Today, 02:15 AM
      0 responses
      11 views
      0 likes
      Last Post ETFVoyageur  
      Started by Board game geek, Today, 01:34 AM
      0 responses
      14 views
      0 likes
      Last Post Board game geek  
      Started by morrnel, 05-12-2024, 06:07 PM
      3 responses
      45 views
      0 likes
      Last Post wzgy0920  
      Working...
      X