PDA

View Full Version : SampleStreamWriter


astrolobe
09-20-2009, 06:08 PM
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.

NinjaTrader_Bertrand
09-21-2009, 06:39 AM
astrolobe, I believe you can only have one working Stream object working at the same time.

Ralph
09-21-2009, 09:41 AM
Astrolobe, I think you could do everything setting up this constructor accordingly:

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

Regards
Ralph