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!
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
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.Brandon H.NinjaTrader Customer Service
-
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
Brandon H.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by bc24fl, 08-30-2019, 01:58 PM
|
4 responses
258 views
0 likes
|
Last Post
by PaulMohn
Today, 04:13 AM
|
||
Started by sugalt, Today, 04:02 AM
|
0 responses
4 views
0 likes
|
Last Post
by sugalt
Today, 04:02 AM
|
||
Started by tradingnasdaqprueba, 04-09-2024, 09:52 AM
|
6 responses
29 views
0 likes
|
Last Post Today, 02:15 AM | ||
Started by PaulMohn, Today, 02:06 AM
|
1 response
3 views
0 likes
|
Last Post
by PaulMohn
Today, 02:12 AM
|
||
Started by Mindset, Today, 01:27 AM
|
0 responses
5 views
0 likes
|
Last Post
by Mindset
Today, 01:27 AM
|
Comment