![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Oct 2007
Location: Sydney
Posts: 311
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,413
Thanks: 252
Thanked 976 times in 959 posts
|
astrolobe, I believe you can only have one working Stream object working at the same time.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Jul 2008
Posts: 527
Thanks: 0
Thanked 9 times in 6 posts
|
Astrolobe, I think you could do everything setting up this constructor accordingly:
public FileStream( string path, FileMode mode, FileAccess access, FileShare share ) Regards Ralph |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SampleStreamWriter Example | dnokes | General Programming | 2 | 12-23-2008 09:09 AM |