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 Human#102, 05-08-2024, 09:54 AM
      3 responses
      16 views
      0 likes
      Last Post Human#102  
      Started by ETFVoyageur, Today, 06:11 AM
      0 responses
      5 views
      0 likes
      Last Post ETFVoyageur  
      Started by cencored, 03-31-2016, 05:09 PM
      8 responses
      2,454 views
      0 likes
      Last Post jstaft
      by jstaft
       
      Started by James650, 05-07-2024, 08:25 AM
      2 responses
      8 views
      0 likes
      Last Post James650  
      Started by ssijbabu, 10-07-2012, 07:10 AM
      7 responses
      4,466 views
      0 likes
      Last Post alex@n
      by alex@n
       
      Working...
      X