Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Write Account Performance Data to CSV File
Collapse
X
-
Hello Atomic,
Thanks for your post.
I am not aware of an existing NinjaScript that accomplishes this specifically.
You could browse the NinjaTrader Ecosystem User App Share for a possible solution.
Ecosystem User App Share: https://ninjatraderecosystem.com/user-app-share/
This forum thread will also be open for other community members to share their insights on an existing solution.
Otherwise, you could create an indicator that exports values to a file using a StreamWriter: See the reference sample below demonstrating how to write data to a file.
SampleStreamWriter: https://ninjatrader.com/support/help...o_write_to.htm
The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
-
Thanks for that information. I can see how to implement a streamwriter. I have a couple of questions.Originally posted by NinjaTrader_BrandonH View PostHello Atomic,
Thanks for your post.
I am not aware of an existing NinjaScript that accomplishes this specifically.
You could browse the NinjaTrader Ecosystem User App Share for a possible solution.
Ecosystem User App Share: https://ninjatraderecosystem.com/user-app-share/
This forum thread will also be open for other community members to share their insights on an existing solution.
Otherwise, you could create an indicator that exports values to a file using a StreamWriter: See the reference sample below demonstrating how to write data to a file.
SampleStreamWriter: https://ninjatrader.com/support/help...o_write_to.htm
The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
1. How does one access account information using streamwriter?
2. How does one cause ninjascript code to run on demand (user request)?
Comment
-
Hello Atomic,
Thanks for your notes.
Account information could be accessed using the Account class. For example, <Account>.Get() could be used to get AccountItem values for an account, such as Buying Power.
See the NinjaTrader help guide documentation below for more information.
Account class: https://ninjatrader.com/support/help...ount_class.htm
<Account>.Get(): https://ninjatrader.com/support/helpGuides/nt8/get.htm
AccountItem: https://ninjatrader.com/support/help...ccountitem.htm
A NinjaScript's OnBarUpdate() method will run depending on the Calculate mode you set it to use.
Calculate.OnBarClose means the script's logic will process at the close of each bar. Calculate.OnPriceChange means the script's logic will process for each change in price. Calculate.OnEachTick means that the script's logic will process for each incoming tick.
Calculate: https://ninjatrader.com/support/help.../calculate.htm
<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
630 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
364 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
105 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
566 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
568 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment